From 51d0df6de01dc81d5239b9a00c7bd3b64480b7d8 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 11:55:30 -0400 Subject: [PATCH 01/62] feat: add ability to authenticate with platform services via sdk --- .gitignore | 1 + buf.gen.yaml | 4 +- pom.xml | 13 +- protocol/pom.xml | 14 +- .../options/AnnotationsProto.java | 167 + .../protoc_gen_openapiv2/options/Contact.java | 954 ++++ .../options/ContactOrBuilder.java | 74 + .../options/ExternalDocumentation.java | 784 +++ .../ExternalDocumentationOrBuilder.java | 54 + .../protoc_gen_openapiv2/options/Header.java | 1252 +++++ .../options/HeaderOrBuilder.java | 114 + .../options/HeaderParameter.java | 1260 +++++ .../options/HeaderParameterOrBuilder.java | 101 + .../protoc_gen_openapiv2/options/Info.java | 1980 +++++++ .../options/InfoOrBuilder.java | 212 + .../options/JSONSchema.java | 4860 +++++++++++++++++ .../options/JSONSchemaOrBuilder.java | 463 ++ .../protoc_gen_openapiv2/options/License.java | 774 +++ .../options/LicenseOrBuilder.java | 50 + .../options/Openapiv2Proto.java | 605 ++ .../options/Operation.java | 3977 ++++++++++++++ .../options/OperationOrBuilder.java | 540 ++ .../options/Parameters.java | 891 +++ .../options/ParametersOrBuilder.java | 59 + .../options/Response.java | 1876 +++++++ .../options/ResponseOrBuilder.java | 249 + .../protoc_gen_openapiv2/options/Schema.java | 1306 +++++ .../options/SchemaOrBuilder.java | 116 + .../protoc_gen_openapiv2/options/Scheme.java | 146 + .../protoc_gen_openapiv2/options/Scopes.java | 756 +++ .../options/ScopesOrBuilder.java | 69 + .../options/SecurityDefinitions.java | 794 +++ .../options/SecurityDefinitionsOrBuilder.java | 69 + .../options/SecurityRequirement.java | 1454 +++++ .../options/SecurityRequirementOrBuilder.java | 79 + .../options/SecurityScheme.java | 2545 +++++++++ .../options/SecuritySchemeOrBuilder.java | 261 + .../protoc_gen_openapiv2/options/Swagger.java | 4356 +++++++++++++++ .../options/SwaggerOrBuilder.java | 568 ++ .../protoc_gen_openapiv2/options/Tag.java | 1386 +++++ .../options/TagOrBuilder.java | 147 + .../authorization/AuthorizationProto.java | 220 + .../AuthorizationServiceGrpc.java | 367 ++ .../authorization/DecisionRequest.java | 1552 ++++++ .../DecisionRequestOrBuilder.java | 82 + .../authorization/DecisionResponse.java | 1531 ++++++ .../DecisionResponseOrBuilder.java | 137 + .../platform/authorization/Entity.java | 1761 ++++++ .../platform/authorization/EntityChain.java | 932 ++++ .../authorization/EntityChainOrBuilder.java | 54 + .../platform/authorization/EntityCustom.java | 607 ++ .../authorization/EntityCustomOrBuilder.java | 25 + .../authorization/EntityEntitlements.java | 731 +++ .../EntityEntitlementsOrBuilder.java | 47 + .../authorization/EntityOrBuilder.java | 130 + .../authorization/GetDecisionsRequest.java | 760 +++ .../GetDecisionsRequestOrBuilder.java | 34 + .../authorization/GetDecisionsResponse.java | 760 +++ .../GetDecisionsResponseOrBuilder.java | 34 + .../authorization/GetEntitlementsRequest.java | 1134 ++++ .../GetEntitlementsRequestOrBuilder.java | 81 + .../GetEntitlementsResponse.java | 814 +++ .../GetEntitlementsResponseOrBuilder.java | 34 + .../authorization/ResourceAttribute.java | 603 ++ .../ResourceAttributeOrBuilder.java | 35 + .../platform/common/ActiveStateEnum.java | 136 + .../opentdf/platform/common/CommonProto.java | 102 + .../io/opentdf/platform/common/Metadata.java | 1211 ++++ .../platform/common/MetadataMutable.java | 729 +++ .../common/MetadataMutableOrBuilder.java | 64 + .../platform/common/MetadataOrBuilder.java | 118 + .../platform/common/MetadataUpdateEnum.java | 147 + .../platform/kas/AccessServiceGrpc.java | 557 ++ .../io/opentdf/platform/kas/InfoRequest.java | 407 ++ .../platform/kas/InfoRequestOrBuilder.java | 10 + .../io/opentdf/platform/kas/InfoResponse.java | 550 ++ .../platform/kas/InfoResponseOrBuilder.java | 22 + .../io/opentdf/platform/kas/KasProto.java | 175 + .../platform/kas/LegacyPublicKeyRequest.java | 542 ++ .../kas/LegacyPublicKeyRequestOrBuilder.java | 22 + .../platform/kas/PublicKeyRequest.java | 814 +++ .../kas/PublicKeyRequestOrBuilder.java | 46 + .../platform/kas/PublicKeyResponse.java | 542 ++ .../kas/PublicKeyResponseOrBuilder.java | 22 + .../opentdf/platform/kas/RewrapRequest.java | 678 +++ .../platform/kas/RewrapRequestOrBuilder.java | 34 + .../opentdf/platform/kas/RewrapResponse.java | 1051 ++++ .../platform/kas/RewrapResponseOrBuilder.java | 74 + .../CreateKeyAccessServerRequest.java | 996 ++++ ...CreateKeyAccessServerRequestOrBuilder.java | 72 + .../CreateKeyAccessServerResponse.java | 599 ++ ...reateKeyAccessServerResponseOrBuilder.java | 25 + .../DeleteKeyAccessServerRequest.java | 542 ++ ...DeleteKeyAccessServerRequestOrBuilder.java | 22 + .../DeleteKeyAccessServerResponse.java | 599 ++ ...eleteKeyAccessServerResponseOrBuilder.java | 25 + .../GetKeyAccessServerRequest.java | 542 ++ .../GetKeyAccessServerRequestOrBuilder.java | 22 + .../GetKeyAccessServerResponse.java | 599 ++ .../GetKeyAccessServerResponseOrBuilder.java | 25 + .../platform/kasregistry/KeyAccessServer.java | 1142 ++++ .../kasregistry/KeyAccessServerOrBuilder.java | 84 + .../KeyAccessServerRegistryProto.java | 249 + .../KeyAccessServerRegistryServiceGrpc.java | 589 ++ .../ListKeyAccessServersRequest.java | 399 ++ .../ListKeyAccessServersRequestOrBuilder.java | 10 + .../ListKeyAccessServersResponse.java | 760 +++ ...ListKeyAccessServersResponseOrBuilder.java | 34 + .../platform/kasregistry/PublicKey.java | 899 +++ .../kasregistry/PublicKeyOrBuilder.java | 70 + .../UpdateKeyAccessServerRequest.java | 1226 +++++ ...UpdateKeyAccessServerRequestOrBuilder.java | 95 + .../UpdateKeyAccessServerResponse.java | 599 ++ ...pdateKeyAccessServerResponseOrBuilder.java | 25 + .../io/opentdf/platform/policy/Action.java | 911 +++ .../platform/policy/ActionOrBuilder.java | 45 + .../io/opentdf/platform/policy/Attribute.java | 2377 ++++++++ .../policy/AttributeDefinitionSelector.java | 1871 +++++++ .../AttributeDefinitionSelectorOrBuilder.java | 46 + .../policy/AttributeNamespaceSelector.java | 1907 +++++++ .../AttributeNamespaceSelectorOrBuilder.java | 25 + .../platform/policy/AttributeOrBuilder.java | 202 + .../policy/AttributeRuleTypeEnum.java | 136 + .../policy/AttributeValueSelector.java | 1882 +++++++ .../AttributeValueSelectorOrBuilder.java | 43 + .../io/opentdf/platform/policy/Condition.java | 971 ++++ .../policy/ConditionBooleanTypeEnum.java | 127 + .../platform/policy/ConditionGroup.java | 890 +++ .../policy/ConditionGroupOrBuilder.java | 53 + .../platform/policy/ConditionOrBuilder.java | 90 + .../io/opentdf/platform/policy/Namespace.java | 1296 +++++ .../platform/policy/NamespaceOrBuilder.java | 104 + .../opentdf/platform/policy/ObjectsProto.java | 245 + .../platform/policy/ResourceMapping.java | 1119 ++++ .../policy/ResourceMappingOrBuilder.java | 77 + .../platform/policy/SelectorsProto.java | 172 + .../platform/policy/SubjectConditionSet.java | 1104 ++++ .../policy/SubjectConditionSetOrBuilder.java | 61 + .../platform/policy/SubjectMapping.java | 1676 ++++++ .../policy/SubjectMappingOperatorEnum.java | 127 + .../policy/SubjectMappingOrBuilder.java | 135 + .../platform/policy/SubjectProperty.java | 692 +++ .../policy/SubjectPropertyOrBuilder.java | 34 + .../opentdf/platform/policy/SubjectSet.java | 860 +++ .../platform/policy/SubjectSetOrBuilder.java | 54 + .../io/opentdf/platform/policy/Value.java | 2834 ++++++++++ .../platform/policy/ValueOrBuilder.java | 255 + ...signKeyAccessServerToAttributeRequest.java | 599 ++ ...cessServerToAttributeRequestOrBuilder.java | 25 + ...ignKeyAccessServerToAttributeResponse.java | 599 ++ ...essServerToAttributeResponseOrBuilder.java | 25 + .../AssignKeyAccessServerToValueRequest.java | 599 ++ ...eyAccessServerToValueRequestOrBuilder.java | 25 + .../AssignKeyAccessServerToValueResponse.java | 599 ++ ...yAccessServerToValueResponseOrBuilder.java | 25 + .../attributes/AttributeKeyAccessServer.java | 678 +++ .../AttributeKeyAccessServerOrBuilder.java | 34 + .../policy/attributes/AttributesProto.java | 594 ++ .../attributes/AttributesServiceGrpc.java | 1419 +++++ .../attributes/CreateAttributeRequest.java | 1041 ++++ .../CreateAttributeRequestOrBuilder.java | 80 + .../attributes/CreateAttributeResponse.java | 599 ++ .../CreateAttributeResponseOrBuilder.java | 25 + .../CreateAttributeValueRequest.java | 1188 ++++ .../CreateAttributeValueRequestOrBuilder.java | 110 + .../CreateAttributeValueResponse.java | 599 ++ ...CreateAttributeValueResponseOrBuilder.java | 25 + .../DeactivateAttributeRequest.java | 542 ++ .../DeactivateAttributeRequestOrBuilder.java | 22 + .../DeactivateAttributeResponse.java | 599 ++ .../DeactivateAttributeResponseOrBuilder.java | 25 + .../DeactivateAttributeValueRequest.java | 542 ++ ...ctivateAttributeValueRequestOrBuilder.java | 22 + .../DeactivateAttributeValueResponse.java | 599 ++ ...tivateAttributeValueResponseOrBuilder.java | 25 + .../attributes/GetAttributeRequest.java | 542 ++ .../GetAttributeRequestOrBuilder.java | 22 + .../attributes/GetAttributeResponse.java | 599 ++ .../GetAttributeResponseOrBuilder.java | 25 + .../attributes/GetAttributeValueRequest.java | 554 ++ .../GetAttributeValueRequestOrBuilder.java | 22 + .../attributes/GetAttributeValueResponse.java | 599 ++ .../GetAttributeValueResponseOrBuilder.java | 25 + .../GetAttributeValuesByFqnsRequest.java | 840 +++ ...AttributeValuesByFqnsRequestOrBuilder.java | 66 + .../GetAttributeValuesByFqnsResponse.java | 1572 ++++++ ...ttributeValuesByFqnsResponseOrBuilder.java | 64 + .../ListAttributeValuesRequest.java | 664 +++ .../ListAttributeValuesRequestOrBuilder.java | 41 + .../ListAttributeValuesResponse.java | 760 +++ .../ListAttributeValuesResponseOrBuilder.java | 34 + .../attributes/ListAttributesRequest.java | 528 ++ .../ListAttributesRequestOrBuilder.java | 29 + .../attributes/ListAttributesResponse.java | 760 +++ .../ListAttributesResponseOrBuilder.java | 34 + ...veKeyAccessServerFromAttributeRequest.java | 599 ++ ...ssServerFromAttributeRequestOrBuilder.java | 25 + ...eKeyAccessServerFromAttributeResponse.java | 599 ++ ...sServerFromAttributeResponseOrBuilder.java | 25 + ...RemoveKeyAccessServerFromValueRequest.java | 599 ++ ...AccessServerFromValueRequestOrBuilder.java | 25 + ...emoveKeyAccessServerFromValueResponse.java | 599 ++ ...ccessServerFromValueResponseOrBuilder.java | 25 + .../attributes/UpdateAttributeRequest.java | 905 +++ .../UpdateAttributeRequestOrBuilder.java | 68 + .../attributes/UpdateAttributeResponse.java | 599 ++ .../UpdateAttributeResponseOrBuilder.java | 25 + .../UpdateAttributeValueRequest.java | 1118 ++++ .../UpdateAttributeValueRequestOrBuilder.java | 101 + .../UpdateAttributeValueResponse.java | 599 ++ ...UpdateAttributeValueResponseOrBuilder.java | 25 + .../attributes/ValueKeyAccessServer.java | 678 +++ .../ValueKeyAccessServerOrBuilder.java | 34 + .../namespaces/CreateNamespaceRequest.java | 811 +++ .../CreateNamespaceRequestOrBuilder.java | 57 + .../namespaces/CreateNamespaceResponse.java | 599 ++ .../CreateNamespaceResponseOrBuilder.java | 25 + .../DeactivateNamespaceRequest.java | 542 ++ .../DeactivateNamespaceRequestOrBuilder.java | 22 + .../DeactivateNamespaceResponse.java | 399 ++ .../DeactivateNamespaceResponseOrBuilder.java | 10 + .../namespaces/GetNamespaceRequest.java | 542 ++ .../GetNamespaceRequestOrBuilder.java | 22 + .../namespaces/GetNamespaceResponse.java | 599 ++ .../GetNamespaceResponseOrBuilder.java | 25 + .../namespaces/ListNamespacesRequest.java | 528 ++ .../ListNamespacesRequestOrBuilder.java | 29 + .../namespaces/ListNamespacesResponse.java | 760 +++ .../ListNamespacesResponseOrBuilder.java | 34 + .../namespaces/NamespaceServiceGrpc.java | 589 ++ .../policy/namespaces/NamespacesProto.java | 218 + .../namespaces/UpdateNamespaceRequest.java | 905 +++ .../UpdateNamespaceRequestOrBuilder.java | 68 + .../namespaces/UpdateNamespaceResponse.java | 599 ++ .../UpdateNamespaceResponseOrBuilder.java | 25 + .../CreateResourceMappingRequest.java | 1060 ++++ ...CreateResourceMappingRequestOrBuilder.java | 82 + .../CreateResourceMappingResponse.java | 599 ++ ...reateResourceMappingResponseOrBuilder.java | 25 + .../DeleteResourceMappingRequest.java | 542 ++ ...DeleteResourceMappingRequestOrBuilder.java | 22 + .../DeleteResourceMappingResponse.java | 599 ++ ...eleteResourceMappingResponseOrBuilder.java | 25 + .../GetResourceMappingRequest.java | 542 ++ .../GetResourceMappingRequestOrBuilder.java | 22 + .../GetResourceMappingResponse.java | 599 ++ .../GetResourceMappingResponseOrBuilder.java | 25 + .../ListResourceMappingsRequest.java | 399 ++ .../ListResourceMappingsRequestOrBuilder.java | 10 + .../ListResourceMappingsResponse.java | 760 +++ ...ListResourceMappingsResponseOrBuilder.java | 34 + .../resourcemapping/ResourceMappingProto.java | 217 + .../ResourceMappingServiceGrpc.java | 1363 +++++ .../UpdateResourceMappingRequest.java | 1258 +++++ ...UpdateResourceMappingRequestOrBuilder.java | 113 + .../UpdateResourceMappingResponse.java | 599 ++ ...pdateResourceMappingResponseOrBuilder.java | 25 + .../CreateSubjectConditionSetRequest.java | 599 ++ ...teSubjectConditionSetRequestOrBuilder.java | 25 + .../CreateSubjectConditionSetResponse.java | 599 ++ ...eSubjectConditionSetResponseOrBuilder.java | 25 + .../CreateSubjectMappingRequest.java | 1669 ++++++ .../CreateSubjectMappingRequestOrBuilder.java | 152 + .../CreateSubjectMappingResponse.java | 599 ++ ...CreateSubjectMappingResponseOrBuilder.java | 25 + .../DeleteSubjectConditionSetRequest.java | 542 ++ ...teSubjectConditionSetRequestOrBuilder.java | 22 + .../DeleteSubjectConditionSetResponse.java | 647 +++ ...eSubjectConditionSetResponseOrBuilder.java | 37 + .../DeleteSubjectMappingRequest.java | 542 ++ .../DeleteSubjectMappingRequestOrBuilder.java | 22 + .../DeleteSubjectMappingResponse.java | 647 +++ ...DeleteSubjectMappingResponseOrBuilder.java | 37 + .../GetSubjectConditionSetRequest.java | 542 ++ ...etSubjectConditionSetRequestOrBuilder.java | 22 + .../GetSubjectConditionSetResponse.java | 1046 ++++ ...tSubjectConditionSetResponseOrBuilder.java | 69 + .../GetSubjectMappingRequest.java | 542 ++ .../GetSubjectMappingRequestOrBuilder.java | 22 + .../GetSubjectMappingResponse.java | 599 ++ .../GetSubjectMappingResponseOrBuilder.java | 25 + .../ListSubjectConditionSetsRequest.java | 399 ++ ...tSubjectConditionSetsRequestOrBuilder.java | 10 + .../ListSubjectConditionSetsResponse.java | 760 +++ ...SubjectConditionSetsResponseOrBuilder.java | 34 + .../ListSubjectMappingsRequest.java | 399 ++ .../ListSubjectMappingsRequestOrBuilder.java | 10 + .../ListSubjectMappingsResponse.java | 760 +++ .../ListSubjectMappingsResponseOrBuilder.java | 34 + .../MatchSubjectMappingsRequest.java | 788 +++ .../MatchSubjectMappingsRequestOrBuilder.java | 34 + .../MatchSubjectMappingsResponse.java | 760 +++ ...MatchSubjectMappingsResponseOrBuilder.java | 34 + .../SubjectConditionSetCreate.java | 1106 ++++ .../SubjectConditionSetCreateOrBuilder.java | 84 + .../subjectmapping/SubjectMappingProto.java | 431 ++ .../SubjectMappingServiceGrpc.java | 1045 ++++ .../UpdateSubjectConditionSetRequest.java | 1375 +++++ ...teSubjectConditionSetRequestOrBuilder.java | 117 + .../UpdateSubjectConditionSetResponse.java | 647 +++ ...eSubjectConditionSetResponseOrBuilder.java | 37 + .../UpdateSubjectMappingRequest.java | 1523 ++++++ .../UpdateSubjectMappingRequestOrBuilder.java | 134 + .../UpdateSubjectMappingResponse.java | 647 +++ ...UpdateSubjectMappingResponseOrBuilder.java | 37 + .../GetWellKnownConfigurationRequest.java | 399 ++ ...ellKnownConfigurationRequestOrBuilder.java | 10 + .../GetWellKnownConfigurationResponse.java | 599 ++ ...llKnownConfigurationResponseOrBuilder.java | 25 + .../WellKnownConfig.java | 712 +++ .../WellKnownConfigOrBuilder.java | 44 + .../WellKnownServiceGrpc.java | 293 + .../WellknownConfigurationProto.java | 111 + sdk/pom.xml | 31 + .../main/java/io/opentdf/platform/SDK.java | 4 - .../java/io/opentdf/platform/sdk/SDK.java | 221 + .../java/io/opentdf/platform/SDKTest.java | 12 - .../java/io/opentdf/platform/sdk/SDKTest.java | 30 + 318 files changed, 153312 insertions(+), 28 deletions(-) create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Contact.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Header.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Info.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/License.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Operation.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Response.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Schema.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Tag.java create mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationServiceGrpc.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/Entity.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityChain.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityChainOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityCustom.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityCustomOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlements.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlementsOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttribute.java create mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/common/ActiveStateEnum.java create mode 100644 protocol/src/main/java/io/opentdf/platform/common/CommonProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/common/Metadata.java create mode 100644 protocol/src/main/java/io/opentdf/platform/common/MetadataMutable.java create mode 100644 protocol/src/main/java/io/opentdf/platform/common/MetadataMutableOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/common/MetadataOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/common/MetadataUpdateEnum.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/AccessServiceGrpc.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/InfoRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/InfoRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/InfoResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/InfoResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/KasProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/RewrapRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/RewrapRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/RewrapResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kas/RewrapResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServer.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryServiceGrpc.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKey.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKeyOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Action.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ActionOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Attribute.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelector.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelectorOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelector.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelectorOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeRuleTypeEnum.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelector.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelectorOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Condition.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ConditionBooleanTypeEnum.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ConditionGroup.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ConditionGroupOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ConditionOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Namespace.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/NamespaceOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ObjectsProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ResourceMapping.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ResourceMappingOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SelectorsProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSet.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSetOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectMapping.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOperatorEnum.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectProperty.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectPropertyOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectSet.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectSetOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Value.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ValueOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServer.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServerOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesServiceGrpc.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServer.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServerOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespaceServiceGrpc.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespacesProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingServiceGrpc.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequest.java create mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequestOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponse.java create mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponseOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfig.java create mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfigOrBuilder.java create mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownServiceGrpc.java create mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellknownConfigurationProto.java delete mode 100644 sdk/src/main/java/io/opentdf/platform/SDK.java create mode 100644 sdk/src/main/java/io/opentdf/platform/sdk/SDK.java delete mode 100644 sdk/src/test/java/io/opentdf/platform/SDKTest.java create mode 100644 sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java diff --git a/.gitignore b/.gitignore index 11b6cc78..ccf7a011 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ protocol/src/main/protogen /.idea/ /protocol/target/ /sdk/target/ +.DS_Store \ No newline at end of file diff --git a/buf.gen.yaml b/buf.gen.yaml index 55739829..790fdd6b 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -9,6 +9,6 @@ managed: - buf.build/grpc-ecosystem/grpc-gateway plugins: - plugin: buf.build/protocolbuffers/java:v25.3 - out: protocol/src/main/protogen + out: protocol/src/main/java - plugin: buf.build/grpc/java:v1.61.1 - out: protocol/src/main/protogen \ No newline at end of file + out: protocol/src/main/java \ No newline at end of file diff --git a/pom.xml b/pom.xml index b7cb54b6..7129507b 100644 --- a/pom.xml +++ b/pom.xml @@ -12,8 +12,8 @@ UTF-8 - 11 - 11 + 21 + 21 2.20.0 1.57.2 3.25.3 @@ -25,10 +25,17 @@ + io.grpc + grpc-bom + ${grpc.version} + pom + import + + org.apache.logging.log4j log4j-api diff --git a/protocol/pom.xml b/protocol/pom.xml index 911c9ec8..8163e376 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -3,8 +3,10 @@ 4.0.0 + io.opentdf.platform protocol protocol + 0.1.0-SNAPSHOT sdk-pom io.opentdf.platform @@ -25,17 +27,15 @@ build.buf protovalidate - 0.1.9 + 0.1.5 io.grpc grpc-protobuf - ${grpc.version} - + io.grpc grpc-stub - ${grpc.version} @@ -52,7 +52,7 @@ - + @@ -68,8 +68,8 @@ - - + + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java new file mode 100644 index 00000000..df54f5b6 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java @@ -0,0 +1,167 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/annotations.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public final class AnnotationsProto { + private AnnotationsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger); + registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation); + registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Schema); + registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Tag); + registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Field); + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public static final int OPENAPIV2_SWAGGER_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + grpc.gateway.protoc_gen_openapiv2.options.Swagger> openapiv2Swagger = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, + grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance()); + public static final int OPENAPIV2_OPERATION_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.MethodOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, + grpc.gateway.protoc_gen_openapiv2.options.Operation> openapiv2Operation = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + grpc.gateway.protoc_gen_openapiv2.options.Operation.class, + grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance()); + public static final int OPENAPIV2_SCHEMA_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + grpc.gateway.protoc_gen_openapiv2.options.Schema> openapiv2Schema = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + grpc.gateway.protoc_gen_openapiv2.options.Schema.class, + grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()); + public static final int OPENAPIV2_TAG_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.ServiceOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.ServiceOptions, + grpc.gateway.protoc_gen_openapiv2.options.Tag> openapiv2Tag = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + grpc.gateway.protoc_gen_openapiv2.options.Tag.class, + grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); + public static final int OPENAPIV2_FIELD_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema> openapiv2Field = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()); + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n.protoc-gen-openapiv2/options/annotatio" + + "ns.proto\022)grpc.gateway.protoc_gen_openap" + + "iv2.options\032 google/protobuf/descriptor." + + "proto\032,protoc-gen-openapiv2/options/open" + + "apiv2.proto:~\n\021openapiv2_swagger\022\034.googl" + + "e.protobuf.FileOptions\030\222\010 \001(\01322.grpc.gat" + + "eway.protoc_gen_openapiv2.options.Swagge" + + "rR\020openapiv2Swagger:\206\001\n\023openapiv2_operat" + + "ion\022\036.google.protobuf.MethodOptions\030\222\010 \001" + + "(\01324.grpc.gateway.protoc_gen_openapiv2.o" + + "ptions.OperationR\022openapiv2Operation:~\n\020" + + "openapiv2_schema\022\037.google.protobuf.Messa" + + "geOptions\030\222\010 \001(\01321.grpc.gateway.protoc_g" + + "en_openapiv2.options.SchemaR\017openapiv2Sc" + + "hema:u\n\ropenapiv2_tag\022\037.google.protobuf." + + "ServiceOptions\030\222\010 \001(\0132..grpc.gateway.pro" + + "toc_gen_openapiv2.options.TagR\014openapiv2" + + "Tag:~\n\017openapiv2_field\022\035.google.protobuf" + + ".FieldOptions\030\222\010 \001(\01325.grpc.gateway.prot" + + "oc_gen_openapiv2.options.JSONSchemaR\016ope" + + "napiv2FieldB\232\002B\020AnnotationsProtoP\001ZFgith" + + "ub.com/grpc-ecosystem/grpc-gateway/v2/pr" + + "otoc-gen-openapiv2/options\242\002\004GGPO\252\002\'Grpc" + + ".Gateway.ProtocGenOpenapiv2.Options\312\002\'Gr" + + "pc\\Gateway\\ProtocGenOpenapiv2\\Options\342\0023" + + "Grpc\\Gateway\\ProtocGenOpenapiv2\\Options\\" + + "GPBMetadata\352\002*Grpc::Gateway::ProtocGenOp" + + "enapiv2::Optionsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DescriptorProtos.getDescriptor(), + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor(), + }); + openapiv2Swagger.internalInit(descriptor.getExtensions().get(0)); + openapiv2Operation.internalInit(descriptor.getExtensions().get(1)); + openapiv2Schema.internalInit(descriptor.getExtensions().get(2)); + openapiv2Tag.internalInit(descriptor.getExtensions().get(3)); + openapiv2Field.internalInit(descriptor.getExtensions().get(4)); + com.google.protobuf.DescriptorProtos.getDescriptor(); + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Contact.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Contact.java new file mode 100644 index 00000000..c9a18ecd --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Contact.java @@ -0,0 +1,954 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Contact` is a representation of OpenAPI v2 specification's Contact object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
+ *
+ * Example:
+ *
+ *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ *    info: {
+ *      ...
+ *      contact: {
+ *        name: "gRPC-Gateway project";
+ *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ *        email: "none@example.com";
+ *      };
+ *      ...
+ *    };
+ *    ...
+ *  };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ +public final class Contact extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact) + ContactOrBuilder { +private static final long serialVersionUID = 0L; + // Use Contact.newBuilder() to construct. + private Contact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Contact() { + name_ = ""; + url_ = ""; + email_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Contact(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Contact.class, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The identifying name of the contact person/organization.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The identifying name of the contact person/organization.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * The URL pointing to the contact information. MUST be in the format of a
+   * URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The URL pointing to the contact information. MUST be in the format of a
+   * URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object email_ = ""; + /** + *
+   * The email address of the contact person/organization. MUST be in the format
+   * of an email address.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + *
+   * The email address of the contact person/organization. MUST be in the format
+   * of an email address.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, email_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, email_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Contact)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Contact other = (grpc.gateway.protoc_gen_openapiv2.options.Contact) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Contact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Contact` is a representation of OpenAPI v2 specification's Contact object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
+   *
+   * Example:
+   *
+   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   *    info: {
+   *      ...
+   *      contact: {
+   *        name: "gRPC-Gateway project";
+   *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
+   *        email: "none@example.com";
+   *      };
+   *      ...
+   *    };
+   *    ...
+   *  };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact) + grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Contact.class, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Contact.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + url_ = ""; + email_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Contact build() { + grpc.gateway.protoc_gen_openapiv2.options.Contact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Contact buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Contact result = new grpc.gateway.protoc_gen_openapiv2.options.Contact(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Contact result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.email_ = email_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Contact) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Contact)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Contact other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object email_ = ""; + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + email_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return This builder for chaining. + */ + public Builder clearEmail() { + email_ = getDefaultInstance().getEmail(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + email_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact) + private static final grpc.gateway.protoc_gen_openapiv2.options.Contact DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Contact(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Contact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java new file mode 100644 index 00000000..e3300a78 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface ContactOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Contact) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The identifying name of the contact person/organization.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The identifying name of the contact person/organization.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The URL pointing to the contact information. MUST be in the format of a
+   * URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The URL pointing to the contact information. MUST be in the format of a
+   * URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * The email address of the contact person/organization. MUST be in the format
+   * of an email address.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+   * The email address of the contact person/organization. MUST be in the format
+   * of an email address.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java new file mode 100644 index 00000000..44ceae4d --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java @@ -0,0 +1,784 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `ExternalDocumentation` is a representation of OpenAPI v2 specification's
+ * ExternalDocumentation object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
+ *
+ * Example:
+ *
+ *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ *    ...
+ *    external_docs: {
+ *      description: "More about gRPC-Gateway";
+ *      url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ *    }
+ *    ...
+ *  };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +public final class ExternalDocumentation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + ExternalDocumentationOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExternalDocumentation.newBuilder() to construct. + private ExternalDocumentation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExternalDocumentation() { + description_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExternalDocumentation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.class, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder.class); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description of the target documentation. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description of the target documentation. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * The URL for the target documentation. Value MUST be in the format
+   * of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The URL for the target documentation. Value MUST be in the format
+   * of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation other = (grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) obj; + + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `ExternalDocumentation` is a representation of OpenAPI v2 specification's
+   * ExternalDocumentation object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
+   *
+   * Example:
+   *
+   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   *    ...
+   *    external_docs: {
+   *      description: "More about gRPC-Gateway";
+   *      url: "https://github.com/grpc-ecosystem/grpc-gateway";
+   *    }
+   *    ...
+   *  };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.class, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + url_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation build() { + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result = new grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + private static final grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExternalDocumentation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java new file mode 100644 index 00000000..7a5b5210 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface ExternalDocumentationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A short description of the target documentation. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description of the target documentation. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The URL for the target documentation. Value MUST be in the format
+   * of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The URL for the target documentation. Value MUST be in the format
+   * of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Header.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Header.java new file mode 100644 index 00000000..ad785ffe --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Header.java @@ -0,0 +1,1252 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Header` is a representation of OpenAPI v2 specification's Header object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Header} + */ +public final class Header extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Header) + HeaderOrBuilder { +private static final long serialVersionUID = 0L; + // Use Header.newBuilder() to construct. + private Header(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Header() { + description_ = ""; + type_ = ""; + format_ = ""; + default_ = ""; + pattern_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Header(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Header.class, grpc.gateway.protoc_gen_openapiv2.options.Header.Builder.class); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORMAT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object format_ = ""; + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 3 [json_name = "format"]; + * @return The format. + */ + @java.lang.Override + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } + } + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 3 [json_name = "format"]; + * @return The bytes for format. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object default_ = ""; + /** + *
+   * `Default` Declares the value of the header that the server will use if none is provided.
+   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+   * Unlike JSON Schema this value MUST conform to the defined type for the header.
+   * 
+ * + * string default = 6 [json_name = "default"]; + * @return The default. + */ + @java.lang.Override + public java.lang.String getDefault() { + java.lang.Object ref = default_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + default_ = s; + return s; + } + } + /** + *
+   * `Default` Declares the value of the header that the server will use if none is provided.
+   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+   * Unlike JSON Schema this value MUST conform to the defined type for the header.
+   * 
+ * + * string default = 6 [json_name = "default"]; + * @return The bytes for default. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultBytes() { + java.lang.Object ref = default_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + default_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATTERN_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object pattern_ = ""; + /** + *
+   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+   * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The pattern. + */ + @java.lang.Override + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } + } + /** + *
+   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+   * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, format_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(default_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, default_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, pattern_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, format_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(default_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, default_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, pattern_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Header)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Header other = (grpc.gateway.protoc_gen_openapiv2.options.Header) obj; + + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getType() + .equals(other.getType())) return false; + if (!getFormat() + .equals(other.getFormat())) return false; + if (!getDefault() + .equals(other.getDefault())) return false; + if (!getPattern() + .equals(other.getPattern())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + getDefault().hashCode(); + hash = (37 * hash) + PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getPattern().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Header prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Header` is a representation of OpenAPI v2 specification's Header object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Header} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Header) + grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Header.class, grpc.gateway.protoc_gen_openapiv2.options.Header.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Header.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + type_ = ""; + format_ = ""; + default_ = ""; + pattern_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Header build() { + grpc.gateway.protoc_gen_openapiv2.options.Header result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Header buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Header result = new grpc.gateway.protoc_gen_openapiv2.options.Header(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Header result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.default_ = default_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pattern_ = pattern_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Header) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Header)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Header other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFormat().isEmpty()) { + format_ = other.format_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDefault().isEmpty()) { + default_ = other.default_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getPattern().isEmpty()) { + pattern_ = other.pattern_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + format_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 50: { + default_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 106: { + pattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 106 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object format_ = ""; + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @return The format. + */ + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @return The bytes for format. + */ + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + format_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @return This builder for chaining. + */ + public Builder clearFormat() { + format_ = getDefaultInstance().getFormat(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @param value The bytes for format to set. + * @return This builder for chaining. + */ + public Builder setFormatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + format_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object default_ = ""; + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @return The default. + */ + public java.lang.String getDefault() { + java.lang.Object ref = default_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + default_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @return The bytes for default. + */ + public com.google.protobuf.ByteString + getDefaultBytes() { + java.lang.Object ref = default_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + default_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @param value The default to set. + * @return This builder for chaining. + */ + public Builder setDefault( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + default_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @return This builder for chaining. + */ + public Builder clearDefault() { + default_ = getDefaultInstance().getDefault(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @param value The bytes for default to set. + * @return This builder for chaining. + */ + public Builder setDefaultBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + default_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object pattern_ = ""; + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The pattern. + */ + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @param value The pattern to set. + * @return This builder for chaining. + */ + public Builder setPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pattern_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return This builder for chaining. + */ + public Builder clearPattern() { + pattern_ = getDefaultInstance().getPattern(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @param value The bytes for pattern to set. + * @return This builder for chaining. + */ + public Builder setPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pattern_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Header) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Header) + private static final grpc.gateway.protoc_gen_openapiv2.options.Header DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Header(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Header parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser
parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java new file mode 100644 index 00000000..ca2d6b87 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface HeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Header) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 3 [json_name = "format"]; + * @return The format. + */ + java.lang.String getFormat(); + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 3 [json_name = "format"]; + * @return The bytes for format. + */ + com.google.protobuf.ByteString + getFormatBytes(); + + /** + *
+   * `Default` Declares the value of the header that the server will use if none is provided.
+   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+   * Unlike JSON Schema this value MUST conform to the defined type for the header.
+   * 
+ * + * string default = 6 [json_name = "default"]; + * @return The default. + */ + java.lang.String getDefault(); + /** + *
+   * `Default` Declares the value of the header that the server will use if none is provided.
+   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+   * Unlike JSON Schema this value MUST conform to the defined type for the header.
+   * 
+ * + * string default = 6 [json_name = "default"]; + * @return The bytes for default. + */ + com.google.protobuf.ByteString + getDefaultBytes(); + + /** + *
+   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+   * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The pattern. + */ + java.lang.String getPattern(); + /** + *
+   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+   * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + com.google.protobuf.ByteString + getPatternBytes(); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java new file mode 100644 index 00000000..296298e4 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java @@ -0,0 +1,1260 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `HeaderParameter` a HTTP header parameter.
+ * See: https://swagger.io/specification/v2/#parameter-object
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ +public final class HeaderParameter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + HeaderParameterOrBuilder { +private static final long serialVersionUID = 0L; + // Use HeaderParameter.newBuilder() to construct. + private HeaderParameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HeaderParameter() { + name_ = ""; + description_ = ""; + type_ = 0; + format_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HeaderParameter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.class, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder.class); + } + + /** + *
+   * `Type` is a a supported HTTP header type.
+   * See https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * STRING = 1; + */ + STRING(1), + /** + * NUMBER = 2; + */ + NUMBER(2), + /** + * INTEGER = 3; + */ + INTEGER(3), + /** + * BOOLEAN = 4; + */ + BOOLEAN(4), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + /** + * NUMBER = 2; + */ + public static final int NUMBER_VALUE = 2; + /** + * INTEGER = 3; + */ + public static final int INTEGER_VALUE = 3; + /** + * BOOLEAN = 4; + */ + public static final int BOOLEAN_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return STRING; + case 2: return NUMBER; + case 3: return INTEGER; + case 4: return BOOLEAN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * `Name` is the header name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * `Name` is the header name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_ = 0; + /** + *
+   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * See: https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * See: https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType() { + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type result = grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.forNumber(type_); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNRECOGNIZED : result; + } + + public static final int FORMAT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object format_ = ""; + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 4 [json_name = "format"]; + * @return The format. + */ + @java.lang.Override + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } + } + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 4 [json_name = "format"]; + * @return The bytes for format. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUIRED_FIELD_NUMBER = 5; + private boolean required_ = false; + /** + *
+   * `Required` indicates if the header is optional
+   * 
+ * + * bool required = 5 [json_name = "required"]; + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (type_ != grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNKNOWN.getNumber()) { + output.writeEnum(3, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, format_); + } + if (required_ != false) { + output.writeBool(5, required_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (type_ != grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, format_); + } + if (required_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, required_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter other = (grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (type_ != other.type_) return false; + if (!getFormat() + .equals(other.getFormat())) return false; + if (getRequired() + != other.getRequired()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + hash = (37 * hash) + REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRequired()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `HeaderParameter` a HTTP header parameter.
+   * See: https://swagger.io/specification/v2/#parameter-object
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.class, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + type_ = 0; + format_ = ""; + required_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter build() { + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result = new grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.required_ = required_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getFormat().isEmpty()) { + format_ = other.format_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getRequired() != false) { + setRequired(other.getRequired()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + type_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + format_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + required_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType() { + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type result = grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.forNumber(type_); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNRECOGNIZED : result; + } + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000004); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object format_ = ""; + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @return The format. + */ + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @return The bytes for format. + */ + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + format_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @return This builder for chaining. + */ + public Builder clearFormat() { + format_ = getDefaultInstance().getFormat(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @param value The bytes for format to set. + * @return This builder for chaining. + */ + public Builder setFormatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + format_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean required_ ; + /** + *
+     * `Required` indicates if the header is optional
+     * 
+ * + * bool required = 5 [json_name = "required"]; + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + /** + *
+     * `Required` indicates if the header is optional
+     * 
+ * + * bool required = 5 [json_name = "required"]; + * @param value The required to set. + * @return This builder for chaining. + */ + public Builder setRequired(boolean value) { + + required_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * `Required` indicates if the header is optional
+     * 
+ * + * bool required = 5 [json_name = "required"]; + * @return This builder for chaining. + */ + public Builder clearRequired() { + bitField0_ = (bitField0_ & ~0x00000010); + required_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + private static final grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeaderParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java new file mode 100644 index 00000000..929d62ee --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java @@ -0,0 +1,101 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface HeaderParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `Name` is the header name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * `Name` is the header name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * See: https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * See: https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The type. + */ + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType(); + + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 4 [json_name = "format"]; + * @return The format. + */ + java.lang.String getFormat(); + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 4 [json_name = "format"]; + * @return The bytes for format. + */ + com.google.protobuf.ByteString + getFormatBytes(); + + /** + *
+   * `Required` indicates if the header is optional
+   * 
+ * + * bool required = 5 [json_name = "required"]; + * @return The required. + */ + boolean getRequired(); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Info.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Info.java new file mode 100644 index 00000000..5b63cd8d --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Info.java @@ -0,0 +1,1980 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Info` is a representation of OpenAPI v2 specification's Info object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
+ *
+ * Example:
+ *
+ *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ *    info: {
+ *      title: "Echo API";
+ *      version: "1.0";
+ *      description: "";
+ *      contact: {
+ *        name: "gRPC-Gateway project";
+ *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ *        email: "none@example.com";
+ *      };
+ *      license: {
+ *        name: "BSD 3-Clause License";
+ *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+ *      };
+ *    };
+ *    ...
+ *  };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Info} + */ +public final class Info extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Info) + InfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use Info.newBuilder() to construct. + private Info(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Info() { + title_ = ""; + description_ = ""; + termsOfService_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Info(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Info.class, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder.class); + } + + private int bitField0_; + public static final int TITLE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The title of the application.
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The title of the application.
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description of the application. GFM syntax can be used for rich
+   * text representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description of the application. GFM syntax can be used for rich
+   * text representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERMS_OF_SERVICE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object termsOfService_ = ""; + /** + *
+   * The Terms of Service for the API.
+   * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The termsOfService. + */ + @java.lang.Override + public java.lang.String getTermsOfService() { + java.lang.Object ref = termsOfService_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + termsOfService_ = s; + return s; + } + } + /** + *
+   * The Terms of Service for the API.
+   * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The bytes for termsOfService. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTermsOfServiceBytes() { + java.lang.Object ref = termsOfService_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + termsOfService_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTACT_FIELD_NUMBER = 4; + private grpc.gateway.protoc_gen_openapiv2.options.Contact contact_; + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return Whether the contact field is set. + */ + @java.lang.Override + public boolean hasContact() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return The contact. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Contact getContact() { + return contact_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; + } + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder() { + return contact_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; + } + + public static final int LICENSE_FIELD_NUMBER = 5; + private grpc.gateway.protoc_gen_openapiv2.options.License license_; + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return Whether the license field is set. + */ + @java.lang.Override + public boolean hasLicense() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return The license. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.License getLicense() { + return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; + } + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder() { + return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; + } + + public static final int VERSION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * Provides the version of the application API (not to be confused
+   * with the specification version).
+   * 
+ * + * string version = 6 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Provides the version of the application API (not to be confused
+   * with the specification version).
+   * 
+ * + * string version = 6 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTENSIONS_FIELD_NUMBER = 7; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(termsOfService_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, termsOfService_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getContact()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getLicense()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, version_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 7); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(termsOfService_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, termsOfService_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getContact()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLicense()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, version_); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Info)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Info other = (grpc.gateway.protoc_gen_openapiv2.options.Info) obj; + + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getTermsOfService() + .equals(other.getTermsOfService())) return false; + if (hasContact() != other.hasContact()) return false; + if (hasContact()) { + if (!getContact() + .equals(other.getContact())) return false; + } + if (hasLicense() != other.hasLicense()) return false; + if (hasLicense()) { + if (!getLicense() + .equals(other.getLicense())) return false; + } + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TERMS_OF_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getTermsOfService().hashCode(); + if (hasContact()) { + hash = (37 * hash) + CONTACT_FIELD_NUMBER; + hash = (53 * hash) + getContact().hashCode(); + } + if (hasLicense()) { + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Info prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Info` is a representation of OpenAPI v2 specification's Info object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
+   *
+   * Example:
+   *
+   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   *    info: {
+   *      title: "Echo API";
+   *      version: "1.0";
+   *      description: "";
+   *      contact: {
+   *        name: "gRPC-Gateway project";
+   *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
+   *        email: "none@example.com";
+   *      };
+   *      license: {
+   *        name: "BSD 3-Clause License";
+   *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+   *      };
+   *    };
+   *    ...
+   *  };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Info} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Info) + grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Info.class, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Info.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getContactFieldBuilder(); + getLicenseFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + description_ = ""; + termsOfService_ = ""; + contact_ = null; + if (contactBuilder_ != null) { + contactBuilder_.dispose(); + contactBuilder_ = null; + } + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + version_ = ""; + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Info build() { + grpc.gateway.protoc_gen_openapiv2.options.Info result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Info buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Info result = new grpc.gateway.protoc_gen_openapiv2.options.Info(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Info result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.termsOfService_ = termsOfService_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.contact_ = contactBuilder_ == null + ? contact_ + : contactBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.license_ = licenseBuilder_ == null + ? license_ + : licenseBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Info) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Info)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Info other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTermsOfService().isEmpty()) { + termsOfService_ = other.termsOfService_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasContact()) { + mergeContact(other.getContact()); + } + if (other.hasLicense()) { + mergeLicense(other.getLicense()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000040; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + termsOfService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getContactFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getLicenseFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object termsOfService_ = ""; + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The termsOfService. + */ + public java.lang.String getTermsOfService() { + java.lang.Object ref = termsOfService_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + termsOfService_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The bytes for termsOfService. + */ + public com.google.protobuf.ByteString + getTermsOfServiceBytes() { + java.lang.Object ref = termsOfService_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + termsOfService_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @param value The termsOfService to set. + * @return This builder for chaining. + */ + public Builder setTermsOfService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + termsOfService_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return This builder for chaining. + */ + public Builder clearTermsOfService() { + termsOfService_ = getDefaultInstance().getTermsOfService(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @param value The bytes for termsOfService to set. + * @return This builder for chaining. + */ + public Builder setTermsOfServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + termsOfService_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private grpc.gateway.protoc_gen_openapiv2.options.Contact contact_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Contact, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder> contactBuilder_; + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return Whether the contact field is set. + */ + public boolean hasContact() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return The contact. + */ + public grpc.gateway.protoc_gen_openapiv2.options.Contact getContact() { + if (contactBuilder_ == null) { + return contact_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; + } else { + return contactBuilder_.getMessage(); + } + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public Builder setContact(grpc.gateway.protoc_gen_openapiv2.options.Contact value) { + if (contactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contact_ = value; + } else { + contactBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public Builder setContact( + grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder builderForValue) { + if (contactBuilder_ == null) { + contact_ = builderForValue.build(); + } else { + contactBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public Builder mergeContact(grpc.gateway.protoc_gen_openapiv2.options.Contact value) { + if (contactBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + contact_ != null && + contact_ != grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance()) { + getContactBuilder().mergeFrom(value); + } else { + contact_ = value; + } + } else { + contactBuilder_.mergeFrom(value); + } + if (contact_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public Builder clearContact() { + bitField0_ = (bitField0_ & ~0x00000008); + contact_ = null; + if (contactBuilder_ != null) { + contactBuilder_.dispose(); + contactBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder getContactBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getContactFieldBuilder().getBuilder(); + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder() { + if (contactBuilder_ != null) { + return contactBuilder_.getMessageOrBuilder(); + } else { + return contact_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; + } + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Contact, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder> + getContactFieldBuilder() { + if (contactBuilder_ == null) { + contactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Contact, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder>( + getContact(), + getParentForChildren(), + isClean()); + contact_ = null; + } + return contactBuilder_; + } + + private grpc.gateway.protoc_gen_openapiv2.options.License license_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.License, grpc.gateway.protoc_gen_openapiv2.options.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder> licenseBuilder_; + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return Whether the license field is set. + */ + public boolean hasLicense() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return The license. + */ + public grpc.gateway.protoc_gen_openapiv2.options.License getLicense() { + if (licenseBuilder_ == null) { + return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; + } else { + return licenseBuilder_.getMessage(); + } + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public Builder setLicense(grpc.gateway.protoc_gen_openapiv2.options.License value) { + if (licenseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + license_ = value; + } else { + licenseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public Builder setLicense( + grpc.gateway.protoc_gen_openapiv2.options.License.Builder builderForValue) { + if (licenseBuilder_ == null) { + license_ = builderForValue.build(); + } else { + licenseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public Builder mergeLicense(grpc.gateway.protoc_gen_openapiv2.options.License value) { + if (licenseBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + license_ != null && + license_ != grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance()) { + getLicenseBuilder().mergeFrom(value); + } else { + license_ = value; + } + } else { + licenseBuilder_.mergeFrom(value); + } + if (license_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public Builder clearLicense() { + bitField0_ = (bitField0_ & ~0x00000010); + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.License.Builder getLicenseBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLicenseFieldBuilder().getBuilder(); + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder() { + if (licenseBuilder_ != null) { + return licenseBuilder_.getMessageOrBuilder(); + } else { + return license_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; + } + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.License, grpc.gateway.protoc_gen_openapiv2.options.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder> + getLicenseFieldBuilder() { + if (licenseBuilder_ == null) { + licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.License, grpc.gateway.protoc_gen_openapiv2.options.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder>( + getLicense(), + getParentForChildren(), + isClean()); + license_ = null; + } + return licenseBuilder_; + } + + private java.lang.Object version_ = ""; + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000040; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000040; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000040; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Info) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Info) + private static final grpc.gateway.protoc_gen_openapiv2.options.Info DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Info(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Info parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java new file mode 100644 index 00000000..592bd4d4 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java @@ -0,0 +1,212 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface InfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Info) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The title of the application.
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The title of the application.
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * A short description of the application. GFM syntax can be used for rich
+   * text representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description of the application. GFM syntax can be used for rich
+   * text representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The Terms of Service for the API.
+   * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The termsOfService. + */ + java.lang.String getTermsOfService(); + /** + *
+   * The Terms of Service for the API.
+   * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The bytes for termsOfService. + */ + com.google.protobuf.ByteString + getTermsOfServiceBytes(); + + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return Whether the contact field is set. + */ + boolean hasContact(); + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return The contact. + */ + grpc.gateway.protoc_gen_openapiv2.options.Contact getContact(); + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder(); + + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return Whether the license field is set. + */ + boolean hasLicense(); + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return The license. + */ + grpc.gateway.protoc_gen_openapiv2.options.License getLicense(); + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder(); + + /** + *
+   * Provides the version of the application API (not to be confused
+   * with the specification version).
+   * 
+ * + * string version = 6 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Provides the version of the application API (not to be confused
+   * with the specification version).
+   * 
+ * + * string version = 6 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java new file mode 100644 index 00000000..9f6b6c3e --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java @@ -0,0 +1,4860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `JSONSchema` represents properties from JSON Schema taken, and as used, in
+ * the OpenAPI v2 spec.
+ *
+ * This includes changes made by OpenAPI v2.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+ *
+ * See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
+ * https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
+ *
+ * Example:
+ *
+ *  message SimpleMessage {
+ *    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
+ *      json_schema: {
+ *        title: "SimpleMessage"
+ *        description: "A simple message."
+ *        required: ["id"]
+ *      }
+ *    };
+ *
+ *    // Id represents the message identifier.
+ *    string id = 1; [
+ *        (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ *          description: "The unique identifier of the simple message."
+ *        }];
+ *  }
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ +public final class JSONSchema extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + JSONSchemaOrBuilder { +private static final long serialVersionUID = 0L; + // Use JSONSchema.newBuilder() to construct. + private JSONSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JSONSchema() { + ref_ = ""; + title_ = ""; + description_ = ""; + default_ = ""; + example_ = ""; + pattern_ = ""; + required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = java.util.Collections.emptyList(); + format_ = ""; + enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JSONSchema(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 48: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder.class); + } + + /** + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes} + */ + public enum JSONSchemaSimpleTypes + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * ARRAY = 1; + */ + ARRAY(1), + /** + * BOOLEAN = 2; + */ + BOOLEAN(2), + /** + * INTEGER = 3; + */ + INTEGER(3), + /** + * NULL = 4; + */ + NULL(4), + /** + * NUMBER = 5; + */ + NUMBER(5), + /** + * OBJECT = 6; + */ + OBJECT(6), + /** + * STRING = 7; + */ + STRING(7), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * ARRAY = 1; + */ + public static final int ARRAY_VALUE = 1; + /** + * BOOLEAN = 2; + */ + public static final int BOOLEAN_VALUE = 2; + /** + * INTEGER = 3; + */ + public static final int INTEGER_VALUE = 3; + /** + * NULL = 4; + */ + public static final int NULL_VALUE = 4; + /** + * NUMBER = 5; + */ + public static final int NUMBER_VALUE = 5; + /** + * OBJECT = 6; + */ + public static final int OBJECT_VALUE = 6; + /** + * STRING = 7; + */ + public static final int STRING_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JSONSchemaSimpleTypes valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JSONSchemaSimpleTypes forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return ARRAY; + case 2: return BOOLEAN; + case 3: return INTEGER; + case 4: return NULL; + case 5: return NUMBER; + case 6: return OBJECT; + case 7: return STRING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + JSONSchemaSimpleTypes> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JSONSchemaSimpleTypes findValueByNumber(int number) { + return JSONSchemaSimpleTypes.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDescriptor().getEnumTypes().get(0); + } + + private static final JSONSchemaSimpleTypes[] VALUES = values(); + + public static JSONSchemaSimpleTypes valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JSONSchemaSimpleTypes(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes) + } + + public interface FieldConfigurationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Alternative parameter name when used as path parameter. If set, this will
+     * be used as the complete parameter name when this field is used as a path
+     * parameter. Use this to avoid having auto generated path parameter names
+     * for overlapping paths.
+     * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The pathParamName. + */ + java.lang.String getPathParamName(); + /** + *
+     * Alternative parameter name when used as path parameter. If set, this will
+     * be used as the complete parameter name when this field is used as a path
+     * parameter. Use this to avoid having auto generated path parameter names
+     * for overlapping paths.
+     * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The bytes for pathParamName. + */ + com.google.protobuf.ByteString + getPathParamNameBytes(); + } + /** + *
+   * 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
+   * These properties are not defined by OpenAPIv2, but they are used to control the generation.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ + public static final class FieldConfiguration extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + FieldConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + // Use FieldConfiguration.newBuilder() to construct. + private FieldConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FieldConfiguration() { + pathParamName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FieldConfiguration(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.class, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder.class); + } + + public static final int PATH_PARAM_NAME_FIELD_NUMBER = 47; + @SuppressWarnings("serial") + private volatile java.lang.Object pathParamName_ = ""; + /** + *
+     * Alternative parameter name when used as path parameter. If set, this will
+     * be used as the complete parameter name when this field is used as a path
+     * parameter. Use this to avoid having auto generated path parameter names
+     * for overlapping paths.
+     * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The pathParamName. + */ + @java.lang.Override + public java.lang.String getPathParamName() { + java.lang.Object ref = pathParamName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pathParamName_ = s; + return s; + } + } + /** + *
+     * Alternative parameter name when used as path parameter. If set, this will
+     * be used as the complete parameter name when this field is used as a path
+     * parameter. Use this to avoid having auto generated path parameter names
+     * for overlapping paths.
+     * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The bytes for pathParamName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathParamNameBytes() { + java.lang.Object ref = pathParamName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pathParamName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pathParamName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 47, pathParamName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pathParamName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(47, pathParamName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration other = (grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) obj; + + if (!getPathParamName() + .equals(other.getPathParamName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_PARAM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPathParamName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
+     * These properties are not defined by OpenAPIv2, but they are used to control the generation.
+     * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.class, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pathParamName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration build() { + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result = new grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pathParamName_ = pathParamName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance()) return this; + if (!other.getPathParamName().isEmpty()) { + pathParamName_ = other.pathParamName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 378: { + pathParamName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 378 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object pathParamName_ = ""; + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The pathParamName. + */ + public java.lang.String getPathParamName() { + java.lang.Object ref = pathParamName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pathParamName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The bytes for pathParamName. + */ + public com.google.protobuf.ByteString + getPathParamNameBytes() { + java.lang.Object ref = pathParamName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pathParamName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @param value The pathParamName to set. + * @return This builder for chaining. + */ + public Builder setPathParamName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pathParamName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return This builder for chaining. + */ + public Builder clearPathParamName() { + pathParamName_ = getDefaultInstance().getPathParamName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @param value The bytes for pathParamName to set. + * @return This builder for chaining. + */ + public Builder setPathParamNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pathParamName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + private static final grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldConfiguration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int REF_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object ref_ = ""; + /** + *
+   * Ref is used to define an external reference to include in the message.
+   * This could be a fully qualified proto message reference, and that type must
+   * be imported into the protofile. If no message is identified, the Ref will
+   * be used verbatim in the output.
+   * For example:
+   *  `ref: ".google.protobuf.Timestamp"`.
+   * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The ref. + */ + @java.lang.Override + public java.lang.String getRef() { + java.lang.Object ref = ref_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ref_ = s; + return s; + } + } + /** + *
+   * Ref is used to define an external reference to include in the message.
+   * This could be a fully qualified proto message reference, and that type must
+   * be imported into the protofile. If no message is identified, the Ref will
+   * be used verbatim in the output.
+   * For example:
+   *  `ref: ".google.protobuf.Timestamp"`.
+   * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The bytes for ref. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefBytes() { + java.lang.Object ref = ref_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ref_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The title of the schema.
+   * 
+ * + * string title = 5 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The title of the schema.
+   * 
+ * + * string title = 5 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description of the schema.
+   * 
+ * + * string description = 6 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description of the schema.
+   * 
+ * + * string description = 6 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object default_ = ""; + /** + * string default = 7 [json_name = "default"]; + * @return The default. + */ + @java.lang.Override + public java.lang.String getDefault() { + java.lang.Object ref = default_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + default_ = s; + return s; + } + } + /** + * string default = 7 [json_name = "default"]; + * @return The bytes for default. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultBytes() { + java.lang.Object ref = default_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + default_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_ONLY_FIELD_NUMBER = 8; + private boolean readOnly_ = false; + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + + public static final int EXAMPLE_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object example_ = ""; + /** + *
+   * A free-form property to include a JSON example of this field. This is copied
+   * verbatim to the output swagger.json. Quotes must be escaped.
+   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * string example = 9 [json_name = "example"]; + * @return The example. + */ + @java.lang.Override + public java.lang.String getExample() { + java.lang.Object ref = example_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + example_ = s; + return s; + } + } + /** + *
+   * A free-form property to include a JSON example of this field. This is copied
+   * verbatim to the output swagger.json. Quotes must be escaped.
+   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * string example = 9 [json_name = "example"]; + * @return The bytes for example. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExampleBytes() { + java.lang.Object ref = example_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + example_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MULTIPLE_OF_FIELD_NUMBER = 10; + private double multipleOf_ = 0D; + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @return The multipleOf. + */ + @java.lang.Override + public double getMultipleOf() { + return multipleOf_; + } + + public static final int MAXIMUM_FIELD_NUMBER = 11; + private double maximum_ = 0D; + /** + *
+   * Maximum represents an inclusive upper limit for a numeric instance. The
+   * value of MUST be a number,
+   * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @return The maximum. + */ + @java.lang.Override + public double getMaximum() { + return maximum_; + } + + public static final int EXCLUSIVE_MAXIMUM_FIELD_NUMBER = 12; + private boolean exclusiveMaximum_ = false; + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @return The exclusiveMaximum. + */ + @java.lang.Override + public boolean getExclusiveMaximum() { + return exclusiveMaximum_; + } + + public static final int MINIMUM_FIELD_NUMBER = 13; + private double minimum_ = 0D; + /** + *
+   * minimum represents an inclusive lower limit for a numeric instance. The
+   * value of MUST be a number,
+   * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @return The minimum. + */ + @java.lang.Override + public double getMinimum() { + return minimum_; + } + + public static final int EXCLUSIVE_MINIMUM_FIELD_NUMBER = 14; + private boolean exclusiveMinimum_ = false; + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @return The exclusiveMinimum. + */ + @java.lang.Override + public boolean getExclusiveMinimum() { + return exclusiveMinimum_; + } + + public static final int MAX_LENGTH_FIELD_NUMBER = 15; + private long maxLength_ = 0L; + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @return The maxLength. + */ + @java.lang.Override + public long getMaxLength() { + return maxLength_; + } + + public static final int MIN_LENGTH_FIELD_NUMBER = 16; + private long minLength_ = 0L; + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @return The minLength. + */ + @java.lang.Override + public long getMinLength() { + return minLength_; + } + + public static final int PATTERN_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private volatile java.lang.Object pattern_ = ""; + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The pattern. + */ + @java.lang.Override + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MAX_ITEMS_FIELD_NUMBER = 20; + private long maxItems_ = 0L; + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @return The maxItems. + */ + @java.lang.Override + public long getMaxItems() { + return maxItems_; + } + + public static final int MIN_ITEMS_FIELD_NUMBER = 21; + private long minItems_ = 0L; + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @return The minItems. + */ + @java.lang.Override + public long getMinItems() { + return minItems_; + } + + public static final int UNIQUE_ITEMS_FIELD_NUMBER = 22; + private boolean uniqueItems_ = false; + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @return The uniqueItems. + */ + @java.lang.Override + public boolean getUniqueItems() { + return uniqueItems_; + } + + public static final int MAX_PROPERTIES_FIELD_NUMBER = 24; + private long maxProperties_ = 0L; + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @return The maxProperties. + */ + @java.lang.Override + public long getMaxProperties() { + return maxProperties_; + } + + public static final int MIN_PROPERTIES_FIELD_NUMBER = 25; + private long minProperties_ = 0L; + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @return The minProperties. + */ + @java.lang.Override + public long getMinProperties() { + return minProperties_; + } + + public static final int REQUIRED_FIELD_NUMBER = 26; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string required = 26 [json_name = "required"]; + * @return A list containing the required. + */ + public com.google.protobuf.ProtocolStringList + getRequiredList() { + return required_; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @return The count of required. + */ + public int getRequiredCount() { + return required_.size(); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the element to return. + * @return The required at the given index. + */ + public java.lang.String getRequired(int index) { + return required_.get(index); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the value to return. + * @return The bytes of the required at the given index. + */ + public com.google.protobuf.ByteString + getRequiredBytes(int index) { + return required_.getByteString(index); + } + + public static final int ARRAY_FIELD_NUMBER = 34; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return A list containing the array. + */ + public com.google.protobuf.ProtocolStringList + getArrayList() { + return array_; + } + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return The count of array. + */ + public int getArrayCount() { + return array_.size(); + } + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the element to return. + * @return The array at the given index. + */ + public java.lang.String getArray(int index) { + return array_.get(index); + } + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the value to return. + * @return The bytes of the array at the given index. + */ + public com.google.protobuf.ByteString + getArrayBytes(int index) { + return array_.getByteString(index); + } + + public static final int TYPE_FIELD_NUMBER = 35; + @SuppressWarnings("serial") + private java.util.List type_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes> type_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>() { + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes convert(java.lang.Integer from) { + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes result = grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes.forNumber(from); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes.UNRECOGNIZED : result; + } + }; + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the type. + */ + @java.lang.Override + public java.util.List getTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>(type_, type_converter_); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return The count of type. + */ + @java.lang.Override + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the element to return. + * @return The type at the given index. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index) { + return type_converter_.convert(type_.get(index)); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the enum numeric values on the wire for type. + */ + @java.lang.Override + public java.util.List + getTypeValueList() { + return type_; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of type at the given index. + */ + @java.lang.Override + public int getTypeValue(int index) { + return type_.get(index); + } + private int typeMemoizedSerializedSize; + + public static final int FORMAT_FIELD_NUMBER = 36; + @SuppressWarnings("serial") + private volatile java.lang.Object format_ = ""; + /** + *
+   * `Format`
+   * 
+ * + * string format = 36 [json_name = "format"]; + * @return The format. + */ + @java.lang.Override + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } + } + /** + *
+   * `Format`
+   * 
+ * + * string format = 36 [json_name = "format"]; + * @return The bytes for format. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENUM_FIELD_NUMBER = 46; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return A list containing the enum. + */ + public com.google.protobuf.ProtocolStringList + getEnumList() { + return enum_; + } + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return The count of enum. + */ + public int getEnumCount() { + return enum_.size(); + } + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the element to return. + * @return The enum at the given index. + */ + public java.lang.String getEnum(int index) { + return enum_.get(index); + } + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the value to return. + * @return The bytes of the enum at the given index. + */ + public com.google.protobuf.ByteString + getEnumBytes(int index) { + return enum_.getByteString(index); + } + + public static final int FIELD_CONFIGURATION_FIELD_NUMBER = 1001; + private grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration fieldConfiguration_; + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return Whether the fieldConfiguration field is set. + */ + @java.lang.Override + public boolean hasFieldConfiguration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return The fieldConfiguration. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration() { + return fieldConfiguration_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; + } + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder() { + return fieldConfiguration_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 48; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ref_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ref_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(default_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, default_); + } + if (readOnly_ != false) { + output.writeBool(8, readOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(example_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, example_); + } + if (java.lang.Double.doubleToRawLongBits(multipleOf_) != 0) { + output.writeDouble(10, multipleOf_); + } + if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { + output.writeDouble(11, maximum_); + } + if (exclusiveMaximum_ != false) { + output.writeBool(12, exclusiveMaximum_); + } + if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { + output.writeDouble(13, minimum_); + } + if (exclusiveMinimum_ != false) { + output.writeBool(14, exclusiveMinimum_); + } + if (maxLength_ != 0L) { + output.writeUInt64(15, maxLength_); + } + if (minLength_ != 0L) { + output.writeUInt64(16, minLength_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, pattern_); + } + if (maxItems_ != 0L) { + output.writeUInt64(20, maxItems_); + } + if (minItems_ != 0L) { + output.writeUInt64(21, minItems_); + } + if (uniqueItems_ != false) { + output.writeBool(22, uniqueItems_); + } + if (maxProperties_ != 0L) { + output.writeUInt64(24, maxProperties_); + } + if (minProperties_ != 0L) { + output.writeUInt64(25, minProperties_); + } + for (int i = 0; i < required_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, required_.getRaw(i)); + } + for (int i = 0; i < array_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 34, array_.getRaw(i)); + } + if (getTypeList().size() > 0) { + output.writeUInt32NoTag(282); + output.writeUInt32NoTag(typeMemoizedSerializedSize); + } + for (int i = 0; i < type_.size(); i++) { + output.writeEnumNoTag(type_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 36, format_); + } + for (int i = 0; i < enum_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 46, enum_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 48); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1001, getFieldConfiguration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ref_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ref_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(default_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, default_); + } + if (readOnly_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, readOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(example_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, example_); + } + if (java.lang.Double.doubleToRawLongBits(multipleOf_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(10, multipleOf_); + } + if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(11, maximum_); + } + if (exclusiveMaximum_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, exclusiveMaximum_); + } + if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(13, minimum_); + } + if (exclusiveMinimum_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(14, exclusiveMinimum_); + } + if (maxLength_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(15, maxLength_); + } + if (minLength_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(16, minLength_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, pattern_); + } + if (maxItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(20, maxItems_); + } + if (minItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(21, minItems_); + } + if (uniqueItems_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(22, uniqueItems_); + } + if (maxProperties_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(24, maxProperties_); + } + if (minProperties_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(25, minProperties_); + } + { + int dataSize = 0; + for (int i = 0; i < required_.size(); i++) { + dataSize += computeStringSizeNoTag(required_.getRaw(i)); + } + size += dataSize; + size += 2 * getRequiredList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < array_.size(); i++) { + dataSize += computeStringSizeNoTag(array_.getRaw(i)); + } + size += dataSize; + size += 2 * getArrayList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < type_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(type_.get(i)); + } + size += dataSize; + if (!getTypeList().isEmpty()) { size += 2; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }typeMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, format_); + } + { + int dataSize = 0; + for (int i = 0; i < enum_.size(); i++) { + dataSize += computeStringSizeNoTag(enum_.getRaw(i)); + } + size += dataSize; + size += 2 * getEnumList().size(); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(48, extensions__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1001, getFieldConfiguration()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema other = (grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) obj; + + if (!getRef() + .equals(other.getRef())) return false; + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getDefault() + .equals(other.getDefault())) return false; + if (getReadOnly() + != other.getReadOnly()) return false; + if (!getExample() + .equals(other.getExample())) return false; + if (java.lang.Double.doubleToLongBits(getMultipleOf()) + != java.lang.Double.doubleToLongBits( + other.getMultipleOf())) return false; + if (java.lang.Double.doubleToLongBits(getMaximum()) + != java.lang.Double.doubleToLongBits( + other.getMaximum())) return false; + if (getExclusiveMaximum() + != other.getExclusiveMaximum()) return false; + if (java.lang.Double.doubleToLongBits(getMinimum()) + != java.lang.Double.doubleToLongBits( + other.getMinimum())) return false; + if (getExclusiveMinimum() + != other.getExclusiveMinimum()) return false; + if (getMaxLength() + != other.getMaxLength()) return false; + if (getMinLength() + != other.getMinLength()) return false; + if (!getPattern() + .equals(other.getPattern())) return false; + if (getMaxItems() + != other.getMaxItems()) return false; + if (getMinItems() + != other.getMinItems()) return false; + if (getUniqueItems() + != other.getUniqueItems()) return false; + if (getMaxProperties() + != other.getMaxProperties()) return false; + if (getMinProperties() + != other.getMinProperties()) return false; + if (!getRequiredList() + .equals(other.getRequiredList())) return false; + if (!getArrayList() + .equals(other.getArrayList())) return false; + if (!type_.equals(other.type_)) return false; + if (!getFormat() + .equals(other.getFormat())) return false; + if (!getEnumList() + .equals(other.getEnumList())) return false; + if (hasFieldConfiguration() != other.hasFieldConfiguration()) return false; + if (hasFieldConfiguration()) { + if (!getFieldConfiguration() + .equals(other.getFieldConfiguration())) return false; + } + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REF_FIELD_NUMBER; + hash = (53 * hash) + getRef().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + getDefault().hashCode(); + hash = (37 * hash) + READ_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReadOnly()); + hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getExample().hashCode(); + hash = (37 * hash) + MULTIPLE_OF_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMultipleOf())); + hash = (37 * hash) + MAXIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaximum())); + hash = (37 * hash) + EXCLUSIVE_MAXIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExclusiveMaximum()); + hash = (37 * hash) + MINIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinimum())); + hash = (37 * hash) + EXCLUSIVE_MINIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExclusiveMinimum()); + hash = (37 * hash) + MAX_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxLength()); + hash = (37 * hash) + MIN_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinLength()); + hash = (37 * hash) + PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getPattern().hashCode(); + hash = (37 * hash) + MAX_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxItems()); + hash = (37 * hash) + MIN_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinItems()); + hash = (37 * hash) + UNIQUE_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUniqueItems()); + hash = (37 * hash) + MAX_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxProperties()); + hash = (37 * hash) + MIN_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinProperties()); + if (getRequiredCount() > 0) { + hash = (37 * hash) + REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + getRequiredList().hashCode(); + } + if (getArrayCount() > 0) { + hash = (37 * hash) + ARRAY_FIELD_NUMBER; + hash = (53 * hash) + getArrayList().hashCode(); + } + if (getTypeCount() > 0) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_.hashCode(); + } + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + if (getEnumCount() > 0) { + hash = (37 * hash) + ENUM_FIELD_NUMBER; + hash = (53 * hash) + getEnumList().hashCode(); + } + if (hasFieldConfiguration()) { + hash = (37 * hash) + FIELD_CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getFieldConfiguration().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `JSONSchema` represents properties from JSON Schema taken, and as used, in
+   * the OpenAPI v2 spec.
+   *
+   * This includes changes made by OpenAPI v2.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   *
+   * See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
+   * https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
+   *
+   * Example:
+   *
+   *  message SimpleMessage {
+   *    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
+   *      json_schema: {
+   *        title: "SimpleMessage"
+   *        description: "A simple message."
+   *        required: ["id"]
+   *      }
+   *    };
+   *
+   *    // Id represents the message identifier.
+   *    string id = 1; [
+   *        (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+   *          description: "The unique identifier of the simple message."
+   *        }];
+   *  }
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 48: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 48: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFieldConfigurationFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ref_ = ""; + title_ = ""; + description_ = ""; + default_ = ""; + readOnly_ = false; + example_ = ""; + multipleOf_ = 0D; + maximum_ = 0D; + exclusiveMaximum_ = false; + minimum_ = 0D; + exclusiveMinimum_ = false; + maxLength_ = 0L; + minLength_ = 0L; + pattern_ = ""; + maxItems_ = 0L; + minItems_ = 0L; + uniqueItems_ = false; + maxProperties_ = 0L; + minProperties_ = 0L; + required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00200000); + format_ = ""; + enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + fieldConfiguration_ = null; + if (fieldConfigurationBuilder_ != null) { + fieldConfigurationBuilder_.dispose(); + fieldConfigurationBuilder_ = null; + } + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema build() { + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result = new grpc.gateway.protoc_gen_openapiv2.options.JSONSchema(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result) { + if (((bitField0_ & 0x00200000) != 0)) { + type_ = java.util.Collections.unmodifiableList(type_); + bitField0_ = (bitField0_ & ~0x00200000); + } + result.type_ = type_; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ref_ = ref_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.default_ = default_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readOnly_ = readOnly_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.example_ = example_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.multipleOf_ = multipleOf_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.maximum_ = maximum_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.exclusiveMaximum_ = exclusiveMaximum_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.minimum_ = minimum_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.exclusiveMinimum_ = exclusiveMinimum_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.maxLength_ = maxLength_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.minLength_ = minLength_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.pattern_ = pattern_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.maxItems_ = maxItems_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.minItems_ = minItems_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.uniqueItems_ = uniqueItems_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.maxProperties_ = maxProperties_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.minProperties_ = minProperties_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + required_.makeImmutable(); + result.required_ = required_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + array_.makeImmutable(); + result.array_ = array_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + enum_.makeImmutable(); + result.enum_ = enum_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x01000000) != 0)) { + result.fieldConfiguration_ = fieldConfigurationBuilder_ == null + ? fieldConfiguration_ + : fieldConfigurationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()) return this; + if (!other.getRef().isEmpty()) { + ref_ = other.ref_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDefault().isEmpty()) { + default_ = other.default_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getReadOnly() != false) { + setReadOnly(other.getReadOnly()); + } + if (!other.getExample().isEmpty()) { + example_ = other.example_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getMultipleOf() != 0D) { + setMultipleOf(other.getMultipleOf()); + } + if (other.getMaximum() != 0D) { + setMaximum(other.getMaximum()); + } + if (other.getExclusiveMaximum() != false) { + setExclusiveMaximum(other.getExclusiveMaximum()); + } + if (other.getMinimum() != 0D) { + setMinimum(other.getMinimum()); + } + if (other.getExclusiveMinimum() != false) { + setExclusiveMinimum(other.getExclusiveMinimum()); + } + if (other.getMaxLength() != 0L) { + setMaxLength(other.getMaxLength()); + } + if (other.getMinLength() != 0L) { + setMinLength(other.getMinLength()); + } + if (!other.getPattern().isEmpty()) { + pattern_ = other.pattern_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getMaxItems() != 0L) { + setMaxItems(other.getMaxItems()); + } + if (other.getMinItems() != 0L) { + setMinItems(other.getMinItems()); + } + if (other.getUniqueItems() != false) { + setUniqueItems(other.getUniqueItems()); + } + if (other.getMaxProperties() != 0L) { + setMaxProperties(other.getMaxProperties()); + } + if (other.getMinProperties() != 0L) { + setMinProperties(other.getMinProperties()); + } + if (!other.required_.isEmpty()) { + if (required_.isEmpty()) { + required_ = other.required_; + bitField0_ |= 0x00080000; + } else { + ensureRequiredIsMutable(); + required_.addAll(other.required_); + } + onChanged(); + } + if (!other.array_.isEmpty()) { + if (array_.isEmpty()) { + array_ = other.array_; + bitField0_ |= 0x00100000; + } else { + ensureArrayIsMutable(); + array_.addAll(other.array_); + } + onChanged(); + } + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00200000); + } else { + ensureTypeIsMutable(); + type_.addAll(other.type_); + } + onChanged(); + } + if (!other.getFormat().isEmpty()) { + format_ = other.format_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (!other.enum_.isEmpty()) { + if (enum_.isEmpty()) { + enum_ = other.enum_; + bitField0_ |= 0x00800000; + } else { + ensureEnumIsMutable(); + enum_.addAll(other.enum_); + } + onChanged(); + } + if (other.hasFieldConfiguration()) { + mergeFieldConfiguration(other.getFieldConfiguration()); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x02000000; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + ref_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 42: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 42 + case 50: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + case 58: { + default_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + case 64: { + readOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 64 + case 74: { + example_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 74 + case 81: { + multipleOf_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 81 + case 89: { + maximum_ = input.readDouble(); + bitField0_ |= 0x00000080; + break; + } // case 89 + case 96: { + exclusiveMaximum_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 96 + case 105: { + minimum_ = input.readDouble(); + bitField0_ |= 0x00000200; + break; + } // case 105 + case 112: { + exclusiveMinimum_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 112 + case 120: { + maxLength_ = input.readUInt64(); + bitField0_ |= 0x00000800; + break; + } // case 120 + case 128: { + minLength_ = input.readUInt64(); + bitField0_ |= 0x00001000; + break; + } // case 128 + case 138: { + pattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 138 + case 160: { + maxItems_ = input.readUInt64(); + bitField0_ |= 0x00004000; + break; + } // case 160 + case 168: { + minItems_ = input.readUInt64(); + bitField0_ |= 0x00008000; + break; + } // case 168 + case 176: { + uniqueItems_ = input.readBool(); + bitField0_ |= 0x00010000; + break; + } // case 176 + case 192: { + maxProperties_ = input.readUInt64(); + bitField0_ |= 0x00020000; + break; + } // case 192 + case 200: { + minProperties_ = input.readUInt64(); + bitField0_ |= 0x00040000; + break; + } // case 200 + case 210: { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequiredIsMutable(); + required_.add(s); + break; + } // case 210 + case 274: { + java.lang.String s = input.readStringRequireUtf8(); + ensureArrayIsMutable(); + array_.add(s); + break; + } // case 274 + case 280: { + int tmpRaw = input.readEnum(); + ensureTypeIsMutable(); + type_.add(tmpRaw); + break; + } // case 280 + case 282: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureTypeIsMutable(); + type_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 282 + case 290: { + format_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 290 + case 370: { + java.lang.String s = input.readStringRequireUtf8(); + ensureEnumIsMutable(); + enum_.add(s); + break; + } // case 370 + case 386: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x02000000; + break; + } // case 386 + case 8010: { + input.readMessage( + getFieldConfigurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 8010 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object ref_ = ""; + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     *  `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The ref. + */ + public java.lang.String getRef() { + java.lang.Object ref = ref_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ref_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     *  `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The bytes for ref. + */ + public com.google.protobuf.ByteString + getRefBytes() { + java.lang.Object ref = ref_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ref_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     *  `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @param value The ref to set. + * @return This builder for chaining. + */ + public Builder setRef( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ref_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     *  `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return This builder for chaining. + */ + public Builder clearRef() { + ref_ = getDefaultInstance().getRef(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     *  `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @param value The bytes for ref to set. + * @return This builder for chaining. + */ + public Builder setRefBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ref_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object default_ = ""; + /** + * string default = 7 [json_name = "default"]; + * @return The default. + */ + public java.lang.String getDefault() { + java.lang.Object ref = default_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + default_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string default = 7 [json_name = "default"]; + * @return The bytes for default. + */ + public com.google.protobuf.ByteString + getDefaultBytes() { + java.lang.Object ref = default_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + default_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string default = 7 [json_name = "default"]; + * @param value The default to set. + * @return This builder for chaining. + */ + public Builder setDefault( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + default_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string default = 7 [json_name = "default"]; + * @return This builder for chaining. + */ + public Builder clearDefault() { + default_ = getDefaultInstance().getDefault(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string default = 7 [json_name = "default"]; + * @param value The bytes for default to set. + * @return This builder for chaining. + */ + public Builder setDefaultBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + default_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean readOnly_ ; + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @param value The readOnly to set. + * @return This builder for chaining. + */ + public Builder setReadOnly(boolean value) { + + readOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @return This builder for chaining. + */ + public Builder clearReadOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + readOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object example_ = ""; + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @return The example. + */ + public java.lang.String getExample() { + java.lang.Object ref = example_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + example_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @return The bytes for example. + */ + public com.google.protobuf.ByteString + getExampleBytes() { + java.lang.Object ref = example_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + example_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @param value The example to set. + * @return This builder for chaining. + */ + public Builder setExample( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + example_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @return This builder for chaining. + */ + public Builder clearExample() { + example_ = getDefaultInstance().getExample(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @param value The bytes for example to set. + * @return This builder for chaining. + */ + public Builder setExampleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + example_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private double multipleOf_ ; + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @return The multipleOf. + */ + @java.lang.Override + public double getMultipleOf() { + return multipleOf_; + } + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @param value The multipleOf to set. + * @return This builder for chaining. + */ + public Builder setMultipleOf(double value) { + + multipleOf_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @return This builder for chaining. + */ + public Builder clearMultipleOf() { + bitField0_ = (bitField0_ & ~0x00000040); + multipleOf_ = 0D; + onChanged(); + return this; + } + + private double maximum_ ; + /** + *
+     * Maximum represents an inclusive upper limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @return The maximum. + */ + @java.lang.Override + public double getMaximum() { + return maximum_; + } + /** + *
+     * Maximum represents an inclusive upper limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @param value The maximum to set. + * @return This builder for chaining. + */ + public Builder setMaximum(double value) { + + maximum_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Maximum represents an inclusive upper limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @return This builder for chaining. + */ + public Builder clearMaximum() { + bitField0_ = (bitField0_ & ~0x00000080); + maximum_ = 0D; + onChanged(); + return this; + } + + private boolean exclusiveMaximum_ ; + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @return The exclusiveMaximum. + */ + @java.lang.Override + public boolean getExclusiveMaximum() { + return exclusiveMaximum_; + } + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @param value The exclusiveMaximum to set. + * @return This builder for chaining. + */ + public Builder setExclusiveMaximum(boolean value) { + + exclusiveMaximum_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @return This builder for chaining. + */ + public Builder clearExclusiveMaximum() { + bitField0_ = (bitField0_ & ~0x00000100); + exclusiveMaximum_ = false; + onChanged(); + return this; + } + + private double minimum_ ; + /** + *
+     * minimum represents an inclusive lower limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @return The minimum. + */ + @java.lang.Override + public double getMinimum() { + return minimum_; + } + /** + *
+     * minimum represents an inclusive lower limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @param value The minimum to set. + * @return This builder for chaining. + */ + public Builder setMinimum(double value) { + + minimum_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * minimum represents an inclusive lower limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @return This builder for chaining. + */ + public Builder clearMinimum() { + bitField0_ = (bitField0_ & ~0x00000200); + minimum_ = 0D; + onChanged(); + return this; + } + + private boolean exclusiveMinimum_ ; + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @return The exclusiveMinimum. + */ + @java.lang.Override + public boolean getExclusiveMinimum() { + return exclusiveMinimum_; + } + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @param value The exclusiveMinimum to set. + * @return This builder for chaining. + */ + public Builder setExclusiveMinimum(boolean value) { + + exclusiveMinimum_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @return This builder for chaining. + */ + public Builder clearExclusiveMinimum() { + bitField0_ = (bitField0_ & ~0x00000400); + exclusiveMinimum_ = false; + onChanged(); + return this; + } + + private long maxLength_ ; + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @return The maxLength. + */ + @java.lang.Override + public long getMaxLength() { + return maxLength_; + } + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @param value The maxLength to set. + * @return This builder for chaining. + */ + public Builder setMaxLength(long value) { + + maxLength_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @return This builder for chaining. + */ + public Builder clearMaxLength() { + bitField0_ = (bitField0_ & ~0x00000800); + maxLength_ = 0L; + onChanged(); + return this; + } + + private long minLength_ ; + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @return The minLength. + */ + @java.lang.Override + public long getMinLength() { + return minLength_; + } + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @param value The minLength to set. + * @return This builder for chaining. + */ + public Builder setMinLength(long value) { + + minLength_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @return This builder for chaining. + */ + public Builder clearMinLength() { + bitField0_ = (bitField0_ & ~0x00001000); + minLength_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object pattern_ = ""; + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The pattern. + */ + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @param value The pattern to set. + * @return This builder for chaining. + */ + public Builder setPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pattern_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @return This builder for chaining. + */ + public Builder clearPattern() { + pattern_ = getDefaultInstance().getPattern(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @param value The bytes for pattern to set. + * @return This builder for chaining. + */ + public Builder setPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pattern_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private long maxItems_ ; + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @return The maxItems. + */ + @java.lang.Override + public long getMaxItems() { + return maxItems_; + } + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @param value The maxItems to set. + * @return This builder for chaining. + */ + public Builder setMaxItems(long value) { + + maxItems_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @return This builder for chaining. + */ + public Builder clearMaxItems() { + bitField0_ = (bitField0_ & ~0x00004000); + maxItems_ = 0L; + onChanged(); + return this; + } + + private long minItems_ ; + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @return The minItems. + */ + @java.lang.Override + public long getMinItems() { + return minItems_; + } + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @param value The minItems to set. + * @return This builder for chaining. + */ + public Builder setMinItems(long value) { + + minItems_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @return This builder for chaining. + */ + public Builder clearMinItems() { + bitField0_ = (bitField0_ & ~0x00008000); + minItems_ = 0L; + onChanged(); + return this; + } + + private boolean uniqueItems_ ; + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @return The uniqueItems. + */ + @java.lang.Override + public boolean getUniqueItems() { + return uniqueItems_; + } + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @param value The uniqueItems to set. + * @return This builder for chaining. + */ + public Builder setUniqueItems(boolean value) { + + uniqueItems_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @return This builder for chaining. + */ + public Builder clearUniqueItems() { + bitField0_ = (bitField0_ & ~0x00010000); + uniqueItems_ = false; + onChanged(); + return this; + } + + private long maxProperties_ ; + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @return The maxProperties. + */ + @java.lang.Override + public long getMaxProperties() { + return maxProperties_; + } + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @param value The maxProperties to set. + * @return This builder for chaining. + */ + public Builder setMaxProperties(long value) { + + maxProperties_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @return This builder for chaining. + */ + public Builder clearMaxProperties() { + bitField0_ = (bitField0_ & ~0x00020000); + maxProperties_ = 0L; + onChanged(); + return this; + } + + private long minProperties_ ; + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @return The minProperties. + */ + @java.lang.Override + public long getMinProperties() { + return minProperties_; + } + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @param value The minProperties to set. + * @return This builder for chaining. + */ + public Builder setMinProperties(long value) { + + minProperties_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @return This builder for chaining. + */ + public Builder clearMinProperties() { + bitField0_ = (bitField0_ & ~0x00040000); + minProperties_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureRequiredIsMutable() { + if (!required_.isModifiable()) { + required_ = new com.google.protobuf.LazyStringArrayList(required_); + } + bitField0_ |= 0x00080000; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @return A list containing the required. + */ + public com.google.protobuf.ProtocolStringList + getRequiredList() { + required_.makeImmutable(); + return required_; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @return The count of required. + */ + public int getRequiredCount() { + return required_.size(); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the element to return. + * @return The required at the given index. + */ + public java.lang.String getRequired(int index) { + return required_.get(index); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the value to return. + * @return The bytes of the required at the given index. + */ + public com.google.protobuf.ByteString + getRequiredBytes(int index) { + return required_.getByteString(index); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index to set the value at. + * @param value The required to set. + * @return This builder for chaining. + */ + public Builder setRequired( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRequiredIsMutable(); + required_.set(index, value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param value The required to add. + * @return This builder for chaining. + */ + public Builder addRequired( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRequiredIsMutable(); + required_.add(value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param values The required to add. + * @return This builder for chaining. + */ + public Builder addAllRequired( + java.lang.Iterable values) { + ensureRequiredIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, required_); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @return This builder for chaining. + */ + public Builder clearRequired() { + required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00080000);; + onChanged(); + return this; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param value The bytes of the required to add. + * @return This builder for chaining. + */ + public Builder addRequiredBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureRequiredIsMutable(); + required_.add(value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureArrayIsMutable() { + if (!array_.isModifiable()) { + array_ = new com.google.protobuf.LazyStringArrayList(array_); + } + bitField0_ |= 0x00100000; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return A list containing the array. + */ + public com.google.protobuf.ProtocolStringList + getArrayList() { + array_.makeImmutable(); + return array_; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return The count of array. + */ + public int getArrayCount() { + return array_.size(); + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the element to return. + * @return The array at the given index. + */ + public java.lang.String getArray(int index) { + return array_.get(index); + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the value to return. + * @return The bytes of the array at the given index. + */ + public com.google.protobuf.ByteString + getArrayBytes(int index) { + return array_.getByteString(index); + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index to set the value at. + * @param value The array to set. + * @return This builder for chaining. + */ + public Builder setArray( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureArrayIsMutable(); + array_.set(index, value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param value The array to add. + * @return This builder for chaining. + */ + public Builder addArray( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureArrayIsMutable(); + array_.add(value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param values The array to add. + * @return This builder for chaining. + */ + public Builder addAllArray( + java.lang.Iterable values) { + ensureArrayIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, array_); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return This builder for chaining. + */ + public Builder clearArray() { + array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00100000);; + onChanged(); + return this; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param value The bytes of the array to add. + * @return This builder for chaining. + */ + public Builder addArrayBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureArrayIsMutable(); + array_.add(value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + private java.util.List type_ = + java.util.Collections.emptyList(); + private void ensureTypeIsMutable() { + if (!((bitField0_ & 0x00200000) != 0)) { + type_ = new java.util.ArrayList(type_); + bitField0_ |= 0x00200000; + } + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the type. + */ + public java.util.List getTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>(type_, type_converter_); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return The count of type. + */ + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the element to return. + * @return The type at the given index. + */ + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index) { + return type_converter_.convert(type_.get(index)); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index to set the value at. + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + int index, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param value The type to add. + * @return This builder for chaining. + */ + public Builder addType(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param values The type to add. + * @return This builder for chaining. + */ + public Builder addAllType( + java.lang.Iterable values) { + ensureTypeIsMutable(); + for (grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value : values) { + type_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the enum numeric values on the wire for type. + */ + public java.util.List + getTypeValueList() { + return java.util.Collections.unmodifiableList(type_); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of type at the given index. + */ + public int getTypeValue(int index) { + return type_.get(index); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue( + int index, int value) { + ensureTypeIsMutable(); + type_.set(index, value); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to add. + * @return This builder for chaining. + */ + public Builder addTypeValue(int value) { + ensureTypeIsMutable(); + type_.add(value); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param values The enum numeric values on the wire for type to add. + * @return This builder for chaining. + */ + public Builder addAllTypeValue( + java.lang.Iterable values) { + ensureTypeIsMutable(); + for (int value : values) { + type_.add(value); + } + onChanged(); + return this; + } + + private java.lang.Object format_ = ""; + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @return The format. + */ + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @return The bytes for format. + */ + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + format_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @return This builder for chaining. + */ + public Builder clearFormat() { + format_ = getDefaultInstance().getFormat(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + return this; + } + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @param value The bytes for format to set. + * @return This builder for chaining. + */ + public Builder setFormatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + format_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureEnumIsMutable() { + if (!enum_.isModifiable()) { + enum_ = new com.google.protobuf.LazyStringArrayList(enum_); + } + bitField0_ |= 0x00800000; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return A list containing the enum. + */ + public com.google.protobuf.ProtocolStringList + getEnumList() { + enum_.makeImmutable(); + return enum_; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return The count of enum. + */ + public int getEnumCount() { + return enum_.size(); + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the element to return. + * @return The enum at the given index. + */ + public java.lang.String getEnum(int index) { + return enum_.get(index); + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the value to return. + * @return The bytes of the enum at the given index. + */ + public com.google.protobuf.ByteString + getEnumBytes(int index) { + return enum_.getByteString(index); + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index to set the value at. + * @param value The enum to set. + * @return This builder for chaining. + */ + public Builder setEnum( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEnumIsMutable(); + enum_.set(index, value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param value The enum to add. + * @return This builder for chaining. + */ + public Builder addEnum( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEnumIsMutable(); + enum_.add(value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param values The enum to add. + * @return This builder for chaining. + */ + public Builder addAllEnum( + java.lang.Iterable values) { + ensureEnumIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, enum_); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return This builder for chaining. + */ + public Builder clearEnum() { + enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000);; + onChanged(); + return this; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param value The bytes of the enum to add. + * @return This builder for chaining. + */ + public Builder addEnumBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureEnumIsMutable(); + enum_.add(value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + private grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration fieldConfiguration_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder> fieldConfigurationBuilder_; + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return Whether the fieldConfiguration field is set. + */ + public boolean hasFieldConfiguration() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return The fieldConfiguration. + */ + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration() { + if (fieldConfigurationBuilder_ == null) { + return fieldConfiguration_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; + } else { + return fieldConfigurationBuilder_.getMessage(); + } + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public Builder setFieldConfiguration(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration value) { + if (fieldConfigurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldConfiguration_ = value; + } else { + fieldConfigurationBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public Builder setFieldConfiguration( + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder builderForValue) { + if (fieldConfigurationBuilder_ == null) { + fieldConfiguration_ = builderForValue.build(); + } else { + fieldConfigurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public Builder mergeFieldConfiguration(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration value) { + if (fieldConfigurationBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) && + fieldConfiguration_ != null && + fieldConfiguration_ != grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance()) { + getFieldConfigurationBuilder().mergeFrom(value); + } else { + fieldConfiguration_ = value; + } + } else { + fieldConfigurationBuilder_.mergeFrom(value); + } + if (fieldConfiguration_ != null) { + bitField0_ |= 0x01000000; + onChanged(); + } + return this; + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public Builder clearFieldConfiguration() { + bitField0_ = (bitField0_ & ~0x01000000); + fieldConfiguration_ = null; + if (fieldConfigurationBuilder_ != null) { + fieldConfigurationBuilder_.dispose(); + fieldConfigurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder getFieldConfigurationBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getFieldConfigurationFieldBuilder().getBuilder(); + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder() { + if (fieldConfigurationBuilder_ != null) { + return fieldConfigurationBuilder_.getMessageOrBuilder(); + } else { + return fieldConfiguration_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; + } + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder> + getFieldConfigurationFieldBuilder() { + if (fieldConfigurationBuilder_ == null) { + fieldConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder>( + getFieldConfiguration(), + getParentForChildren(), + isClean()); + fieldConfiguration_ = null; + } + return fieldConfigurationBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x02000000; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x02000000); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x02000000; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x02000000; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x02000000; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + private static final grpc.gateway.protoc_gen_openapiv2.options.JSONSchema DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.JSONSchema(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JSONSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java new file mode 100644 index 00000000..6d31a1f1 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java @@ -0,0 +1,463 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface JSONSchemaOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Ref is used to define an external reference to include in the message.
+   * This could be a fully qualified proto message reference, and that type must
+   * be imported into the protofile. If no message is identified, the Ref will
+   * be used verbatim in the output.
+   * For example:
+   *  `ref: ".google.protobuf.Timestamp"`.
+   * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The ref. + */ + java.lang.String getRef(); + /** + *
+   * Ref is used to define an external reference to include in the message.
+   * This could be a fully qualified proto message reference, and that type must
+   * be imported into the protofile. If no message is identified, the Ref will
+   * be used verbatim in the output.
+   * For example:
+   *  `ref: ".google.protobuf.Timestamp"`.
+   * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The bytes for ref. + */ + com.google.protobuf.ByteString + getRefBytes(); + + /** + *
+   * The title of the schema.
+   * 
+ * + * string title = 5 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The title of the schema.
+   * 
+ * + * string title = 5 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * A short description of the schema.
+   * 
+ * + * string description = 6 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description of the schema.
+   * 
+ * + * string description = 6 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * string default = 7 [json_name = "default"]; + * @return The default. + */ + java.lang.String getDefault(); + /** + * string default = 7 [json_name = "default"]; + * @return The bytes for default. + */ + com.google.protobuf.ByteString + getDefaultBytes(); + + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @return The readOnly. + */ + boolean getReadOnly(); + + /** + *
+   * A free-form property to include a JSON example of this field. This is copied
+   * verbatim to the output swagger.json. Quotes must be escaped.
+   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * string example = 9 [json_name = "example"]; + * @return The example. + */ + java.lang.String getExample(); + /** + *
+   * A free-form property to include a JSON example of this field. This is copied
+   * verbatim to the output swagger.json. Quotes must be escaped.
+   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * string example = 9 [json_name = "example"]; + * @return The bytes for example. + */ + com.google.protobuf.ByteString + getExampleBytes(); + + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @return The multipleOf. + */ + double getMultipleOf(); + + /** + *
+   * Maximum represents an inclusive upper limit for a numeric instance. The
+   * value of MUST be a number,
+   * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @return The maximum. + */ + double getMaximum(); + + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @return The exclusiveMaximum. + */ + boolean getExclusiveMaximum(); + + /** + *
+   * minimum represents an inclusive lower limit for a numeric instance. The
+   * value of MUST be a number,
+   * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @return The minimum. + */ + double getMinimum(); + + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @return The exclusiveMinimum. + */ + boolean getExclusiveMinimum(); + + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @return The maxLength. + */ + long getMaxLength(); + + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @return The minLength. + */ + long getMinLength(); + + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The pattern. + */ + java.lang.String getPattern(); + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + com.google.protobuf.ByteString + getPatternBytes(); + + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @return The maxItems. + */ + long getMaxItems(); + + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @return The minItems. + */ + long getMinItems(); + + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @return The uniqueItems. + */ + boolean getUniqueItems(); + + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @return The maxProperties. + */ + long getMaxProperties(); + + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @return The minProperties. + */ + long getMinProperties(); + + /** + * repeated string required = 26 [json_name = "required"]; + * @return A list containing the required. + */ + java.util.List + getRequiredList(); + /** + * repeated string required = 26 [json_name = "required"]; + * @return The count of required. + */ + int getRequiredCount(); + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the element to return. + * @return The required at the given index. + */ + java.lang.String getRequired(int index); + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the value to return. + * @return The bytes of the required at the given index. + */ + com.google.protobuf.ByteString + getRequiredBytes(int index); + + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return A list containing the array. + */ + java.util.List + getArrayList(); + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return The count of array. + */ + int getArrayCount(); + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the element to return. + * @return The array at the given index. + */ + java.lang.String getArray(int index); + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the value to return. + * @return The bytes of the array at the given index. + */ + com.google.protobuf.ByteString + getArrayBytes(int index); + + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the type. + */ + java.util.List getTypeList(); + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return The count of type. + */ + int getTypeCount(); + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the element to return. + * @return The type at the given index. + */ + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index); + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the enum numeric values on the wire for type. + */ + java.util.List + getTypeValueList(); + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of type at the given index. + */ + int getTypeValue(int index); + + /** + *
+   * `Format`
+   * 
+ * + * string format = 36 [json_name = "format"]; + * @return The format. + */ + java.lang.String getFormat(); + /** + *
+   * `Format`
+   * 
+ * + * string format = 36 [json_name = "format"]; + * @return The bytes for format. + */ + com.google.protobuf.ByteString + getFormatBytes(); + + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return A list containing the enum. + */ + java.util.List + getEnumList(); + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return The count of enum. + */ + int getEnumCount(); + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the element to return. + * @return The enum at the given index. + */ + java.lang.String getEnum(int index); + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the value to return. + * @return The bytes of the enum at the given index. + */ + com.google.protobuf.ByteString + getEnumBytes(int index); + + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return Whether the fieldConfiguration field is set. + */ + boolean hasFieldConfiguration(); + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return The fieldConfiguration. + */ + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration(); + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/License.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/License.java new file mode 100644 index 00000000..e6ff5258 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/License.java @@ -0,0 +1,774 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `License` is a representation of OpenAPI v2 specification's License object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
+ *
+ * Example:
+ *
+ *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ *    info: {
+ *      ...
+ *      license: {
+ *        name: "BSD 3-Clause License";
+ *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+ *      };
+ *      ...
+ *    };
+ *    ...
+ *  };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License} + */ +public final class License extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.License) + LicenseOrBuilder { +private static final long serialVersionUID = 0L; + // Use License.newBuilder() to construct. + private License(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private License() { + name_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new License(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.License.class, grpc.gateway.protoc_gen_openapiv2.options.License.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The license name used for the API.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The license name used for the API.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * A URL to the license used for the API. MUST be in the format of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * A URL to the license used for the API. MUST be in the format of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.License)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.License other = (grpc.gateway.protoc_gen_openapiv2.options.License) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.License parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.License parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.License prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `License` is a representation of OpenAPI v2 specification's License object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
+   *
+   * Example:
+   *
+   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   *    info: {
+   *      ...
+   *      license: {
+   *        name: "BSD 3-Clause License";
+   *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+   *      };
+   *      ...
+   *    };
+   *    ...
+   *  };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.License) + grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.License.class, grpc.gateway.protoc_gen_openapiv2.options.License.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.License.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + url_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.License build() { + grpc.gateway.protoc_gen_openapiv2.options.License result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.License buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.License result = new grpc.gateway.protoc_gen_openapiv2.options.License(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.License result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.License) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.License)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.License other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.License) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.License) + private static final grpc.gateway.protoc_gen_openapiv2.options.License DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.License(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public License parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java new file mode 100644 index 00000000..a06e2f08 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface LicenseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.License) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The license name used for the API.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The license name used for the API.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A URL to the license used for the API. MUST be in the format of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * A URL to the license used for the API. MUST be in the format of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java new file mode 100644 index 00000000..9ff69825 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java @@ -0,0 +1,605 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public final class Openapiv2Proto { + private Openapiv2Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,protoc-gen-openapiv2/options/openapiv2" + + ".proto\022)grpc.gateway.protoc_gen_openapiv" + + "2.options\032\034google/protobuf/struct.proto\"" + + "\263\010\n\007Swagger\022\030\n\007swagger\030\001 \001(\tR\007swagger\022C\n" + + "\004info\030\002 \001(\0132/.grpc.gateway.protoc_gen_op" + + "enapiv2.options.InfoR\004info\022\022\n\004host\030\003 \001(\t" + + "R\004host\022\033\n\tbase_path\030\004 \001(\tR\010basePath\022K\n\007s" + + "chemes\030\005 \003(\01621.grpc.gateway.protoc_gen_o" + + "penapiv2.options.SchemeR\007schemes\022\032\n\010cons" + + "umes\030\006 \003(\tR\010consumes\022\032\n\010produces\030\007 \003(\tR\010" + + "produces\022_\n\tresponses\030\n \003(\0132A.grpc.gatew" + + "ay.protoc_gen_openapiv2.options.Swagger." + + "ResponsesEntryR\tresponses\022q\n\024security_de" + + "finitions\030\013 \001(\0132>.grpc.gateway.protoc_ge" + + "n_openapiv2.options.SecurityDefinitionsR" + + "\023securityDefinitions\022Z\n\010security\030\014 \003(\0132>" + + ".grpc.gateway.protoc_gen_openapiv2.optio" + + "ns.SecurityRequirementR\010security\022B\n\004tags" + + "\030\r \003(\0132..grpc.gateway.protoc_gen_openapi" + + "v2.options.TagR\004tags\022e\n\rexternal_docs\030\016 " + + "\001(\0132@.grpc.gateway.protoc_gen_openapiv2." + + "options.ExternalDocumentationR\014externalD" + + "ocs\022b\n\nextensions\030\017 \003(\0132B.grpc.gateway.p" + + "rotoc_gen_openapiv2.options.Swagger.Exte" + + "nsionsEntryR\nextensions\032q\n\016ResponsesEntr" + + "y\022\020\n\003key\030\001 \001(\tR\003key\022I\n\005value\030\002 \001(\01323.grp" + + "c.gateway.protoc_gen_openapiv2.options.R" + + "esponseR\005value:\0028\001\032U\n\017ExtensionsEntry\022\020\n" + + "\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google." + + "protobuf.ValueR\005value:\0028\001J\004\010\010\020\tJ\004\010\t\020\n\"\326\007" + + "\n\tOperation\022\022\n\004tags\030\001 \003(\tR\004tags\022\030\n\007summa" + + "ry\030\002 \001(\tR\007summary\022 \n\013description\030\003 \001(\tR\013" + + "description\022e\n\rexternal_docs\030\004 \001(\0132@.grp" + + "c.gateway.protoc_gen_openapiv2.options.E" + + "xternalDocumentationR\014externalDocs\022!\n\014op" + + "eration_id\030\005 \001(\tR\013operationId\022\032\n\010consume" + + "s\030\006 \003(\tR\010consumes\022\032\n\010produces\030\007 \003(\tR\010pro" + + "duces\022a\n\tresponses\030\t \003(\0132C.grpc.gateway." + + "protoc_gen_openapiv2.options.Operation.R" + + "esponsesEntryR\tresponses\022K\n\007schemes\030\n \003(" + + "\01621.grpc.gateway.protoc_gen_openapiv2.op" + + "tions.SchemeR\007schemes\022\036\n\ndeprecated\030\013 \001(" + + "\010R\ndeprecated\022Z\n\010security\030\014 \003(\0132>.grpc.g" + + "ateway.protoc_gen_openapiv2.options.Secu" + + "rityRequirementR\010security\022d\n\nextensions\030" + + "\r \003(\0132D.grpc.gateway.protoc_gen_openapiv" + + "2.options.Operation.ExtensionsEntryR\next" + + "ensions\022U\n\nparameters\030\016 \001(\01325.grpc.gatew" + + "ay.protoc_gen_openapiv2.options.Paramete" + + "rsR\nparameters\032q\n\016ResponsesEntry\022\020\n\003key\030" + + "\001 \001(\tR\003key\022I\n\005value\030\002 \001(\01323.grpc.gateway" + + ".protoc_gen_openapiv2.options.ResponseR\005" + + "value:\0028\001\032U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001(" + + "\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.protobuf." + + "ValueR\005value:\0028\001J\004\010\010\020\t\"b\n\nParameters\022T\n\007" + + "headers\030\001 \003(\0132:.grpc.gateway.protoc_gen_" + + "openapiv2.options.HeaderParameterR\007heade" + + "rs\"\243\002\n\017HeaderParameter\022\022\n\004name\030\001 \001(\tR\004na" + + "me\022 \n\013description\030\002 \001(\tR\013description\022S\n\004" + + "type\030\003 \001(\0162?.grpc.gateway.protoc_gen_ope" + + "napiv2.options.HeaderParameter.TypeR\004typ" + + "e\022\026\n\006format\030\004 \001(\tR\006format\022\032\n\010required\030\005 " + + "\001(\010R\010required\"E\n\004Type\022\013\n\007UNKNOWN\020\000\022\n\n\006ST" + + "RING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER\020\003\022\013\n\007BOOLE" + + "AN\020\004J\004\010\006\020\007J\004\010\007\020\010\"\330\001\n\006Header\022 \n\013descripti" + + "on\030\001 \001(\tR\013description\022\022\n\004type\030\002 \001(\tR\004typ" + + "e\022\026\n\006format\030\003 \001(\tR\006format\022\030\n\007default\030\006 \001" + + "(\tR\007default\022\030\n\007pattern\030\r \001(\tR\007patternJ\004\010" + + "\004\020\005J\004\010\005\020\006J\004\010\007\020\010J\004\010\010\020\tJ\004\010\t\020\nJ\004\010\n\020\013J\004\010\013\020\014J" + + "\004\010\014\020\rJ\004\010\016\020\017J\004\010\017\020\020J\004\010\020\020\021J\004\010\021\020\022J\004\010\022\020\023\"\232\005\n\010" + + "Response\022 \n\013description\030\001 \001(\tR\013descripti" + + "on\022I\n\006schema\030\002 \001(\01321.grpc.gateway.protoc" + + "_gen_openapiv2.options.SchemaR\006schema\022Z\n" + + "\007headers\030\003 \003(\0132@.grpc.gateway.protoc_gen" + + "_openapiv2.options.Response.HeadersEntry" + + "R\007headers\022]\n\010examples\030\004 \003(\0132A.grpc.gatew" + + "ay.protoc_gen_openapiv2.options.Response" + + ".ExamplesEntryR\010examples\022c\n\nextensions\030\005" + + " \003(\0132C.grpc.gateway.protoc_gen_openapiv2" + + ".options.Response.ExtensionsEntryR\nexten" + + "sions\032m\n\014HeadersEntry\022\020\n\003key\030\001 \001(\tR\003key\022" + + "G\n\005value\030\002 \001(\01321.grpc.gateway.protoc_gen" + + "_openapiv2.options.HeaderR\005value:\0028\001\032;\n\r" + + "ExamplesEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value" + + "\030\002 \001(\tR\005value:\0028\001\032U\n\017ExtensionsEntry\022\020\n\003" + + "key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.p" + + "rotobuf.ValueR\005value:\0028\001\"\326\003\n\004Info\022\024\n\005tit" + + "le\030\001 \001(\tR\005title\022 \n\013description\030\002 \001(\tR\013de" + + "scription\022(\n\020terms_of_service\030\003 \001(\tR\016ter" + + "msOfService\022L\n\007contact\030\004 \001(\01322.grpc.gate" + + "way.protoc_gen_openapiv2.options.Contact" + + "R\007contact\022L\n\007license\030\005 \001(\01322.grpc.gatewa" + + "y.protoc_gen_openapiv2.options.LicenseR\007" + + "license\022\030\n\007version\030\006 \001(\tR\007version\022_\n\next" + + "ensions\030\007 \003(\0132?.grpc.gateway.protoc_gen_" + + "openapiv2.options.Info.ExtensionsEntryR\n" + + "extensions\032U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001" + + "(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.protobuf" + + ".ValueR\005value:\0028\001\"E\n\007Contact\022\022\n\004name\030\001 \001" + + "(\tR\004name\022\020\n\003url\030\002 \001(\tR\003url\022\024\n\005email\030\003 \001(" + + "\tR\005email\"/\n\007License\022\022\n\004name\030\001 \001(\tR\004name\022" + + "\020\n\003url\030\002 \001(\tR\003url\"K\n\025ExternalDocumentati" + + "on\022 \n\013description\030\001 \001(\tR\013description\022\020\n\003" + + "url\030\002 \001(\tR\003url\"\252\002\n\006Schema\022V\n\013json_schema" + + "\030\001 \001(\01325.grpc.gateway.protoc_gen_openapi" + + "v2.options.JSONSchemaR\njsonSchema\022$\n\rdis" + + "criminator\030\002 \001(\tR\rdiscriminator\022\033\n\tread_" + + "only\030\003 \001(\010R\010readOnly\022e\n\rexternal_docs\030\005 " + + "\001(\0132@.grpc.gateway.protoc_gen_openapiv2." + + "options.ExternalDocumentationR\014externalD" + + "ocs\022\030\n\007example\030\006 \001(\tR\007exampleJ\004\010\004\020\005\"\327\n\n\n" + + "JSONSchema\022\020\n\003ref\030\003 \001(\tR\003ref\022\024\n\005title\030\005 " + + "\001(\tR\005title\022 \n\013description\030\006 \001(\tR\013descrip" + + "tion\022\030\n\007default\030\007 \001(\tR\007default\022\033\n\tread_o" + + "nly\030\010 \001(\010R\010readOnly\022\030\n\007example\030\t \001(\tR\007ex" + + "ample\022\037\n\013multiple_of\030\n \001(\001R\nmultipleOf\022\030" + + "\n\007maximum\030\013 \001(\001R\007maximum\022+\n\021exclusive_ma" + + "ximum\030\014 \001(\010R\020exclusiveMaximum\022\030\n\007minimum" + + "\030\r \001(\001R\007minimum\022+\n\021exclusive_minimum\030\016 \001" + + "(\010R\020exclusiveMinimum\022\035\n\nmax_length\030\017 \001(\004" + + "R\tmaxLength\022\035\n\nmin_length\030\020 \001(\004R\tminLeng" + + "th\022\030\n\007pattern\030\021 \001(\tR\007pattern\022\033\n\tmax_item" + + "s\030\024 \001(\004R\010maxItems\022\033\n\tmin_items\030\025 \001(\004R\010mi" + + "nItems\022!\n\014unique_items\030\026 \001(\010R\013uniqueItem" + + "s\022%\n\016max_properties\030\030 \001(\004R\rmaxProperties" + + "\022%\n\016min_properties\030\031 \001(\004R\rminProperties\022" + + "\032\n\010required\030\032 \003(\tR\010required\022\024\n\005array\030\" \003" + + "(\tR\005array\022_\n\004type\030# \003(\0162K.grpc.gateway.p" + + "rotoc_gen_openapiv2.options.JSONSchema.J" + + "SONSchemaSimpleTypesR\004type\022\026\n\006format\030$ \001" + + "(\tR\006format\022\022\n\004enum\030. \003(\tR\004enum\022z\n\023field_" + + "configuration\030\351\007 \001(\0132H.grpc.gateway.prot" + + "oc_gen_openapiv2.options.JSONSchema.Fiel" + + "dConfigurationR\022fieldConfiguration\022e\n\nex" + + "tensions\0300 \003(\0132E.grpc.gateway.protoc_gen" + + "_openapiv2.options.JSONSchema.Extensions" + + "EntryR\nextensions\032<\n\022FieldConfiguration\022" + + "&\n\017path_param_name\030/ \001(\tR\rpathParamName\032" + + "U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001(\tR\003key\022,\n\005" + + "value\030\002 \001(\0132\026.google.protobuf.ValueR\005val" + + "ue:\0028\001\"w\n\025JSONSchemaSimpleTypes\022\013\n\007UNKNO" + + "WN\020\000\022\t\n\005ARRAY\020\001\022\013\n\007BOOLEAN\020\002\022\013\n\007INTEGER\020" + + "\003\022\010\n\004NULL\020\004\022\n\n\006NUMBER\020\005\022\n\n\006OBJECT\020\006\022\n\n\006S" + + "TRING\020\007J\004\010\001\020\002J\004\010\002\020\003J\004\010\004\020\005J\004\010\022\020\023J\004\010\023\020\024J\004\010" + + "\027\020\030J\004\010\033\020\034J\004\010\034\020\035J\004\010\035\020\036J\004\010\036\020\"J\004\010%\020*J\004\010*\020+J" + + "\004\010+\020.\"\331\002\n\003Tag\022\022\n\004name\030\001 \001(\tR\004name\022 \n\013des" + + "cription\030\002 \001(\tR\013description\022e\n\rexternal_" + + "docs\030\003 \001(\0132@.grpc.gateway.protoc_gen_ope" + + "napiv2.options.ExternalDocumentationR\014ex" + + "ternalDocs\022^\n\nextensions\030\004 \003(\0132>.grpc.ga" + + "teway.protoc_gen_openapiv2.options.Tag.E" + + "xtensionsEntryR\nextensions\032U\n\017Extensions" + + "Entry\022\020\n\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026" + + ".google.protobuf.ValueR\005value:\0028\001\"\367\001\n\023Se" + + "curityDefinitions\022h\n\010security\030\001 \003(\0132L.gr" + + "pc.gateway.protoc_gen_openapiv2.options." + + "SecurityDefinitions.SecurityEntryR\010secur" + + "ity\032v\n\rSecurityEntry\022\020\n\003key\030\001 \001(\tR\003key\022O" + + "\n\005value\030\002 \001(\01329.grpc.gateway.protoc_gen_" + + "openapiv2.options.SecuritySchemeR\005value:" + + "\0028\001\"\377\006\n\016SecurityScheme\022R\n\004type\030\001 \001(\0162>.g" + + "rpc.gateway.protoc_gen_openapiv2.options" + + ".SecurityScheme.TypeR\004type\022 \n\013descriptio" + + "n\030\002 \001(\tR\013description\022\022\n\004name\030\003 \001(\tR\004name" + + "\022L\n\002in\030\004 \001(\0162<.grpc.gateway.protoc_gen_o" + + "penapiv2.options.SecurityScheme.InR\002in\022R" + + "\n\004flow\030\005 \001(\0162>.grpc.gateway.protoc_gen_o" + + "penapiv2.options.SecurityScheme.FlowR\004fl" + + "ow\022+\n\021authorization_url\030\006 \001(\tR\020authoriza" + + "tionUrl\022\033\n\ttoken_url\030\007 \001(\tR\010tokenUrl\022I\n\006" + + "scopes\030\010 \001(\01321.grpc.gateway.protoc_gen_o" + + "penapiv2.options.ScopesR\006scopes\022i\n\nexten" + + "sions\030\t \003(\0132I.grpc.gateway.protoc_gen_op" + + "enapiv2.options.SecurityScheme.Extension" + + "sEntryR\nextensions\032U\n\017ExtensionsEntry\022\020\n" + + "\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google." + + "protobuf.ValueR\005value:\0028\001\"K\n\004Type\022\020\n\014TYP" + + "E_INVALID\020\000\022\016\n\nTYPE_BASIC\020\001\022\020\n\014TYPE_API_" + + "KEY\020\002\022\017\n\013TYPE_OAUTH2\020\003\"1\n\002In\022\016\n\nIN_INVAL" + + "ID\020\000\022\014\n\010IN_QUERY\020\001\022\r\n\tIN_HEADER\020\002\"j\n\004Flo" + + "w\022\020\n\014FLOW_INVALID\020\000\022\021\n\rFLOW_IMPLICIT\020\001\022\021" + + "\n\rFLOW_PASSWORD\020\002\022\024\n\020FLOW_APPLICATION\020\003\022" + + "\024\n\020FLOW_ACCESS_CODE\020\004\"\366\002\n\023SecurityRequir" + + "ement\022\212\001\n\024security_requirement\030\001 \003(\0132W.g" + + "rpc.gateway.protoc_gen_openapiv2.options" + + ".SecurityRequirement.SecurityRequirement" + + "EntryR\023securityRequirement\0320\n\030SecurityRe" + + "quirementValue\022\024\n\005scope\030\001 \003(\tR\005scope\032\237\001\n" + + "\030SecurityRequirementEntry\022\020\n\003key\030\001 \001(\tR\003" + + "key\022m\n\005value\030\002 \001(\0132W.grpc.gateway.protoc" + + "_gen_openapiv2.options.SecurityRequireme" + + "nt.SecurityRequirementValueR\005value:\0028\001\"\226" + + "\001\n\006Scopes\022R\n\005scope\030\001 \003(\0132<.grpc.gateway." + + "protoc_gen_openapiv2.options.Scopes.Scop" + + "eEntryR\005scope\0328\n\nScopeEntry\022\020\n\003key\030\001 \001(\t" + + "R\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001*;\n\006Schem" + + "e\022\013\n\007UNKNOWN\020\000\022\010\n\004HTTP\020\001\022\t\n\005HTTPS\020\002\022\006\n\002W" + + "S\020\003\022\007\n\003WSS\020\004B\230\002B\016Openapiv2ProtoP\001ZFgithu" + + "b.com/grpc-ecosystem/grpc-gateway/v2/pro" + + "toc-gen-openapiv2/options\242\002\004GGPO\252\002\'Grpc." + + "Gateway.ProtocGenOpenapiv2.Options\312\002\'Grp" + + "c\\Gateway\\ProtocGenOpenapiv2\\Options\342\0023G" + + "rpc\\Gateway\\ProtocGenOpenapiv2\\Options\\G" + + "PBMetadata\352\002*Grpc::Gateway::ProtocGenOpe" + + "napiv2::Optionsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor, + new java.lang.String[] { "Swagger", "Info", "Host", "BasePath", "Schemes", "Consumes", "Produces", "Responses", "SecurityDefinitions", "Security", "Tags", "ExternalDocs", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor, + new java.lang.String[] { "Tags", "Summary", "Description", "ExternalDocs", "OperationId", "Consumes", "Produces", "Responses", "Schemes", "Deprecated", "Security", "Extensions", "Parameters", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor, + new java.lang.String[] { "Headers", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor, + new java.lang.String[] { "Name", "Description", "Type", "Format", "Required", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor, + new java.lang.String[] { "Description", "Type", "Format", "Default", "Pattern", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor, + new java.lang.String[] { "Description", "Schema", "Headers", "Examples", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(2); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor, + new java.lang.String[] { "Title", "Description", "TermsOfService", "Contact", "License", "Version", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor, + new java.lang.String[] { "Name", "Url", "Email", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor, + new java.lang.String[] { "Name", "Url", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor, + new java.lang.String[] { "Description", "Url", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor, + new java.lang.String[] { "JsonSchema", "Discriminator", "ReadOnly", "ExternalDocs", "Example", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor, + new java.lang.String[] { "Ref", "Title", "Description", "Default", "ReadOnly", "Example", "MultipleOf", "Maximum", "ExclusiveMaximum", "Minimum", "ExclusiveMinimum", "MaxLength", "MinLength", "Pattern", "MaxItems", "MinItems", "UniqueItems", "MaxProperties", "MinProperties", "Required", "Array", "Type", "Format", "Enum", "FieldConfiguration", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor, + new java.lang.String[] { "PathParamName", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor, + new java.lang.String[] { "Name", "Description", "ExternalDocs", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor, + new java.lang.String[] { "Security", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor, + new java.lang.String[] { "Type", "Description", "Name", "In", "Flow", "AuthorizationUrl", "TokenUrl", "Scopes", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor, + new java.lang.String[] { "SecurityRequirement", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor, + new java.lang.String[] { "Scope", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor, + new java.lang.String[] { "Scope", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Operation.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Operation.java new file mode 100644 index 00000000..e7f4eac3 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Operation.java @@ -0,0 +1,3977 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Operation` is a representation of OpenAPI v2 specification's Operation object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
+ *
+ * Example:
+ *
+ *  service EchoService {
+ *    rpc Echo(SimpleMessage) returns (SimpleMessage) {
+ *      option (google.api.http) = {
+ *        get: "/v1/example/echo/{id}"
+ *      };
+ *
+ *      option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ *        summary: "Get a message.";
+ *        operation_id: "getMessage";
+ *        tags: "echo";
+ *        responses: {
+ *          key: "200"
+ *            value: {
+ *            description: "OK";
+ *          }
+ *        }
+ *      };
+ *    }
+ *  }
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Operation} + */ +public final class Operation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Operation) + OperationOrBuilder { +private static final long serialVersionUID = 0L; + // Use Operation.newBuilder() to construct. + private Operation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Operation() { + tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + summary_ = ""; + description_ = ""; + operationId_ = ""; + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + schemes_ = java.util.Collections.emptyList(); + security_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Operation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetResponses(); + case 13: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Operation.class, grpc.gateway.protoc_gen_openapiv2.options.Operation.Builder.class); + } + + private int bitField0_; + public static final int TAGS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_; + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int SUMMARY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object summary_ = ""; + /** + *
+   * A short summary of what the operation does. For maximum readability in the
+   * swagger-ui, this field SHOULD be less than 120 characters.
+   * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The summary. + */ + @java.lang.Override + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } + } + /** + *
+   * A short summary of what the operation does. For maximum readability in the
+   * swagger-ui, this field SHOULD be less than 120 characters.
+   * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The bytes for summary. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A verbose explanation of the operation behavior. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A verbose explanation of the operation behavior. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_DOCS_FIELD_NUMBER = 4; + private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + @java.lang.Override + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + + public static final int OPERATION_ID_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object operationId_ = ""; + /** + *
+   * Unique string used to identify the operation. The id MUST be unique among
+   * all operations described in the API. Tools and libraries MAY use the
+   * operationId to uniquely identify an operation, therefore, it is recommended
+   * to follow common programming naming conventions.
+   * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The operationId. + */ + @java.lang.Override + public java.lang.String getOperationId() { + java.lang.Object ref = operationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operationId_ = s; + return s; + } + } + /** + *
+   * Unique string used to identify the operation. The id MUST be unique among
+   * all operations described in the API. Tools and libraries MAY use the
+   * operationId to uniquely identify an operation, therefore, it is recommended
+   * to follow common programming naming conventions.
+   * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The bytes for operationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOperationIdBytes() { + java.lang.Object ref = operationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSUMES_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + public com.google.protobuf.ProtocolStringList + getConsumesList() { + return consumes_; + } + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + public int getConsumesCount() { + return consumes_.size(); + } + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + public java.lang.String getConsumes(int index) { + return consumes_.get(index); + } + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + public com.google.protobuf.ByteString + getConsumesBytes(int index) { + return consumes_.getByteString(index); + } + + public static final int PRODUCES_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + public com.google.protobuf.ProtocolStringList + getProducesList() { + return produces_; + } + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + public int getProducesCount() { + return produces_.size(); + } + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + public java.lang.String getProduces(int index) { + return produces_.get(index); + } + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + public com.google.protobuf.ByteString + getProducesBytes(int index) { + return produces_.getByteString(index); + } + + public static final int RESPONSES_FIELD_NUMBER = 9; + private static final class ResponsesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Response> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Response> responses_; + private com.google.protobuf.MapField + internalGetResponses() { + if (responses_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResponsesDefaultEntryHolder.defaultEntry); + } + return responses_; + } + public int getResponsesCount() { + return internalGetResponses().getMap().size(); + } + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public boolean containsResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResponses().getMap().containsKey(key); + } + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResponses() { + return getResponsesMap(); + } + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public java.util.Map getResponsesMap() { + return internalGetResponses().getMap(); + } + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResponses().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResponses().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SCHEMES_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List schemes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme> schemes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>() { + public grpc.gateway.protoc_gen_openapiv2.options.Scheme convert(java.lang.Integer from) { + grpc.gateway.protoc_gen_openapiv2.options.Scheme result = grpc.gateway.protoc_gen_openapiv2.options.Scheme.forNumber(from); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Scheme.UNRECOGNIZED : result; + } + }; + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + @java.lang.Override + public java.util.List getSchemesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); + } + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return The count of schemes. + */ + @java.lang.Override + public int getSchemesCount() { + return schemes_.size(); + } + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { + return schemes_converter_.convert(schemes_.get(index)); + } + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + @java.lang.Override + public java.util.List + getSchemesValueList() { + return schemes_; + } + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + @java.lang.Override + public int getSchemesValue(int index) { + return schemes_.get(index); + } + private int schemesMemoizedSerializedSize; + + public static final int DEPRECATED_FIELD_NUMBER = 11; + private boolean deprecated_ = false; + /** + *
+   * Declares this operation to be deprecated. Usage of the declared operation
+   * should be refrained. Default value is false.
+   * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @return The deprecated. + */ + @java.lang.Override + public boolean getDeprecated() { + return deprecated_; + } + + public static final int SECURITY_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List security_; + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public java.util.List getSecurityList() { + return security_; + } + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public java.util.List + getSecurityOrBuilderList() { + return security_; + } + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public int getSecurityCount() { + return security_.size(); + } + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { + return security_.get(index); + } + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index) { + return security_.get(index); + } + + public static final int EXTENSIONS_FIELD_NUMBER = 13; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PARAMETERS_FIELD_NUMBER = 14; + private grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters_; + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return Whether the parameters field is set. + */ + @java.lang.Override + public boolean hasParameters() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return The parameters. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters() { + return parameters_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; + } + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder() { + return parameters_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tags_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, summary_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getExternalDocs()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, operationId_); + } + for (int i = 0; i < consumes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, consumes_.getRaw(i)); + } + for (int i = 0; i < produces_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, produces_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetResponses(), + ResponsesDefaultEntryHolder.defaultEntry, + 9); + if (getSchemesList().size() > 0) { + output.writeUInt32NoTag(82); + output.writeUInt32NoTag(schemesMemoizedSerializedSize); + } + for (int i = 0; i < schemes_.size(); i++) { + output.writeEnumNoTag(schemes_.get(i)); + } + if (deprecated_ != false) { + output.writeBool(11, deprecated_); + } + for (int i = 0; i < security_.size(); i++) { + output.writeMessage(12, security_.get(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 13); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(14, getParameters()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, summary_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getExternalDocs()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, operationId_); + } + { + int dataSize = 0; + for (int i = 0; i < consumes_.size(); i++) { + dataSize += computeStringSizeNoTag(consumes_.getRaw(i)); + } + size += dataSize; + size += 1 * getConsumesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < produces_.size(); i++) { + dataSize += computeStringSizeNoTag(produces_.getRaw(i)); + } + size += dataSize; + size += 1 * getProducesList().size(); + } + for (java.util.Map.Entry entry + : internalGetResponses().getMap().entrySet()) { + com.google.protobuf.MapEntry + responses__ = ResponsesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, responses__); + } + { + int dataSize = 0; + for (int i = 0; i < schemes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(schemes_.get(i)); + } + size += dataSize; + if (!getSchemesList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }schemesMemoizedSerializedSize = dataSize; + } + if (deprecated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, deprecated_); + } + for (int i = 0; i < security_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, security_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, extensions__); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getParameters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Operation)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Operation other = (grpc.gateway.protoc_gen_openapiv2.options.Operation) obj; + + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (!getSummary() + .equals(other.getSummary())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasExternalDocs() != other.hasExternalDocs()) return false; + if (hasExternalDocs()) { + if (!getExternalDocs() + .equals(other.getExternalDocs())) return false; + } + if (!getOperationId() + .equals(other.getOperationId())) return false; + if (!getConsumesList() + .equals(other.getConsumesList())) return false; + if (!getProducesList() + .equals(other.getProducesList())) return false; + if (!internalGetResponses().equals( + other.internalGetResponses())) return false; + if (!schemes_.equals(other.schemes_)) return false; + if (getDeprecated() + != other.getDeprecated()) return false; + if (!getSecurityList() + .equals(other.getSecurityList())) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (hasParameters() != other.hasParameters()) return false; + if (hasParameters()) { + if (!getParameters() + .equals(other.getParameters())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasExternalDocs()) { + hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; + hash = (53 * hash) + getExternalDocs().hashCode(); + } + hash = (37 * hash) + OPERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getOperationId().hashCode(); + if (getConsumesCount() > 0) { + hash = (37 * hash) + CONSUMES_FIELD_NUMBER; + hash = (53 * hash) + getConsumesList().hashCode(); + } + if (getProducesCount() > 0) { + hash = (37 * hash) + PRODUCES_FIELD_NUMBER; + hash = (53 * hash) + getProducesList().hashCode(); + } + if (!internalGetResponses().getMap().isEmpty()) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + internalGetResponses().hashCode(); + } + if (getSchemesCount() > 0) { + hash = (37 * hash) + SCHEMES_FIELD_NUMBER; + hash = (53 * hash) + schemes_.hashCode(); + } + hash = (37 * hash) + DEPRECATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDeprecated()); + if (getSecurityCount() > 0) { + hash = (37 * hash) + SECURITY_FIELD_NUMBER; + hash = (53 * hash) + getSecurityList().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + if (hasParameters()) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Operation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Operation` is a representation of OpenAPI v2 specification's Operation object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
+   *
+   * Example:
+   *
+   *  service EchoService {
+   *    rpc Echo(SimpleMessage) returns (SimpleMessage) {
+   *      option (google.api.http) = {
+   *        get: "/v1/example/echo/{id}"
+   *      };
+   *
+   *      option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+   *        summary: "Get a message.";
+   *        operation_id: "getMessage";
+   *        tags: "echo";
+   *        responses: {
+   *          key: "200"
+   *            value: {
+   *            description: "OK";
+   *          }
+   *        }
+   *      };
+   *    }
+   *  }
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Operation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Operation) + grpc.gateway.protoc_gen_openapiv2.options.OperationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetResponses(); + case 13: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetMutableResponses(); + case 13: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Operation.class, grpc.gateway.protoc_gen_openapiv2.options.Operation.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Operation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getExternalDocsFieldBuilder(); + getSecurityFieldBuilder(); + getParametersFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + summary_ = ""; + description_ = ""; + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + operationId_ = ""; + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + internalGetMutableResponses().clear(); + schemes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + deprecated_ = false; + if (securityBuilder_ == null) { + security_ = java.util.Collections.emptyList(); + } else { + security_ = null; + securityBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + internalGetMutableExtensions().clear(); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Operation build() { + grpc.gateway.protoc_gen_openapiv2.options.Operation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Operation buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Operation result = new grpc.gateway.protoc_gen_openapiv2.options.Operation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Operation result) { + if (((bitField0_ & 0x00000100) != 0)) { + schemes_ = java.util.Collections.unmodifiableList(schemes_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.schemes_ = schemes_; + if (securityBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + security_ = java.util.Collections.unmodifiableList(security_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.security_ = security_; + } else { + result.security_ = securityBuilder_.build(); + } + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Operation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + tags_.makeImmutable(); + result.tags_ = tags_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.summary_ = summary_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.externalDocs_ = externalDocsBuilder_ == null + ? externalDocs_ + : externalDocsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.operationId_ = operationId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + consumes_.makeImmutable(); + result.consumes_ = consumes_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + produces_.makeImmutable(); + result.produces_ = produces_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.responses_ = internalGetResponses().build(ResponsesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.deprecated_ = deprecated_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.parameters_ = parametersBuilder_ == null + ? parameters_ + : parametersBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Operation) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Operation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Operation other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance()) return this; + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ |= 0x00000001; + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasExternalDocs()) { + mergeExternalDocs(other.getExternalDocs()); + } + if (!other.getOperationId().isEmpty()) { + operationId_ = other.operationId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.consumes_.isEmpty()) { + if (consumes_.isEmpty()) { + consumes_ = other.consumes_; + bitField0_ |= 0x00000020; + } else { + ensureConsumesIsMutable(); + consumes_.addAll(other.consumes_); + } + onChanged(); + } + if (!other.produces_.isEmpty()) { + if (produces_.isEmpty()) { + produces_ = other.produces_; + bitField0_ |= 0x00000040; + } else { + ensureProducesIsMutable(); + produces_.addAll(other.produces_); + } + onChanged(); + } + internalGetMutableResponses().mergeFrom( + other.internalGetResponses()); + bitField0_ |= 0x00000080; + if (!other.schemes_.isEmpty()) { + if (schemes_.isEmpty()) { + schemes_ = other.schemes_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureSchemesIsMutable(); + schemes_.addAll(other.schemes_); + } + onChanged(); + } + if (other.getDeprecated() != false) { + setDeprecated(other.getDeprecated()); + } + if (securityBuilder_ == null) { + if (!other.security_.isEmpty()) { + if (security_.isEmpty()) { + security_ = other.security_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureSecurityIsMutable(); + security_.addAll(other.security_); + } + onChanged(); + } + } else { + if (!other.security_.isEmpty()) { + if (securityBuilder_.isEmpty()) { + securityBuilder_.dispose(); + securityBuilder_ = null; + security_ = other.security_; + bitField0_ = (bitField0_ & ~0x00000400); + securityBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSecurityFieldBuilder() : null; + } else { + securityBuilder_.addAllMessages(other.security_); + } + } + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000800; + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 10 + case 18: { + summary_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getExternalDocsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + operationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsumesIsMutable(); + consumes_.add(s); + break; + } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureProducesIsMutable(); + produces_.add(s); + break; + } // case 58 + case 74: { + com.google.protobuf.MapEntry + responses__ = input.readMessage( + ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableResponses().ensureBuilderMap().put( + responses__.getKey(), responses__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 80: { + int tmpRaw = input.readEnum(); + ensureSchemesIsMutable(); + schemes_.add(tmpRaw); + break; + } // case 80 + case 82: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSchemesIsMutable(); + schemes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 82 + case 88: { + deprecated_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 98: { + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement m = + input.readMessage( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.parser(), + extensionRegistry); + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(m); + } else { + securityBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 114: { + input.readMessage( + getParametersFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureTagsIsMutable() { + if (!tags_.isModifiable()) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + tags_.makeImmutable(); + return tags_; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTagsIsMutable(); + tags_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTagsIsMutable(); + tags_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object summary_ = ""; + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The summary. + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The bytes for summary. + */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @param value The summary to set. + * @return This builder for chaining. + */ + public Builder setSummary( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + summary_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return This builder for chaining. + */ + public Builder clearSummary() { + summary_ = getDefaultInstance().getSummary(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @param value The bytes for summary to set. + * @return This builder for chaining. + */ + public Builder setSummaryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + summary_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + if (externalDocsBuilder_ == null) { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } else { + return externalDocsBuilder_.getMessage(); + } + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalDocs_ = value; + } else { + externalDocsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs( + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { + if (externalDocsBuilder_ == null) { + externalDocs_ = builderForValue.build(); + } else { + externalDocsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + externalDocs_ != null && + externalDocs_ != grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { + getExternalDocsBuilder().mergeFrom(value); + } else { + externalDocs_ = value; + } + } else { + externalDocsBuilder_.mergeFrom(value); + } + if (externalDocs_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public Builder clearExternalDocs() { + bitField0_ = (bitField0_ & ~0x00000008); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExternalDocsFieldBuilder().getBuilder(); + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + if (externalDocsBuilder_ != null) { + return externalDocsBuilder_.getMessageOrBuilder(); + } else { + return externalDocs_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> + getExternalDocsFieldBuilder() { + if (externalDocsBuilder_ == null) { + externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( + getExternalDocs(), + getParentForChildren(), + isClean()); + externalDocs_ = null; + } + return externalDocsBuilder_; + } + + private java.lang.Object operationId_ = ""; + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The operationId. + */ + public java.lang.String getOperationId() { + java.lang.Object ref = operationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The bytes for operationId. + */ + public com.google.protobuf.ByteString + getOperationIdBytes() { + java.lang.Object ref = operationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @param value The operationId to set. + * @return This builder for chaining. + */ + public Builder setOperationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + operationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return This builder for chaining. + */ + public Builder clearOperationId() { + operationId_ = getDefaultInstance().getOperationId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @param value The bytes for operationId to set. + * @return This builder for chaining. + */ + public Builder setOperationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + operationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureConsumesIsMutable() { + if (!consumes_.isModifiable()) { + consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_); + } + bitField0_ |= 0x00000020; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + public com.google.protobuf.ProtocolStringList + getConsumesList() { + consumes_.makeImmutable(); + return consumes_; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + public int getConsumesCount() { + return consumes_.size(); + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + public java.lang.String getConsumes(int index) { + return consumes_.get(index); + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + public com.google.protobuf.ByteString + getConsumesBytes(int index) { + return consumes_.getByteString(index); + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index to set the value at. + * @param value The consumes to set. + * @return This builder for chaining. + */ + public Builder setConsumes( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureConsumesIsMutable(); + consumes_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param value The consumes to add. + * @return This builder for chaining. + */ + public Builder addConsumes( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureConsumesIsMutable(); + consumes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param values The consumes to add. + * @return This builder for chaining. + */ + public Builder addAllConsumes( + java.lang.Iterable values) { + ensureConsumesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumes_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return This builder for chaining. + */ + public Builder clearConsumes() { + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020);; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param value The bytes of the consumes to add. + * @return This builder for chaining. + */ + public Builder addConsumesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureConsumesIsMutable(); + consumes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureProducesIsMutable() { + if (!produces_.isModifiable()) { + produces_ = new com.google.protobuf.LazyStringArrayList(produces_); + } + bitField0_ |= 0x00000040; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + public com.google.protobuf.ProtocolStringList + getProducesList() { + produces_.makeImmutable(); + return produces_; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + public int getProducesCount() { + return produces_.size(); + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + public java.lang.String getProduces(int index) { + return produces_.get(index); + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + public com.google.protobuf.ByteString + getProducesBytes(int index) { + return produces_.getByteString(index); + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index to set the value at. + * @param value The produces to set. + * @return This builder for chaining. + */ + public Builder setProduces( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureProducesIsMutable(); + produces_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param value The produces to add. + * @return This builder for chaining. + */ + public Builder addProduces( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureProducesIsMutable(); + produces_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param values The produces to add. + * @return This builder for chaining. + */ + public Builder addAllProduces( + java.lang.Iterable values) { + ensureProducesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, produces_); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return This builder for chaining. + */ + public Builder clearProduces() { + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040);; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param value The bytes of the produces to add. + * @return This builder for chaining. + */ + public Builder addProducesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureProducesIsMutable(); + produces_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private static final class ResponsesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response build(grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder val) { + if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { return (grpc.gateway.protoc_gen_openapiv2.options.Response) val; } + return ((grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ResponsesDefaultEntryHolder.defaultEntry; + } + }; + private static final ResponsesConverter responsesConverter = new ResponsesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.Response, grpc.gateway.protoc_gen_openapiv2.options.Response.Builder> responses_; + private com.google.protobuf.MapFieldBuilder + internalGetResponses() { + if (responses_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(responsesConverter); + } + return responses_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableResponses() { + if (responses_ == null) { + responses_ = new com.google.protobuf.MapFieldBuilder<>(responsesConverter); + } + bitField0_ |= 0x00000080; + onChanged(); + return responses_; + } + public int getResponsesCount() { + return internalGetResponses().ensureBuilderMap().size(); + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public boolean containsResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResponses().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResponses() { + return getResponsesMap(); + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public java.util.Map getResponsesMap() { + return internalGetResponses().getImmutableMap(); + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); + return map.containsKey(key) ? responsesConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return responsesConverter.build(map.get(key)); + } + public Builder clearResponses() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableResponses().clear(); + return this; + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + public Builder removeResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableResponses().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableResponses() { + bitField0_ |= 0x00000080; + return internalGetMutableResponses().ensureMessageMap(); + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + public Builder putResponses( + java.lang.String key, + grpc.gateway.protoc_gen_openapiv2.options.Response value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableResponses().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000080; + return this; + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + public Builder putAllResponses( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableResponses().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000080; + return this; + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Response.Builder putResponsesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableResponses().ensureBuilderMap(); + grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { + entry = ((grpc.gateway.protoc_gen_openapiv2.options.Response) entry).toBuilder(); + builderMap.put(key, entry); + } + return (grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) entry; + } + + private java.util.List schemes_ = + java.util.Collections.emptyList(); + private void ensureSchemesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + schemes_ = new java.util.ArrayList(schemes_); + bitField0_ |= 0x00000100; + } + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + public java.util.List getSchemesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return The count of schemes. + */ + public int getSchemesCount() { + return schemes_.size(); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + public grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { + return schemes_converter_.convert(schemes_.get(index)); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index to set the value at. + * @param value The schemes to set. + * @return This builder for chaining. + */ + public Builder setSchemes( + int index, grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemesIsMutable(); + schemes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param value The schemes to add. + * @return This builder for chaining. + */ + public Builder addSchemes(grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemesIsMutable(); + schemes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param values The schemes to add. + * @return This builder for chaining. + */ + public Builder addAllSchemes( + java.lang.Iterable values) { + ensureSchemesIsMutable(); + for (grpc.gateway.protoc_gen_openapiv2.options.Scheme value : values) { + schemes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return This builder for chaining. + */ + public Builder clearSchemes() { + schemes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + public java.util.List + getSchemesValueList() { + return java.util.Collections.unmodifiableList(schemes_); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + public int getSchemesValue(int index) { + return schemes_.get(index); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for schemes to set. + * @return This builder for chaining. + */ + public Builder setSchemesValue( + int index, int value) { + ensureSchemesIsMutable(); + schemes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param value The enum numeric value on the wire for schemes to add. + * @return This builder for chaining. + */ + public Builder addSchemesValue(int value) { + ensureSchemesIsMutable(); + schemes_.add(value); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param values The enum numeric values on the wire for schemes to add. + * @return This builder for chaining. + */ + public Builder addAllSchemesValue( + java.lang.Iterable values) { + ensureSchemesIsMutable(); + for (int value : values) { + schemes_.add(value); + } + onChanged(); + return this; + } + + private boolean deprecated_ ; + /** + *
+     * Declares this operation to be deprecated. Usage of the declared operation
+     * should be refrained. Default value is false.
+     * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @return The deprecated. + */ + @java.lang.Override + public boolean getDeprecated() { + return deprecated_; + } + /** + *
+     * Declares this operation to be deprecated. Usage of the declared operation
+     * should be refrained. Default value is false.
+     * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @param value The deprecated to set. + * @return This builder for chaining. + */ + public Builder setDeprecated(boolean value) { + + deprecated_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Declares this operation to be deprecated. Usage of the declared operation
+     * should be refrained. Default value is false.
+     * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @return This builder for chaining. + */ + public Builder clearDeprecated() { + bitField0_ = (bitField0_ & ~0x00000200); + deprecated_ = false; + onChanged(); + return this; + } + + private java.util.List security_ = + java.util.Collections.emptyList(); + private void ensureSecurityIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + security_ = new java.util.ArrayList(security_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> securityBuilder_; + + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List getSecurityList() { + if (securityBuilder_ == null) { + return java.util.Collections.unmodifiableList(security_); + } else { + return securityBuilder_.getMessageList(); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public int getSecurityCount() { + if (securityBuilder_ == null) { + return security_.size(); + } else { + return securityBuilder_.getCount(); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { + if (securityBuilder_ == null) { + return security_.get(index); + } else { + return securityBuilder_.getMessage(index); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder setSecurity( + int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.set(index, value); + onChanged(); + } else { + securityBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder setSecurity( + int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.set(index, builderForValue.build()); + onChanged(); + } else { + securityBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.add(value); + onChanged(); + } else { + securityBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.add(index, value); + onChanged(); + } else { + securityBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(builderForValue.build()); + onChanged(); + } else { + securityBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(index, builderForValue.build()); + onChanged(); + } else { + securityBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addAllSecurity( + java.lang.Iterable values) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, security_); + onChanged(); + } else { + securityBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder clearSecurity() { + if (securityBuilder_ == null) { + security_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + securityBuilder_.clear(); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder removeSecurity(int index) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.remove(index); + onChanged(); + } else { + securityBuilder_.remove(index); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder getSecurityBuilder( + int index) { + return getSecurityFieldBuilder().getBuilder(index); + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index) { + if (securityBuilder_ == null) { + return security_.get(index); } else { + return securityBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List + getSecurityOrBuilderList() { + if (securityBuilder_ != null) { + return securityBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(security_); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder() { + return getSecurityFieldBuilder().addBuilder( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder( + int index) { + return getSecurityFieldBuilder().addBuilder( + index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List + getSecurityBuilderList() { + return getSecurityFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> + getSecurityFieldBuilder() { + if (securityBuilder_ == null) { + securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder>( + security_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + security_ = null; + } + return securityBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000800; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000800; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000800; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000800; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + private grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Parameters, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder> parametersBuilder_; + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return Whether the parameters field is set. + */ + public boolean hasParameters() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return The parameters. + */ + public grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public Builder setParameters(grpc.gateway.protoc_gen_openapiv2.options.Parameters value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + } else { + parametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public Builder setParameters( + grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder builderForValue) { + if (parametersBuilder_ == null) { + parameters_ = builderForValue.build(); + } else { + parametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public Builder mergeParameters(grpc.gateway.protoc_gen_openapiv2.options.Parameters value) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) && + parameters_ != null && + parameters_ != grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance()) { + getParametersBuilder().mergeFrom(value); + } else { + parameters_ = value; + } + } else { + parametersBuilder_.mergeFrom(value); + } + if (parameters_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public Builder clearParameters() { + bitField0_ = (bitField0_ & ~0x00001000); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder getParametersBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getParametersFieldBuilder().getBuilder(); + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; + } + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Parameters, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Parameters, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder>( + getParameters(), + getParentForChildren(), + isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Operation) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Operation) + private static final grpc.gateway.protoc_gen_openapiv2.options.Operation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Operation(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Operation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java new file mode 100644 index 00000000..bbe84c0c --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java @@ -0,0 +1,540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface OperationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Operation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return A list containing the tags. + */ + java.util.List + getTagsList(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return The count of tags. + */ + int getTagsCount(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString + getTagsBytes(int index); + + /** + *
+   * A short summary of what the operation does. For maximum readability in the
+   * swagger-ui, this field SHOULD be less than 120 characters.
+   * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The summary. + */ + java.lang.String getSummary(); + /** + *
+   * A short summary of what the operation does. For maximum readability in the
+   * swagger-ui, this field SHOULD be less than 120 characters.
+   * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The bytes for summary. + */ + com.google.protobuf.ByteString + getSummaryBytes(); + + /** + *
+   * A verbose explanation of the operation behavior. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A verbose explanation of the operation behavior. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + boolean hasExternalDocs(); + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); + + /** + *
+   * Unique string used to identify the operation. The id MUST be unique among
+   * all operations described in the API. Tools and libraries MAY use the
+   * operationId to uniquely identify an operation, therefore, it is recommended
+   * to follow common programming naming conventions.
+   * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The operationId. + */ + java.lang.String getOperationId(); + /** + *
+   * Unique string used to identify the operation. The id MUST be unique among
+   * all operations described in the API. Tools and libraries MAY use the
+   * operationId to uniquely identify an operation, therefore, it is recommended
+   * to follow common programming naming conventions.
+   * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The bytes for operationId. + */ + com.google.protobuf.ByteString + getOperationIdBytes(); + + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + java.util.List + getConsumesList(); + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + int getConsumesCount(); + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + java.lang.String getConsumes(int index); + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + com.google.protobuf.ByteString + getConsumesBytes(int index); + + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + java.util.List + getProducesList(); + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + int getProducesCount(); + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + java.lang.String getProduces(int index); + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + com.google.protobuf.ByteString + getProducesBytes(int index); + + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + int getResponsesCount(); + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + boolean containsResponses( + java.lang.String key); + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getResponses(); + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + java.util.Map + getResponsesMap(); + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue); + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key); + + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + java.util.List getSchemesList(); + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return The count of schemes. + */ + int getSchemesCount(); + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index); + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + java.util.List + getSchemesValueList(); + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + int getSchemesValue(int index); + + /** + *
+   * Declares this operation to be deprecated. Usage of the declared operation
+   * should be refrained. Default value is false.
+   * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @return The deprecated. + */ + boolean getDeprecated(); + + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + java.util.List + getSecurityList(); + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index); + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + int getSecurityCount(); + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + java.util.List + getSecurityOrBuilderList(); + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); + + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return Whether the parameters field is set. + */ + boolean hasParameters(); + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return The parameters. + */ + grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters(); + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder(); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java new file mode 100644 index 00000000..efd4cecd --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java @@ -0,0 +1,891 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Parameters` is a representation of OpenAPI v2 specification's parameters object.
+ * Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
+ * allow header parameters to be set here since we do not want users specifying custom non-header
+ * parameters beyond those inferred from the Protobuf schema.
+ * See: https://swagger.io/specification/v2/#parameter-object
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ +public final class Parameters extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + ParametersOrBuilder { +private static final long serialVersionUID = 0L; + // Use Parameters.newBuilder() to construct. + private Parameters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Parameters() { + headers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Parameters(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Parameters.class, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder.class); + } + + public static final int HEADERS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List headers_; + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public java.util.List getHeadersList() { + return headers_; + } + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public java.util.List + getHeadersOrBuilderList() { + return headers_; + } + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public int getHeadersCount() { + return headers_.size(); + } + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index) { + return headers_.get(index); + } + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( + int index) { + return headers_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < headers_.size(); i++) { + output.writeMessage(1, headers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < headers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, headers_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Parameters)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Parameters other = (grpc.gateway.protoc_gen_openapiv2.options.Parameters) obj; + + if (!getHeadersList() + .equals(other.getHeadersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getHeadersCount() > 0) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getHeadersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Parameters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Parameters` is a representation of OpenAPI v2 specification's parameters object.
+   * Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
+   * allow header parameters to be set here since we do not want users specifying custom non-header
+   * parameters beyond those inferred from the Protobuf schema.
+   * See: https://swagger.io/specification/v2/#parameter-object
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Parameters.class, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Parameters.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + } else { + headers_ = null; + headersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Parameters build() { + grpc.gateway.protoc_gen_openapiv2.options.Parameters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Parameters buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Parameters result = new grpc.gateway.protoc_gen_openapiv2.options.Parameters(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Parameters result) { + if (headersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + headers_ = java.util.Collections.unmodifiableList(headers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.headers_ = headers_; + } else { + result.headers_ = headersBuilder_.build(); + } + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Parameters result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Parameters) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Parameters)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Parameters other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance()) return this; + if (headersBuilder_ == null) { + if (!other.headers_.isEmpty()) { + if (headers_.isEmpty()) { + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHeadersIsMutable(); + headers_.addAll(other.headers_); + } + onChanged(); + } + } else { + if (!other.headers_.isEmpty()) { + if (headersBuilder_.isEmpty()) { + headersBuilder_.dispose(); + headersBuilder_ = null; + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000001); + headersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getHeadersFieldBuilder() : null; + } else { + headersBuilder_.addAllMessages(other.headers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter m = + input.readMessage( + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.parser(), + extensionRegistry); + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(m); + } else { + headersBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List headers_ = + java.util.Collections.emptyList(); + private void ensureHeadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + headers_ = new java.util.ArrayList(headers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder> headersBuilder_; + + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public java.util.List getHeadersList() { + if (headersBuilder_ == null) { + return java.util.Collections.unmodifiableList(headers_); + } else { + return headersBuilder_.getMessageList(); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public int getHeadersCount() { + if (headersBuilder_ == null) { + return headers_.size(); + } else { + return headersBuilder_.getCount(); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessage(index); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder setHeaders( + int index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.set(index, value); + onChanged(); + } else { + headersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder setHeaders( + int index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.set(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addHeaders(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(value); + onChanged(); + } else { + headersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addHeaders( + int index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(index, value); + onChanged(); + } else { + headersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addHeaders( + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addHeaders( + int index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addAllHeaders( + java.lang.Iterable values) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, headers_); + onChanged(); + } else { + headersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder clearHeaders() { + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + headersBuilder_.clear(); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder removeHeaders(int index) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.remove(index); + onChanged(); + } else { + headersBuilder_.remove(index); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder getHeadersBuilder( + int index) { + return getHeadersFieldBuilder().getBuilder(index); + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( + int index) { + if (headersBuilder_ == null) { + return headers_.get(index); } else { + return headersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public java.util.List + getHeadersOrBuilderList() { + if (headersBuilder_ != null) { + return headersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headers_); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder addHeadersBuilder() { + return getHeadersFieldBuilder().addBuilder( + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()); + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder addHeadersBuilder( + int index) { + return getHeadersFieldBuilder().addBuilder( + index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()); + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public java.util.List + getHeadersBuilderList() { + return getHeadersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder> + getHeadersFieldBuilder() { + if (headersBuilder_ == null) { + headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder>( + headers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + headers_ = null; + } + return headersBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + private static final grpc.gateway.protoc_gen_openapiv2.options.Parameters DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Parameters(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Parameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java new file mode 100644 index 00000000..ae40a3a1 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface ParametersOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + java.util.List + getHeadersList(); + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index); + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + int getHeadersCount(); + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + java.util.List + getHeadersOrBuilderList(); + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( + int index); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Response.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Response.java new file mode 100644 index 00000000..5cd221a8 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Response.java @@ -0,0 +1,1876 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Response` is a representation of OpenAPI v2 specification's Response object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Response} + */ +public final class Response extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Response) + ResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use Response.newBuilder() to construct. + private Response(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Response() { + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Response(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetHeaders(); + case 4: + return internalGetExamples(); + case 5: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Response.class, grpc.gateway.protoc_gen_openapiv2.options.Response.Builder.class); + } + + private int bitField0_; + public static final int DESCRIPTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * `Description` is a short description of the response.
+   * GFM syntax can be used for rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * `Description` is a short description of the response.
+   * GFM syntax can be used for rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_FIELD_NUMBER = 2; + private grpc.gateway.protoc_gen_openapiv2.options.Schema schema_; + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return The schema. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema() { + return schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; + } + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; + } + + public static final int HEADERS_FIELD_NUMBER = 3; + private static final class HeadersDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Header> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Header> headers_; + private com.google.protobuf.MapField + internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public boolean containsHeaders( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeaders().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXAMPLES_FIELD_NUMBER = 4; + private static final class ExamplesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> examples_; + private com.google.protobuf.MapField + internalGetExamples() { + if (examples_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExamplesDefaultEntryHolder.defaultEntry); + } + return examples_; + } + public int getExamplesCount() { + return internalGetExamples().getMap().size(); + } + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public boolean containsExamples( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExamples().getMap().containsKey(key); + } + /** + * Use {@link #getExamplesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExamples() { + return getExamplesMap(); + } + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public java.util.Map getExamplesMap() { + return internalGetExamples().getMap(); + } + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getExamplesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExamples().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public java.lang.String getExamplesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExamples().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXTENSIONS_FIELD_NUMBER = 5; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSchema()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetHeaders(), + HeadersDefaultEntryHolder.defaultEntry, + 3); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExamples(), + ExamplesDefaultEntryHolder.defaultEntry, + 4); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 5); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSchema()); + } + for (java.util.Map.Entry entry + : internalGetHeaders().getMap().entrySet()) { + com.google.protobuf.MapEntry + headers__ = HeadersDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, headers__); + } + for (java.util.Map.Entry entry + : internalGetExamples().getMap().entrySet()) { + com.google.protobuf.MapEntry + examples__ = ExamplesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, examples__); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Response)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Response other = (grpc.gateway.protoc_gen_openapiv2.options.Response) obj; + + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema() + .equals(other.getSchema())) return false; + } + if (!internalGetHeaders().equals( + other.internalGetHeaders())) return false; + if (!internalGetExamples().equals( + other.internalGetExamples())) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + if (!internalGetHeaders().getMap().isEmpty()) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeaders().hashCode(); + } + if (!internalGetExamples().getMap().isEmpty()) { + hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetExamples().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Response prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Response` is a representation of OpenAPI v2 specification's Response object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Response} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Response) + grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetHeaders(); + case 4: + return internalGetExamples(); + case 5: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableHeaders(); + case 4: + return internalGetMutableExamples(); + case 5: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Response.class, grpc.gateway.protoc_gen_openapiv2.options.Response.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSchemaFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + internalGetMutableHeaders().clear(); + internalGetMutableExamples().clear(); + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response build() { + grpc.gateway.protoc_gen_openapiv2.options.Response result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Response result = new grpc.gateway.protoc_gen_openapiv2.options.Response(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Response result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.schema_ = schemaBuilder_ == null + ? schema_ + : schemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.headers_ = internalGetHeaders().build(HeadersDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.examples_ = internalGetExamples(); + result.examples_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Response)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Response other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + internalGetMutableHeaders().mergeFrom( + other.internalGetHeaders()); + bitField0_ |= 0x00000004; + internalGetMutableExamples().mergeFrom( + other.internalGetExamples()); + bitField0_ |= 0x00000008; + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000010; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getSchemaFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + headers__ = input.readMessage( + HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableHeaders().ensureBuilderMap().put( + headers__.getKey(), headers__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + examples__ = input.readMessage( + ExamplesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExamples().getMutableMap().put( + examples__.getKey(), examples__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private grpc.gateway.protoc_gen_openapiv2.options.Schema schema_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Schema, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder> schemaBuilder_; + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return The schema. + */ + public grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public Builder setSchema(grpc.gateway.protoc_gen_openapiv2.options.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public Builder setSchema( + grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public Builder mergeSchema(grpc.gateway.protoc_gen_openapiv2.options.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + schema_ != null && + schema_ != grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + if (schema_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000002); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; + } + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Schema, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Schema, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder>( + getSchema(), + getParentForChildren(), + isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private static final class HeadersConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Header build(grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder val) { + if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.Header) { return (grpc.gateway.protoc_gen_openapiv2.options.Header) val; } + return ((grpc.gateway.protoc_gen_openapiv2.options.Header.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return HeadersDefaultEntryHolder.defaultEntry; + } + }; + private static final HeadersConverter headersConverter = new HeadersConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.Header, grpc.gateway.protoc_gen_openapiv2.options.Header.Builder> headers_; + private com.google.protobuf.MapFieldBuilder + internalGetHeaders() { + if (headers_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(headersConverter); + } + return headers_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableHeaders() { + if (headers_ == null) { + headers_ = new com.google.protobuf.MapFieldBuilder<>(headersConverter); + } + bitField0_ |= 0x00000004; + onChanged(); + return headers_; + } + public int getHeadersCount() { + return internalGetHeaders().ensureBuilderMap().size(); + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public boolean containsHeaders( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeaders().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public java.util.Map getHeadersMap() { + return internalGetHeaders().getImmutableMap(); + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableHeaders().ensureBuilderMap(); + return map.containsKey(key) ? headersConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableHeaders().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return headersConverter.build(map.get(key)); + } + public Builder clearHeaders() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableHeaders().clear(); + return this; + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + public Builder removeHeaders( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableHeaders().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableHeaders() { + bitField0_ |= 0x00000004; + return internalGetMutableHeaders().ensureMessageMap(); + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + public Builder putHeaders( + java.lang.String key, + grpc.gateway.protoc_gen_openapiv2.options.Header value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableHeaders().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + public Builder putAllHeaders( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableHeaders().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Header.Builder putHeadersBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableHeaders().ensureBuilderMap(); + grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = grpc.gateway.protoc_gen_openapiv2.options.Header.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.Header) { + entry = ((grpc.gateway.protoc_gen_openapiv2.options.Header) entry).toBuilder(); + builderMap.put(key, entry); + } + return (grpc.gateway.protoc_gen_openapiv2.options.Header.Builder) entry; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> examples_; + private com.google.protobuf.MapField + internalGetExamples() { + if (examples_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExamplesDefaultEntryHolder.defaultEntry); + } + return examples_; + } + private com.google.protobuf.MapField + internalGetMutableExamples() { + if (examples_ == null) { + examples_ = com.google.protobuf.MapField.newMapField( + ExamplesDefaultEntryHolder.defaultEntry); + } + if (!examples_.isMutable()) { + examples_ = examples_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return examples_; + } + public int getExamplesCount() { + return internalGetExamples().getMap().size(); + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public boolean containsExamples( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExamples().getMap().containsKey(key); + } + /** + * Use {@link #getExamplesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExamples() { + return getExamplesMap(); + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public java.util.Map getExamplesMap() { + return internalGetExamples().getMap(); + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getExamplesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExamples().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public java.lang.String getExamplesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExamples().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearExamples() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableExamples().getMutableMap() + .clear(); + return this; + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + public Builder removeExamples( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExamples().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExamples() { + bitField0_ |= 0x00000008; + return internalGetMutableExamples().getMutableMap(); + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + public Builder putExamples( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExamples().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + public Builder putAllExamples( + java.util.Map values) { + internalGetMutableExamples().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000010; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000010; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Response) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Response) + private static final grpc.gateway.protoc_gen_openapiv2.options.Response DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Response(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Response parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java new file mode 100644 index 00000000..9b36a101 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java @@ -0,0 +1,249 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface ResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Response) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `Description` is a short description of the response.
+   * GFM syntax can be used for rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * `Description` is a short description of the response.
+   * GFM syntax can be used for rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return Whether the schema field is set. + */ + boolean hasSchema(); + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return The schema. + */ + grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema(); + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder(); + + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + int getHeadersCount(); + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + boolean containsHeaders( + java.lang.String key); + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getHeaders(); + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + java.util.Map + getHeadersMap(); + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue); + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( + java.lang.String key); + + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + int getExamplesCount(); + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + boolean containsExamples( + java.lang.String key); + /** + * Use {@link #getExamplesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExamples(); + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + java.util.Map + getExamplesMap(); + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + /* nullable */ +java.lang.String getExamplesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + java.lang.String getExamplesOrThrow( + java.lang.String key); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Schema.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Schema.java new file mode 100644 index 00000000..20ebb4b5 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Schema.java @@ -0,0 +1,1306 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Schema` is a representation of OpenAPI v2 specification's Schema object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ +public final class Schema extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Schema) + SchemaOrBuilder { +private static final long serialVersionUID = 0L; + // Use Schema.newBuilder() to construct. + private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Schema() { + discriminator_ = ""; + example_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Schema(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Schema.class, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder.class); + } + + private int bitField0_; + public static final int JSON_SCHEMA_FIELD_NUMBER = 1; + private grpc.gateway.protoc_gen_openapiv2.options.JSONSchema jsonSchema_; + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return Whether the jsonSchema field is set. + */ + @java.lang.Override + public boolean hasJsonSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return The jsonSchema. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema() { + return jsonSchema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder() { + return jsonSchema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; + } + + public static final int DISCRIMINATOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object discriminator_ = ""; + /** + *
+   * Adds support for polymorphism. The discriminator is the schema property
+   * name that is used to differentiate between other schema that inherit this
+   * schema. The property name used MUST be defined at this schema and it MUST
+   * be in the required property list. When used, the value MUST be the name of
+   * this schema or any schema that inherits it.
+   * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The discriminator. + */ + @java.lang.Override + public java.lang.String getDiscriminator() { + java.lang.Object ref = discriminator_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discriminator_ = s; + return s; + } + } + /** + *
+   * Adds support for polymorphism. The discriminator is the schema property
+   * name that is used to differentiate between other schema that inherit this
+   * schema. The property name used MUST be defined at this schema and it MUST
+   * be in the required property list. When used, the value MUST be the name of
+   * this schema or any schema that inherits it.
+   * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The bytes for discriminator. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscriminatorBytes() { + java.lang.Object ref = discriminator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discriminator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_ONLY_FIELD_NUMBER = 3; + private boolean readOnly_ = false; + /** + *
+   * Relevant only for Schema "properties" definitions. Declares the property as
+   * "read only". This means that it MAY be sent as part of a response but MUST
+   * NOT be sent as part of the request. Properties marked as readOnly being
+   * true SHOULD NOT be in the required list of the defined schema. Default
+   * value is false.
+   * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + + public static final int EXTERNAL_DOCS_FIELD_NUMBER = 5; + private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + @java.lang.Override + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + + public static final int EXAMPLE_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object example_ = ""; + /** + *
+   * A free-form property to include an example of an instance for this schema in JSON.
+   * This is copied verbatim to the output.
+   * 
+ * + * string example = 6 [json_name = "example"]; + * @return The example. + */ + @java.lang.Override + public java.lang.String getExample() { + java.lang.Object ref = example_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + example_ = s; + return s; + } + } + /** + *
+   * A free-form property to include an example of an instance for this schema in JSON.
+   * This is copied verbatim to the output.
+   * 
+ * + * string example = 6 [json_name = "example"]; + * @return The bytes for example. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExampleBytes() { + java.lang.Object ref = example_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + example_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getJsonSchema()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discriminator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discriminator_); + } + if (readOnly_ != false) { + output.writeBool(3, readOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getExternalDocs()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(example_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, example_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getJsonSchema()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discriminator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discriminator_); + } + if (readOnly_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, readOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getExternalDocs()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(example_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, example_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Schema)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Schema other = (grpc.gateway.protoc_gen_openapiv2.options.Schema) obj; + + if (hasJsonSchema() != other.hasJsonSchema()) return false; + if (hasJsonSchema()) { + if (!getJsonSchema() + .equals(other.getJsonSchema())) return false; + } + if (!getDiscriminator() + .equals(other.getDiscriminator())) return false; + if (getReadOnly() + != other.getReadOnly()) return false; + if (hasExternalDocs() != other.hasExternalDocs()) return false; + if (hasExternalDocs()) { + if (!getExternalDocs() + .equals(other.getExternalDocs())) return false; + } + if (!getExample() + .equals(other.getExample())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasJsonSchema()) { + hash = (37 * hash) + JSON_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getJsonSchema().hashCode(); + } + hash = (37 * hash) + DISCRIMINATOR_FIELD_NUMBER; + hash = (53 * hash) + getDiscriminator().hashCode(); + hash = (37 * hash) + READ_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReadOnly()); + if (hasExternalDocs()) { + hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; + hash = (53 * hash) + getExternalDocs().hashCode(); + } + hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getExample().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Schema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Schema` is a representation of OpenAPI v2 specification's Schema object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Schema) + grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Schema.class, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Schema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getJsonSchemaFieldBuilder(); + getExternalDocsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + jsonSchema_ = null; + if (jsonSchemaBuilder_ != null) { + jsonSchemaBuilder_.dispose(); + jsonSchemaBuilder_ = null; + } + discriminator_ = ""; + readOnly_ = false; + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + example_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Schema build() { + grpc.gateway.protoc_gen_openapiv2.options.Schema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Schema buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Schema result = new grpc.gateway.protoc_gen_openapiv2.options.Schema(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Schema result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.jsonSchema_ = jsonSchemaBuilder_ == null + ? jsonSchema_ + : jsonSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.discriminator_ = discriminator_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.readOnly_ = readOnly_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.externalDocs_ = externalDocsBuilder_ == null + ? externalDocs_ + : externalDocsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.example_ = example_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Schema) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Schema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Schema other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()) return this; + if (other.hasJsonSchema()) { + mergeJsonSchema(other.getJsonSchema()); + } + if (!other.getDiscriminator().isEmpty()) { + discriminator_ = other.discriminator_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getReadOnly() != false) { + setReadOnly(other.getReadOnly()); + } + if (other.hasExternalDocs()) { + mergeExternalDocs(other.getExternalDocs()); + } + if (!other.getExample().isEmpty()) { + example_ = other.example_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getJsonSchemaFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + discriminator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + readOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 42: { + input.readMessage( + getExternalDocsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: { + example_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private grpc.gateway.protoc_gen_openapiv2.options.JSONSchema jsonSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder> jsonSchemaBuilder_; + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return Whether the jsonSchema field is set. + */ + public boolean hasJsonSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return The jsonSchema. + */ + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema() { + if (jsonSchemaBuilder_ == null) { + return jsonSchema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; + } else { + return jsonSchemaBuilder_.getMessage(); + } + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public Builder setJsonSchema(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema value) { + if (jsonSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jsonSchema_ = value; + } else { + jsonSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public Builder setJsonSchema( + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder builderForValue) { + if (jsonSchemaBuilder_ == null) { + jsonSchema_ = builderForValue.build(); + } else { + jsonSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public Builder mergeJsonSchema(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema value) { + if (jsonSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + jsonSchema_ != null && + jsonSchema_ != grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()) { + getJsonSchemaBuilder().mergeFrom(value); + } else { + jsonSchema_ = value; + } + } else { + jsonSchemaBuilder_.mergeFrom(value); + } + if (jsonSchema_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public Builder clearJsonSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + jsonSchema_ = null; + if (jsonSchemaBuilder_ != null) { + jsonSchemaBuilder_.dispose(); + jsonSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder getJsonSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getJsonSchemaFieldBuilder().getBuilder(); + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder() { + if (jsonSchemaBuilder_ != null) { + return jsonSchemaBuilder_.getMessageOrBuilder(); + } else { + return jsonSchema_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; + } + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder> + getJsonSchemaFieldBuilder() { + if (jsonSchemaBuilder_ == null) { + jsonSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder>( + getJsonSchema(), + getParentForChildren(), + isClean()); + jsonSchema_ = null; + } + return jsonSchemaBuilder_; + } + + private java.lang.Object discriminator_ = ""; + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The discriminator. + */ + public java.lang.String getDiscriminator() { + java.lang.Object ref = discriminator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discriminator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The bytes for discriminator. + */ + public com.google.protobuf.ByteString + getDiscriminatorBytes() { + java.lang.Object ref = discriminator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discriminator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @param value The discriminator to set. + * @return This builder for chaining. + */ + public Builder setDiscriminator( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + discriminator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return This builder for chaining. + */ + public Builder clearDiscriminator() { + discriminator_ = getDefaultInstance().getDiscriminator(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @param value The bytes for discriminator to set. + * @return This builder for chaining. + */ + public Builder setDiscriminatorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + discriminator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean readOnly_ ; + /** + *
+     * Relevant only for Schema "properties" definitions. Declares the property as
+     * "read only". This means that it MAY be sent as part of a response but MUST
+     * NOT be sent as part of the request. Properties marked as readOnly being
+     * true SHOULD NOT be in the required list of the defined schema. Default
+     * value is false.
+     * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + /** + *
+     * Relevant only for Schema "properties" definitions. Declares the property as
+     * "read only". This means that it MAY be sent as part of a response but MUST
+     * NOT be sent as part of the request. Properties marked as readOnly being
+     * true SHOULD NOT be in the required list of the defined schema. Default
+     * value is false.
+     * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @param value The readOnly to set. + * @return This builder for chaining. + */ + public Builder setReadOnly(boolean value) { + + readOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Relevant only for Schema "properties" definitions. Declares the property as
+     * "read only". This means that it MAY be sent as part of a response but MUST
+     * NOT be sent as part of the request. Properties marked as readOnly being
+     * true SHOULD NOT be in the required list of the defined schema. Default
+     * value is false.
+     * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @return This builder for chaining. + */ + public Builder clearReadOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + readOnly_ = false; + onChanged(); + return this; + } + + private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + if (externalDocsBuilder_ == null) { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } else { + return externalDocsBuilder_.getMessage(); + } + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalDocs_ = value; + } else { + externalDocsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs( + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { + if (externalDocsBuilder_ == null) { + externalDocs_ = builderForValue.build(); + } else { + externalDocsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + externalDocs_ != null && + externalDocs_ != grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { + getExternalDocsBuilder().mergeFrom(value); + } else { + externalDocs_ = value; + } + } else { + externalDocsBuilder_.mergeFrom(value); + } + if (externalDocs_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public Builder clearExternalDocs() { + bitField0_ = (bitField0_ & ~0x00000008); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExternalDocsFieldBuilder().getBuilder(); + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + if (externalDocsBuilder_ != null) { + return externalDocsBuilder_.getMessageOrBuilder(); + } else { + return externalDocs_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> + getExternalDocsFieldBuilder() { + if (externalDocsBuilder_ == null) { + externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( + getExternalDocs(), + getParentForChildren(), + isClean()); + externalDocs_ = null; + } + return externalDocsBuilder_; + } + + private java.lang.Object example_ = ""; + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @return The example. + */ + public java.lang.String getExample() { + java.lang.Object ref = example_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + example_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @return The bytes for example. + */ + public com.google.protobuf.ByteString + getExampleBytes() { + java.lang.Object ref = example_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + example_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @param value The example to set. + * @return This builder for chaining. + */ + public Builder setExample( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + example_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @return This builder for chaining. + */ + public Builder clearExample() { + example_ = getDefaultInstance().getExample(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @param value The bytes for example to set. + * @return This builder for chaining. + */ + public Builder setExampleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + example_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Schema) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Schema) + private static final grpc.gateway.protoc_gen_openapiv2.options.Schema DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Schema(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java new file mode 100644 index 00000000..ce8d35c8 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface SchemaOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Schema) + com.google.protobuf.MessageOrBuilder { + + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return Whether the jsonSchema field is set. + */ + boolean hasJsonSchema(); + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return The jsonSchema. + */ + grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema(); + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder(); + + /** + *
+   * Adds support for polymorphism. The discriminator is the schema property
+   * name that is used to differentiate between other schema that inherit this
+   * schema. The property name used MUST be defined at this schema and it MUST
+   * be in the required property list. When used, the value MUST be the name of
+   * this schema or any schema that inherits it.
+   * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The discriminator. + */ + java.lang.String getDiscriminator(); + /** + *
+   * Adds support for polymorphism. The discriminator is the schema property
+   * name that is used to differentiate between other schema that inherit this
+   * schema. The property name used MUST be defined at this schema and it MUST
+   * be in the required property list. When used, the value MUST be the name of
+   * this schema or any schema that inherits it.
+   * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The bytes for discriminator. + */ + com.google.protobuf.ByteString + getDiscriminatorBytes(); + + /** + *
+   * Relevant only for Schema "properties" definitions. Declares the property as
+   * "read only". This means that it MAY be sent as part of a response but MUST
+   * NOT be sent as part of the request. Properties marked as readOnly being
+   * true SHOULD NOT be in the required list of the defined schema. Default
+   * value is false.
+   * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @return The readOnly. + */ + boolean getReadOnly(); + + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + boolean hasExternalDocs(); + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); + + /** + *
+   * A free-form property to include an example of an instance for this schema in JSON.
+   * This is copied verbatim to the output.
+   * 
+ * + * string example = 6 [json_name = "example"]; + * @return The example. + */ + java.lang.String getExample(); + /** + *
+   * A free-form property to include an example of an instance for this schema in JSON.
+   * This is copied verbatim to the output.
+   * 
+ * + * string example = 6 [json_name = "example"]; + * @return The bytes for example. + */ + com.google.protobuf.ByteString + getExampleBytes(); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java new file mode 100644 index 00000000..e47f0c06 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * Scheme describes the schemes supported by the OpenAPI Swagger
+ * and Operation objects.
+ * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.Scheme} + */ +public enum Scheme + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * HTTP = 1; + */ + HTTP(1), + /** + * HTTPS = 2; + */ + HTTPS(2), + /** + * WS = 3; + */ + WS(3), + /** + * WSS = 4; + */ + WSS(4), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * HTTP = 1; + */ + public static final int HTTP_VALUE = 1; + /** + * HTTPS = 2; + */ + public static final int HTTPS_VALUE = 2; + /** + * WS = 3; + */ + public static final int WS_VALUE = 3; + /** + * WSS = 4; + */ + public static final int WSS_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scheme valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scheme forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return HTTP; + case 2: return HTTPS; + case 3: return WS; + case 4: return WSS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Scheme> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scheme findValueByNumber(int number) { + return Scheme.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor().getEnumTypes().get(0); + } + + private static final Scheme[] VALUES = values(); + + public static Scheme valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scheme(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.Scheme) +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java new file mode 100644 index 00000000..4136ec14 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java @@ -0,0 +1,756 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
+ *
+ * Lists the available scopes for an OAuth2 security scheme.
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ +public final class Scopes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + ScopesOrBuilder { +private static final long serialVersionUID = 0L; + // Use Scopes.newBuilder() to construct. + private Scopes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Scopes() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Scopes(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetScope(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Scopes.class, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private static final class ScopeDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> scope_; + private com.google.protobuf.MapField + internalGetScope() { + if (scope_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ScopeDefaultEntryHolder.defaultEntry); + } + return scope_; + } + public int getScopeCount() { + return internalGetScope().getMap().size(); + } + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public boolean containsScope( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetScope().getMap().containsKey(key); + } + /** + * Use {@link #getScopeMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getScope() { + return getScopeMap(); + } + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public java.util.Map getScopeMap() { + return internalGetScope().getMap(); + } + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getScopeOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScope().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public java.lang.String getScopeOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScope().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetScope(), + ScopeDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetScope().getMap().entrySet()) { + com.google.protobuf.MapEntry + scope__ = ScopeDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, scope__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Scopes)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Scopes other = (grpc.gateway.protoc_gen_openapiv2.options.Scopes) obj; + + if (!internalGetScope().equals( + other.internalGetScope())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetScope().getMap().isEmpty()) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + internalGetScope().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Scopes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
+   *
+   * Lists the available scopes for an OAuth2 security scheme.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetScope(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableScope(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Scopes.class, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Scopes.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableScope().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Scopes build() { + grpc.gateway.protoc_gen_openapiv2.options.Scopes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Scopes buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Scopes result = new grpc.gateway.protoc_gen_openapiv2.options.Scopes(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Scopes result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scope_ = internalGetScope(); + result.scope_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Scopes) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Scopes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Scopes other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance()) return this; + internalGetMutableScope().mergeFrom( + other.internalGetScope()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + scope__ = input.readMessage( + ScopeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableScope().getMutableMap().put( + scope__.getKey(), scope__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> scope_; + private com.google.protobuf.MapField + internalGetScope() { + if (scope_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ScopeDefaultEntryHolder.defaultEntry); + } + return scope_; + } + private com.google.protobuf.MapField + internalGetMutableScope() { + if (scope_ == null) { + scope_ = com.google.protobuf.MapField.newMapField( + ScopeDefaultEntryHolder.defaultEntry); + } + if (!scope_.isMutable()) { + scope_ = scope_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return scope_; + } + public int getScopeCount() { + return internalGetScope().getMap().size(); + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public boolean containsScope( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetScope().getMap().containsKey(key); + } + /** + * Use {@link #getScopeMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getScope() { + return getScopeMap(); + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public java.util.Map getScopeMap() { + return internalGetScope().getMap(); + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getScopeOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScope().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public java.lang.String getScopeOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScope().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableScope().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + public Builder removeScope( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableScope().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableScope() { + bitField0_ |= 0x00000001; + return internalGetMutableScope().getMutableMap(); + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + public Builder putScope( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableScope().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + public Builder putAllScope( + java.util.Map values) { + internalGetMutableScope().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + private static final grpc.gateway.protoc_gen_openapiv2.options.Scopes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Scopes(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Scopes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java new file mode 100644 index 00000000..5b65104d --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface ScopesOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + int getScopeCount(); + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + boolean containsScope( + java.lang.String key); + /** + * Use {@link #getScopeMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getScope(); + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + java.util.Map + getScopeMap(); + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + /* nullable */ +java.lang.String getScopeOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + java.lang.String getScopeOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java new file mode 100644 index 00000000..fdb029e0 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java @@ -0,0 +1,794 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `SecurityDefinitions` is a representation of OpenAPI v2 specification's
+ * Security Definitions object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
+ *
+ * A declaration of the security schemes available to be used in the
+ * specification. This does not enforce the security schemes on the operations
+ * and only serves to provide the relevant details for each scheme.
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ +public final class SecurityDefinitions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + SecurityDefinitionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use SecurityDefinitions.newBuilder() to construct. + private SecurityDefinitions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SecurityDefinitions() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SecurityDefinitions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecurity(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder.class); + } + + public static final int SECURITY_FIELD_NUMBER = 1; + private static final class SecurityDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security_; + private com.google.protobuf.MapField + internalGetSecurity() { + if (security_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SecurityDefaultEntryHolder.defaultEntry); + } + return security_; + } + public int getSecurityCount() { + return internalGetSecurity().getMap().size(); + } + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public boolean containsSecurity( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecurity().getMap().containsKey(key); + } + /** + * Use {@link #getSecurityMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecurity() { + return getSecurityMap(); + } + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public java.util.Map getSecurityMap() { + return internalGetSecurity().getMap(); + } + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecurity().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecurity().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetSecurity(), + SecurityDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetSecurity().getMap().entrySet()) { + com.google.protobuf.MapEntry + security__ = SecurityDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, security__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions other = (grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) obj; + + if (!internalGetSecurity().equals( + other.internalGetSecurity())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetSecurity().getMap().isEmpty()) { + hash = (37 * hash) + SECURITY_FIELD_NUMBER; + hash = (53 * hash) + internalGetSecurity().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `SecurityDefinitions` is a representation of OpenAPI v2 specification's
+   * Security Definitions object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
+   *
+   * A declaration of the security schemes available to be used in the
+   * specification. This does not enforce the security schemes on the operations
+   * and only serves to provide the relevant details for each scheme.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecurity(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableSecurity(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableSecurity().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions build() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result = new grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.security_ = internalGetSecurity().build(SecurityDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance()) return this; + internalGetMutableSecurity().mergeFrom( + other.internalGetSecurity()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + security__ = input.readMessage( + SecurityDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSecurity().ensureBuilderMap().put( + security__.getKey(), security__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private static final class SecurityConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme build(grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder val) { + if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { return (grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) val; } + return ((grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return SecurityDefaultEntryHolder.defaultEntry; + } + }; + private static final SecurityConverter securityConverter = new SecurityConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder> security_; + private com.google.protobuf.MapFieldBuilder + internalGetSecurity() { + if (security_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(securityConverter); + } + return security_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableSecurity() { + if (security_ == null) { + security_ = new com.google.protobuf.MapFieldBuilder<>(securityConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return security_; + } + public int getSecurityCount() { + return internalGetSecurity().ensureBuilderMap().size(); + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public boolean containsSecurity( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecurity().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getSecurityMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecurity() { + return getSecurityMap(); + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public java.util.Map getSecurityMap() { + return internalGetSecurity().getImmutableMap(); + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableSecurity().ensureBuilderMap(); + return map.containsKey(key) ? securityConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableSecurity().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return securityConverter.build(map.get(key)); + } + public Builder clearSecurity() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableSecurity().clear(); + return this; + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + public Builder removeSecurity( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableSecurity().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSecurity() { + bitField0_ |= 0x00000001; + return internalGetMutableSecurity().ensureMessageMap(); + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + public Builder putSecurity( + java.lang.String key, + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableSecurity().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + public Builder putAllSecurity( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableSecurity().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder putSecurityBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableSecurity().ensureBuilderMap(); + grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { + entry = ((grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) entry).toBuilder(); + builderMap.put(key, entry); + } + return (grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + private static final grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecurityDefinitions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java new file mode 100644 index 00000000..b454ca55 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface SecurityDefinitionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + int getSecurityCount(); + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + boolean containsSecurity( + java.lang.String key); + /** + * Use {@link #getSecurityMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSecurity(); + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + java.util.Map + getSecurityMap(); + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue); + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java new file mode 100644 index 00000000..e7a9ccb3 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java @@ -0,0 +1,1454 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `SecurityRequirement` is a representation of OpenAPI v2 specification's
+ * Security Requirement object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
+ *
+ * Lists the required security schemes to execute this operation. The object can
+ * have multiple security schemes declared in it which are all required (that
+ * is, there is a logical AND between the schemes).
+ *
+ * The name used for each property MUST correspond to a security scheme
+ * declared in the Security Definitions.
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +public final class SecurityRequirement extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + SecurityRequirementOrBuilder { +private static final long serialVersionUID = 0L; + // Use SecurityRequirement.newBuilder() to construct. + private SecurityRequirement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SecurityRequirement() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SecurityRequirement(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecurityRequirement(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder.class); + } + + public interface SecurityRequirementValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return A list containing the scope. + */ + java.util.List + getScopeList(); + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return The count of scope. + */ + int getScopeCount(); + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + java.lang.String getScope(int index); + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + com.google.protobuf.ByteString + getScopeBytes(int index); + } + /** + *
+   * If the security scheme is of type "oauth2", then the value is a list of
+   * scope names required for the execution. For other security scheme types,
+   * the array MUST be empty.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} + */ + public static final class SecurityRequirementValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + SecurityRequirementValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use SecurityRequirementValue.newBuilder() to construct. + private SecurityRequirementValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SecurityRequirementValue() { + scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SecurityRequirementValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return A list containing the scope. + */ + public com.google.protobuf.ProtocolStringList + getScopeList() { + return scope_; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return The count of scope. + */ + public int getScopeCount() { + return scope_.size(); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + public java.lang.String getScope(int index) { + return scope_.get(index); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + public com.google.protobuf.ByteString + getScopeBytes(int index) { + return scope_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < scope_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < scope_.size(); i++) { + dataSize += computeStringSizeNoTag(scope_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopeList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue other = (grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) obj; + + if (!getScopeList() + .equals(other.getScopeList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getScopeCount() > 0) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScopeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * If the security scheme is of type "oauth2", then the value is a list of
+     * scope names required for the execution. For other security scheme types,
+     * the array MUST be empty.
+     * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue build() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result = new grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + scope_.makeImmutable(); + result.scope_ = scope_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance()) return this; + if (!other.scope_.isEmpty()) { + if (scope_.isEmpty()) { + scope_ = other.scope_; + bitField0_ |= 0x00000001; + } else { + ensureScopeIsMutable(); + scope_.addAll(other.scope_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopeIsMutable(); + scope_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureScopeIsMutable() { + if (!scope_.isModifiable()) { + scope_ = new com.google.protobuf.LazyStringArrayList(scope_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return A list containing the scope. + */ + public com.google.protobuf.ProtocolStringList + getScopeList() { + scope_.makeImmutable(); + return scope_; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return The count of scope. + */ + public int getScopeCount() { + return scope_.size(); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + public java.lang.String getScope(int index) { + return scope_.get(index); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + public com.google.protobuf.ByteString + getScopeBytes(int index) { + return scope_.getByteString(index); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index to set the value at. + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureScopeIsMutable(); + scope_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param value The scope to add. + * @return This builder for chaining. + */ + public Builder addScope( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureScopeIsMutable(); + scope_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param values The scope to add. + * @return This builder for chaining. + */ + public Builder addAllScope( + java.lang.Iterable values) { + ensureScopeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, scope_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return This builder for chaining. + */ + public Builder clearScope() { + scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param value The bytes of the scope to add. + * @return This builder for chaining. + */ + public Builder addScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureScopeIsMutable(); + scope_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + private static final grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecurityRequirementValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SECURITY_REQUIREMENT_FIELD_NUMBER = 1; + private static final class SecurityRequirementDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> securityRequirement_; + private com.google.protobuf.MapField + internalGetSecurityRequirement() { + if (securityRequirement_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SecurityRequirementDefaultEntryHolder.defaultEntry); + } + return securityRequirement_; + } + public int getSecurityRequirementCount() { + return internalGetSecurityRequirement().getMap().size(); + } + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public boolean containsSecurityRequirement( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecurityRequirement().getMap().containsKey(key); + } + /** + * Use {@link #getSecurityRequirementMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecurityRequirement() { + return getSecurityRequirementMap(); + } + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public java.util.Map getSecurityRequirementMap() { + return internalGetSecurityRequirement().getMap(); + } + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecurityRequirement().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecurityRequirement().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetSecurityRequirement(), + SecurityRequirementDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetSecurityRequirement().getMap().entrySet()) { + com.google.protobuf.MapEntry + securityRequirement__ = SecurityRequirementDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, securityRequirement__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement other = (grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) obj; + + if (!internalGetSecurityRequirement().equals( + other.internalGetSecurityRequirement())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetSecurityRequirement().getMap().isEmpty()) { + hash = (37 * hash) + SECURITY_REQUIREMENT_FIELD_NUMBER; + hash = (53 * hash) + internalGetSecurityRequirement().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `SecurityRequirement` is a representation of OpenAPI v2 specification's
+   * Security Requirement object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
+   *
+   * Lists the required security schemes to execute this operation. The object can
+   * have multiple security schemes declared in it which are all required (that
+   * is, there is a logical AND between the schemes).
+   *
+   * The name used for each property MUST correspond to a security scheme
+   * declared in the Security Definitions.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecurityRequirement(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableSecurityRequirement(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableSecurityRequirement().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement build() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result = new grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.securityRequirement_ = internalGetSecurityRequirement().build(SecurityRequirementDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()) return this; + internalGetMutableSecurityRequirement().mergeFrom( + other.internalGetSecurityRequirement()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + securityRequirement__ = input.readMessage( + SecurityRequirementDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSecurityRequirement().ensureBuilderMap().put( + securityRequirement__.getKey(), securityRequirement__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private static final class SecurityRequirementConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue build(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder val) { + if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { return (grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) val; } + return ((grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return SecurityRequirementDefaultEntryHolder.defaultEntry; + } + }; + private static final SecurityRequirementConverter securityRequirementConverter = new SecurityRequirementConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder> securityRequirement_; + private com.google.protobuf.MapFieldBuilder + internalGetSecurityRequirement() { + if (securityRequirement_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(securityRequirementConverter); + } + return securityRequirement_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableSecurityRequirement() { + if (securityRequirement_ == null) { + securityRequirement_ = new com.google.protobuf.MapFieldBuilder<>(securityRequirementConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return securityRequirement_; + } + public int getSecurityRequirementCount() { + return internalGetSecurityRequirement().ensureBuilderMap().size(); + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public boolean containsSecurityRequirement( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecurityRequirement().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getSecurityRequirementMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecurityRequirement() { + return getSecurityRequirementMap(); + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public java.util.Map getSecurityRequirementMap() { + return internalGetSecurityRequirement().getImmutableMap(); + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableSecurityRequirement().ensureBuilderMap(); + return map.containsKey(key) ? securityRequirementConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableSecurityRequirement().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return securityRequirementConverter.build(map.get(key)); + } + public Builder clearSecurityRequirement() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableSecurityRequirement().clear(); + return this; + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + public Builder removeSecurityRequirement( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableSecurityRequirement().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSecurityRequirement() { + bitField0_ |= 0x00000001; + return internalGetMutableSecurityRequirement().ensureMessageMap(); + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + public Builder putSecurityRequirement( + java.lang.String key, + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableSecurityRequirement().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + public Builder putAllSecurityRequirement( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableSecurityRequirement().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder putSecurityRequirementBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableSecurityRequirement().ensureBuilderMap(); + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { + entry = ((grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + private static final grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecurityRequirement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java new file mode 100644 index 00000000..ca490070 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface SecurityRequirementOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + int getSecurityRequirementCount(); + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + boolean containsSecurityRequirement( + java.lang.String key); + /** + * Use {@link #getSecurityRequirementMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSecurityRequirement(); + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + java.util.Map + getSecurityRequirementMap(); + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue); + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java new file mode 100644 index 00000000..dbd92383 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java @@ -0,0 +1,2545 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `SecurityScheme` is a representation of OpenAPI v2 specification's
+ * Security Scheme object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
+ *
+ * Allows the definition of a security scheme that can be used by the
+ * operations. Supported schemes are basic authentication, an API key (either as
+ * a header or as a query parameter) and OAuth2's common flows (implicit,
+ * password, application and access code).
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} + */ +public final class SecurityScheme extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + SecuritySchemeOrBuilder { +private static final long serialVersionUID = 0L; + // Use SecurityScheme.newBuilder() to construct. + private SecurityScheme(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SecurityScheme() { + type_ = 0; + description_ = ""; + name_ = ""; + in_ = 0; + flow_ = 0; + authorizationUrl_ = ""; + tokenUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SecurityScheme(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder.class); + } + + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * TYPE_INVALID = 0; + */ + TYPE_INVALID(0), + /** + * TYPE_BASIC = 1; + */ + TYPE_BASIC(1), + /** + * TYPE_API_KEY = 2; + */ + TYPE_API_KEY(2), + /** + * TYPE_OAUTH2 = 3; + */ + TYPE_OAUTH2(3), + UNRECOGNIZED(-1), + ; + + /** + * TYPE_INVALID = 0; + */ + public static final int TYPE_INVALID_VALUE = 0; + /** + * TYPE_BASIC = 1; + */ + public static final int TYPE_BASIC_VALUE = 1; + /** + * TYPE_API_KEY = 2; + */ + public static final int TYPE_API_KEY_VALUE = 2; + /** + * TYPE_OAUTH2 = 3; + */ + public static final int TYPE_OAUTH2_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_INVALID; + case 1: return TYPE_BASIC; + case 2: return TYPE_API_KEY; + case 3: return TYPE_OAUTH2; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type) + } + + /** + *
+   * The location of the API key. Valid values are "query" or "header".
+   * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} + */ + public enum In + implements com.google.protobuf.ProtocolMessageEnum { + /** + * IN_INVALID = 0; + */ + IN_INVALID(0), + /** + * IN_QUERY = 1; + */ + IN_QUERY(1), + /** + * IN_HEADER = 2; + */ + IN_HEADER(2), + UNRECOGNIZED(-1), + ; + + /** + * IN_INVALID = 0; + */ + public static final int IN_INVALID_VALUE = 0; + /** + * IN_QUERY = 1; + */ + public static final int IN_QUERY_VALUE = 1; + /** + * IN_HEADER = 2; + */ + public static final int IN_HEADER_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static In valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static In forNumber(int value) { + switch (value) { + case 0: return IN_INVALID; + case 1: return IN_QUERY; + case 2: return IN_HEADER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + In> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public In findValueByNumber(int number) { + return In.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(1); + } + + private static final In[] VALUES = values(); + + public static In valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private In(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In) + } + + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} + */ + public enum Flow + implements com.google.protobuf.ProtocolMessageEnum { + /** + * FLOW_INVALID = 0; + */ + FLOW_INVALID(0), + /** + * FLOW_IMPLICIT = 1; + */ + FLOW_IMPLICIT(1), + /** + * FLOW_PASSWORD = 2; + */ + FLOW_PASSWORD(2), + /** + * FLOW_APPLICATION = 3; + */ + FLOW_APPLICATION(3), + /** + * FLOW_ACCESS_CODE = 4; + */ + FLOW_ACCESS_CODE(4), + UNRECOGNIZED(-1), + ; + + /** + * FLOW_INVALID = 0; + */ + public static final int FLOW_INVALID_VALUE = 0; + /** + * FLOW_IMPLICIT = 1; + */ + public static final int FLOW_IMPLICIT_VALUE = 1; + /** + * FLOW_PASSWORD = 2; + */ + public static final int FLOW_PASSWORD_VALUE = 2; + /** + * FLOW_APPLICATION = 3; + */ + public static final int FLOW_APPLICATION_VALUE = 3; + /** + * FLOW_ACCESS_CODE = 4; + */ + public static final int FLOW_ACCESS_CODE_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Flow valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Flow forNumber(int value) { + switch (value) { + case 0: return FLOW_INVALID; + case 1: return FLOW_IMPLICIT; + case 2: return FLOW_PASSWORD; + case 3: return FLOW_APPLICATION; + case 4: return FLOW_ACCESS_CODE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Flow> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Flow findValueByNumber(int number) { + return Flow.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(2); + } + + private static final Flow[] VALUES = values(); + + public static Flow valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Flow(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.forNumber(type_); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description for security scheme.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description for security scheme.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the header or query parameter to be used.
+   * Valid for apiKey.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the header or query parameter to be used.
+   * Valid for apiKey.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IN_FIELD_NUMBER = 4; + private int in_ = 0; + /** + *
+   * The location of the API key. Valid values are "query" or
+   * "header".
+   * Valid for apiKey.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The enum numeric value on the wire for in. + */ + @java.lang.Override public int getInValue() { + return in_; + } + /** + *
+   * The location of the API key. Valid values are "query" or
+   * "header".
+   * Valid for apiKey.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The in. + */ + @java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.forNumber(in_); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.UNRECOGNIZED : result; + } + + public static final int FLOW_FIELD_NUMBER = 5; + private int flow_ = 0; + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The enum numeric value on the wire for flow. + */ + @java.lang.Override public int getFlowValue() { + return flow_; + } + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The flow. + */ + @java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.forNumber(flow_); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.UNRECOGNIZED : result; + } + + public static final int AUTHORIZATION_URL_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object authorizationUrl_ = ""; + /** + *
+   * The authorization URL to be used for this flow. This SHOULD be in
+   * the form of a URL.
+   * Valid for oauth2/implicit and oauth2/accessCode.
+   * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The authorizationUrl. + */ + @java.lang.Override + public java.lang.String getAuthorizationUrl() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizationUrl_ = s; + return s; + } + } + /** + *
+   * The authorization URL to be used for this flow. This SHOULD be in
+   * the form of a URL.
+   * Valid for oauth2/implicit and oauth2/accessCode.
+   * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The bytes for authorizationUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAuthorizationUrlBytes() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authorizationUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_URL_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object tokenUrl_ = ""; + /** + *
+   * The token URL to be used for this flow. This SHOULD be in the
+   * form of a URL.
+   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+   * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The tokenUrl. + */ + @java.lang.Override + public java.lang.String getTokenUrl() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenUrl_ = s; + return s; + } + } + /** + *
+   * The token URL to be used for this flow. This SHOULD be in the
+   * form of a URL.
+   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+   * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The bytes for tokenUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenUrlBytes() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tokenUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 8; + private grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes_; + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return Whether the scopes field is set. + */ + @java.lang.Override + public boolean hasScopes() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return The scopes. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes() { + return scopes_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; + } + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder() { + return scopes_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 9; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.TYPE_INVALID.getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (in_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.IN_INVALID.getNumber()) { + output.writeEnum(4, in_); + } + if (flow_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.FLOW_INVALID.getNumber()) { + output.writeEnum(5, flow_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizationUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, authorizationUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, tokenUrl_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getScopes()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 9); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.TYPE_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (in_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.IN_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, in_); + } + if (flow_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.FLOW_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, flow_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizationUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, authorizationUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, tokenUrl_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getScopes()); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme other = (grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) obj; + + if (type_ != other.type_) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getName() + .equals(other.getName())) return false; + if (in_ != other.in_) return false; + if (flow_ != other.flow_) return false; + if (!getAuthorizationUrl() + .equals(other.getAuthorizationUrl())) return false; + if (!getTokenUrl() + .equals(other.getTokenUrl())) return false; + if (hasScopes() != other.hasScopes()) return false; + if (hasScopes()) { + if (!getScopes() + .equals(other.getScopes())) return false; + } + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + IN_FIELD_NUMBER; + hash = (53 * hash) + in_; + hash = (37 * hash) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + flow_; + hash = (37 * hash) + AUTHORIZATION_URL_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizationUrl().hashCode(); + hash = (37 * hash) + TOKEN_URL_FIELD_NUMBER; + hash = (53 * hash) + getTokenUrl().hashCode(); + if (hasScopes()) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopes().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `SecurityScheme` is a representation of OpenAPI v2 specification's
+   * Security Scheme object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
+   *
+   * Allows the definition of a security scheme that can be used by the
+   * operations. Supported schemes are basic authentication, an API key (either as
+   * a header or as a query parameter) and OAuth2's common flows (implicit,
+   * password, application and access code).
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getScopesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + description_ = ""; + name_ = ""; + in_ = 0; + flow_ = 0; + authorizationUrl_ = ""; + tokenUrl_ = ""; + scopes_ = null; + if (scopesBuilder_ != null) { + scopesBuilder_.dispose(); + scopesBuilder_ = null; + } + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme build() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result = new grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.in_ = in_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.flow_ = flow_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.authorizationUrl_ = authorizationUrl_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.tokenUrl_ = tokenUrl_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.scopes_ = scopesBuilder_ == null + ? scopes_ + : scopesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.in_ != 0) { + setInValue(other.getInValue()); + } + if (other.flow_ != 0) { + setFlowValue(other.getFlowValue()); + } + if (!other.getAuthorizationUrl().isEmpty()) { + authorizationUrl_ = other.authorizationUrl_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getTokenUrl().isEmpty()) { + tokenUrl_ = other.tokenUrl_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasScopes()) { + mergeScopes(other.getScopes()); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000100; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + in_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + flow_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + authorizationUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + tokenUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getScopesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int type_ = 0; + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.forNumber(type_); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.UNRECOGNIZED : result; + } + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int in_ = 0; + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The enum numeric value on the wire for in. + */ + @java.lang.Override public int getInValue() { + return in_; + } + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @param value The enum numeric value on the wire for in to set. + * @return This builder for chaining. + */ + public Builder setInValue(int value) { + in_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The in. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.forNumber(in_); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.UNRECOGNIZED : result; + } + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @param value The in to set. + * @return This builder for chaining. + */ + public Builder setIn(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + in_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return This builder for chaining. + */ + public Builder clearIn() { + bitField0_ = (bitField0_ & ~0x00000008); + in_ = 0; + onChanged(); + return this; + } + + private int flow_ = 0; + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The enum numeric value on the wire for flow. + */ + @java.lang.Override public int getFlowValue() { + return flow_; + } + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @param value The enum numeric value on the wire for flow to set. + * @return This builder for chaining. + */ + public Builder setFlowValue(int value) { + flow_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The flow. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow() { + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.forNumber(flow_); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.UNRECOGNIZED : result; + } + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @param value The flow to set. + * @return This builder for chaining. + */ + public Builder setFlow(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + flow_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return This builder for chaining. + */ + public Builder clearFlow() { + bitField0_ = (bitField0_ & ~0x00000010); + flow_ = 0; + onChanged(); + return this; + } + + private java.lang.Object authorizationUrl_ = ""; + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The authorizationUrl. + */ + public java.lang.String getAuthorizationUrl() { + java.lang.Object ref = authorizationUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizationUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The bytes for authorizationUrl. + */ + public com.google.protobuf.ByteString + getAuthorizationUrlBytes() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authorizationUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @param value The authorizationUrl to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + authorizationUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return This builder for chaining. + */ + public Builder clearAuthorizationUrl() { + authorizationUrl_ = getDefaultInstance().getAuthorizationUrl(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @param value The bytes for authorizationUrl to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + authorizationUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object tokenUrl_ = ""; + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The tokenUrl. + */ + public java.lang.String getTokenUrl() { + java.lang.Object ref = tokenUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The bytes for tokenUrl. + */ + public com.google.protobuf.ByteString + getTokenUrlBytes() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tokenUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @param value The tokenUrl to set. + * @return This builder for chaining. + */ + public Builder setTokenUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tokenUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return This builder for chaining. + */ + public Builder clearTokenUrl() { + tokenUrl_ = getDefaultInstance().getTokenUrl(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @param value The bytes for tokenUrl to set. + * @return This builder for chaining. + */ + public Builder setTokenUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tokenUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Scopes, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder> scopesBuilder_; + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return Whether the scopes field is set. + */ + public boolean hasScopes() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return The scopes. + */ + public grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes() { + if (scopesBuilder_ == null) { + return scopes_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; + } else { + return scopesBuilder_.getMessage(); + } + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public Builder setScopes(grpc.gateway.protoc_gen_openapiv2.options.Scopes value) { + if (scopesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scopes_ = value; + } else { + scopesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public Builder setScopes( + grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder builderForValue) { + if (scopesBuilder_ == null) { + scopes_ = builderForValue.build(); + } else { + scopesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public Builder mergeScopes(grpc.gateway.protoc_gen_openapiv2.options.Scopes value) { + if (scopesBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + scopes_ != null && + scopes_ != grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance()) { + getScopesBuilder().mergeFrom(value); + } else { + scopes_ = value; + } + } else { + scopesBuilder_.mergeFrom(value); + } + if (scopes_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public Builder clearScopes() { + bitField0_ = (bitField0_ & ~0x00000080); + scopes_ = null; + if (scopesBuilder_ != null) { + scopesBuilder_.dispose(); + scopesBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder getScopesBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getScopesFieldBuilder().getBuilder(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder() { + if (scopesBuilder_ != null) { + return scopesBuilder_.getMessageOrBuilder(); + } else { + return scopes_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; + } + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Scopes, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder> + getScopesFieldBuilder() { + if (scopesBuilder_ == null) { + scopesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Scopes, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder>( + getScopes(), + getParentForChildren(), + isClean()); + scopes_ = null; + } + return scopesBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000100; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000100; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000100; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000100; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + private static final grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecurityScheme parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java new file mode 100644 index 00000000..f047ad97 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java @@ -0,0 +1,261 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface SecuritySchemeOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The type. + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType(); + + /** + *
+   * A short description for security scheme.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description for security scheme.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The name of the header or query parameter to be used.
+   * Valid for apiKey.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the header or query parameter to be used.
+   * Valid for apiKey.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The location of the API key. Valid values are "query" or
+   * "header".
+   * Valid for apiKey.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The enum numeric value on the wire for in. + */ + int getInValue(); + /** + *
+   * The location of the API key. Valid values are "query" or
+   * "header".
+   * Valid for apiKey.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The in. + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn(); + + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The enum numeric value on the wire for flow. + */ + int getFlowValue(); + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The flow. + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow(); + + /** + *
+   * The authorization URL to be used for this flow. This SHOULD be in
+   * the form of a URL.
+   * Valid for oauth2/implicit and oauth2/accessCode.
+   * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The authorizationUrl. + */ + java.lang.String getAuthorizationUrl(); + /** + *
+   * The authorization URL to be used for this flow. This SHOULD be in
+   * the form of a URL.
+   * Valid for oauth2/implicit and oauth2/accessCode.
+   * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The bytes for authorizationUrl. + */ + com.google.protobuf.ByteString + getAuthorizationUrlBytes(); + + /** + *
+   * The token URL to be used for this flow. This SHOULD be in the
+   * form of a URL.
+   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+   * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The tokenUrl. + */ + java.lang.String getTokenUrl(); + /** + *
+   * The token URL to be used for this flow. This SHOULD be in the
+   * form of a URL.
+   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+   * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The bytes for tokenUrl. + */ + com.google.protobuf.ByteString + getTokenUrlBytes(); + + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return Whether the scopes field is set. + */ + boolean hasScopes(); + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return The scopes. + */ + grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes(); + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java new file mode 100644 index 00000000..6f335b81 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java @@ -0,0 +1,4356 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
+ *
+ * Example:
+ *
+ *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ *    info: {
+ *      title: "Echo API";
+ *      version: "1.0";
+ *      description: "";
+ *      contact: {
+ *        name: "gRPC-Gateway project";
+ *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ *        email: "none@example.com";
+ *      };
+ *      license: {
+ *        name: "BSD 3-Clause License";
+ *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+ *      };
+ *    };
+ *    schemes: HTTPS;
+ *    consumes: "application/json";
+ *    produces: "application/json";
+ *  };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Swagger} + */ +public final class Swagger extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + SwaggerOrBuilder { +private static final long serialVersionUID = 0L; + // Use Swagger.newBuilder() to construct. + private Swagger(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Swagger() { + swagger_ = ""; + host_ = ""; + basePath_ = ""; + schemes_ = java.util.Collections.emptyList(); + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + security_ = java.util.Collections.emptyList(); + tags_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Swagger(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetResponses(); + case 15: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, grpc.gateway.protoc_gen_openapiv2.options.Swagger.Builder.class); + } + + private int bitField0_; + public static final int SWAGGER_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object swagger_ = ""; + /** + *
+   * Specifies the OpenAPI Specification version being used. It can be
+   * used by the OpenAPI UI and other clients to interpret the API listing. The
+   * value MUST be "2.0".
+   * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The swagger. + */ + @java.lang.Override + public java.lang.String getSwagger() { + java.lang.Object ref = swagger_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + swagger_ = s; + return s; + } + } + /** + *
+   * Specifies the OpenAPI Specification version being used. It can be
+   * used by the OpenAPI UI and other clients to interpret the API listing. The
+   * value MUST be "2.0".
+   * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The bytes for swagger. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSwaggerBytes() { + java.lang.Object ref = swagger_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + swagger_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_FIELD_NUMBER = 2; + private grpc.gateway.protoc_gen_openapiv2.options.Info info_; + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + @java.lang.Override + public boolean hasInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return The info. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Info getInfo() { + return info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; + } + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder() { + return info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; + } + + public static final int HOST_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object host_ = ""; + /** + *
+   * The host (name or ip) serving the API. This MUST be the host only and does
+   * not include the scheme nor sub-paths. It MAY include a port. If the host is
+   * not included, the host serving the documentation is to be used (including
+   * the port). The host does not support path templating.
+   * 
+ * + * string host = 3 [json_name = "host"]; + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } + } + /** + *
+   * The host (name or ip) serving the API. This MUST be the host only and does
+   * not include the scheme nor sub-paths. It MAY include a port. If the host is
+   * not included, the host serving the documentation is to be used (including
+   * the port). The host does not support path templating.
+   * 
+ * + * string host = 3 [json_name = "host"]; + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_PATH_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object basePath_ = ""; + /** + *
+   * The base path on which the API is served, which is relative to the host. If
+   * it is not included, the API is served directly under the host. The value
+   * MUST start with a leading slash (/). The basePath does not support path
+   * templating.
+   * Note that using `base_path` does not change the endpoint paths that are
+   * generated in the resulting OpenAPI file. If you wish to use `base_path`
+   * with relatively generated OpenAPI paths, the `base_path` prefix must be
+   * manually removed from your `google.api.http` paths and your code changed to
+   * serve the API from the `base_path`.
+   * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The basePath. + */ + @java.lang.Override + public java.lang.String getBasePath() { + java.lang.Object ref = basePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + basePath_ = s; + return s; + } + } + /** + *
+   * The base path on which the API is served, which is relative to the host. If
+   * it is not included, the API is served directly under the host. The value
+   * MUST start with a leading slash (/). The basePath does not support path
+   * templating.
+   * Note that using `base_path` does not change the endpoint paths that are
+   * generated in the resulting OpenAPI file. If you wish to use `base_path`
+   * with relatively generated OpenAPI paths, the `base_path` prefix must be
+   * manually removed from your `google.api.http` paths and your code changed to
+   * serve the API from the `base_path`.
+   * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The bytes for basePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBasePathBytes() { + java.lang.Object ref = basePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + basePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMES_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List schemes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme> schemes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>() { + public grpc.gateway.protoc_gen_openapiv2.options.Scheme convert(java.lang.Integer from) { + grpc.gateway.protoc_gen_openapiv2.options.Scheme result = grpc.gateway.protoc_gen_openapiv2.options.Scheme.forNumber(from); + return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Scheme.UNRECOGNIZED : result; + } + }; + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + @java.lang.Override + public java.util.List getSchemesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); + } + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return The count of schemes. + */ + @java.lang.Override + public int getSchemesCount() { + return schemes_.size(); + } + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { + return schemes_converter_.convert(schemes_.get(index)); + } + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + @java.lang.Override + public java.util.List + getSchemesValueList() { + return schemes_; + } + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + @java.lang.Override + public int getSchemesValue(int index) { + return schemes_.get(index); + } + private int schemesMemoizedSerializedSize; + + public static final int CONSUMES_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + public com.google.protobuf.ProtocolStringList + getConsumesList() { + return consumes_; + } + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + public int getConsumesCount() { + return consumes_.size(); + } + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + public java.lang.String getConsumes(int index) { + return consumes_.get(index); + } + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + public com.google.protobuf.ByteString + getConsumesBytes(int index) { + return consumes_.getByteString(index); + } + + public static final int PRODUCES_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + public com.google.protobuf.ProtocolStringList + getProducesList() { + return produces_; + } + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + public int getProducesCount() { + return produces_.size(); + } + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + public java.lang.String getProduces(int index) { + return produces_.get(index); + } + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + public com.google.protobuf.ByteString + getProducesBytes(int index) { + return produces_.getByteString(index); + } + + public static final int RESPONSES_FIELD_NUMBER = 10; + private static final class ResponsesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Response> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Response> responses_; + private com.google.protobuf.MapField + internalGetResponses() { + if (responses_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResponsesDefaultEntryHolder.defaultEntry); + } + return responses_; + } + public int getResponsesCount() { + return internalGetResponses().getMap().size(); + } + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public boolean containsResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResponses().getMap().containsKey(key); + } + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResponses() { + return getResponsesMap(); + } + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public java.util.Map getResponsesMap() { + return internalGetResponses().getMap(); + } + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResponses().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResponses().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SECURITY_DEFINITIONS_FIELD_NUMBER = 11; + private grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions securityDefinitions_; + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return Whether the securityDefinitions field is set. + */ + @java.lang.Override + public boolean hasSecurityDefinitions() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return The securityDefinitions. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions() { + return securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; + } + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder() { + return securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; + } + + public static final int SECURITY_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List security_; + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public java.util.List getSecurityList() { + return security_; + } + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public java.util.List + getSecurityOrBuilderList() { + return security_; + } + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public int getSecurityCount() { + return security_.size(); + } + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { + return security_.get(index); + } + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index) { + return security_.get(index); + } + + public static final int TAGS_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private java.util.List tags_; + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public java.util.List getTagsList() { + return tags_; + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public java.util.List + getTagsOrBuilderList() { + return tags_; + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public int getTagsCount() { + return tags_.size(); + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index) { + return tags_.get(index); + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( + int index) { + return tags_.get(index); + } + + public static final int EXTERNAL_DOCS_FIELD_NUMBER = 14; + private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + @java.lang.Override + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 15; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(swagger_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, swagger_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, host_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(basePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, basePath_); + } + if (getSchemesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(schemesMemoizedSerializedSize); + } + for (int i = 0; i < schemes_.size(); i++) { + output.writeEnumNoTag(schemes_.get(i)); + } + for (int i = 0; i < consumes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, consumes_.getRaw(i)); + } + for (int i = 0; i < produces_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, produces_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetResponses(), + ResponsesDefaultEntryHolder.defaultEntry, + 10); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(11, getSecurityDefinitions()); + } + for (int i = 0; i < security_.size(); i++) { + output.writeMessage(12, security_.get(i)); + } + for (int i = 0; i < tags_.size(); i++) { + output.writeMessage(13, tags_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(14, getExternalDocs()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 15); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(swagger_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, swagger_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, host_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(basePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, basePath_); + } + { + int dataSize = 0; + for (int i = 0; i < schemes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(schemes_.get(i)); + } + size += dataSize; + if (!getSchemesList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }schemesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < consumes_.size(); i++) { + dataSize += computeStringSizeNoTag(consumes_.getRaw(i)); + } + size += dataSize; + size += 1 * getConsumesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < produces_.size(); i++) { + dataSize += computeStringSizeNoTag(produces_.getRaw(i)); + } + size += dataSize; + size += 1 * getProducesList().size(); + } + for (java.util.Map.Entry entry + : internalGetResponses().getMap().entrySet()) { + com.google.protobuf.MapEntry + responses__ = ResponsesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, responses__); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getSecurityDefinitions()); + } + for (int i = 0; i < security_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, security_.get(i)); + } + for (int i = 0; i < tags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, tags_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getExternalDocs()); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Swagger)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Swagger other = (grpc.gateway.protoc_gen_openapiv2.options.Swagger) obj; + + if (!getSwagger() + .equals(other.getSwagger())) return false; + if (hasInfo() != other.hasInfo()) return false; + if (hasInfo()) { + if (!getInfo() + .equals(other.getInfo())) return false; + } + if (!getHost() + .equals(other.getHost())) return false; + if (!getBasePath() + .equals(other.getBasePath())) return false; + if (!schemes_.equals(other.schemes_)) return false; + if (!getConsumesList() + .equals(other.getConsumesList())) return false; + if (!getProducesList() + .equals(other.getProducesList())) return false; + if (!internalGetResponses().equals( + other.internalGetResponses())) return false; + if (hasSecurityDefinitions() != other.hasSecurityDefinitions()) return false; + if (hasSecurityDefinitions()) { + if (!getSecurityDefinitions() + .equals(other.getSecurityDefinitions())) return false; + } + if (!getSecurityList() + .equals(other.getSecurityList())) return false; + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (hasExternalDocs() != other.hasExternalDocs()) return false; + if (hasExternalDocs()) { + if (!getExternalDocs() + .equals(other.getExternalDocs())) return false; + } + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SWAGGER_FIELD_NUMBER; + hash = (53 * hash) + getSwagger().hashCode(); + if (hasInfo()) { + hash = (37 * hash) + INFO_FIELD_NUMBER; + hash = (53 * hash) + getInfo().hashCode(); + } + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + BASE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getBasePath().hashCode(); + if (getSchemesCount() > 0) { + hash = (37 * hash) + SCHEMES_FIELD_NUMBER; + hash = (53 * hash) + schemes_.hashCode(); + } + if (getConsumesCount() > 0) { + hash = (37 * hash) + CONSUMES_FIELD_NUMBER; + hash = (53 * hash) + getConsumesList().hashCode(); + } + if (getProducesCount() > 0) { + hash = (37 * hash) + PRODUCES_FIELD_NUMBER; + hash = (53 * hash) + getProducesList().hashCode(); + } + if (!internalGetResponses().getMap().isEmpty()) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + internalGetResponses().hashCode(); + } + if (hasSecurityDefinitions()) { + hash = (37 * hash) + SECURITY_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getSecurityDefinitions().hashCode(); + } + if (getSecurityCount() > 0) { + hash = (37 * hash) + SECURITY_FIELD_NUMBER; + hash = (53 * hash) + getSecurityList().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (hasExternalDocs()) { + hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; + hash = (53 * hash) + getExternalDocs().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Swagger prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
+   *
+   * Example:
+   *
+   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   *    info: {
+   *      title: "Echo API";
+   *      version: "1.0";
+   *      description: "";
+   *      contact: {
+   *        name: "gRPC-Gateway project";
+   *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
+   *        email: "none@example.com";
+   *      };
+   *      license: {
+   *        name: "BSD 3-Clause License";
+   *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+   *      };
+   *    };
+   *    schemes: HTTPS;
+   *    consumes: "application/json";
+   *    produces: "application/json";
+   *  };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Swagger} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + grpc.gateway.protoc_gen_openapiv2.options.SwaggerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetResponses(); + case 15: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetMutableResponses(); + case 15: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, grpc.gateway.protoc_gen_openapiv2.options.Swagger.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Swagger.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInfoFieldBuilder(); + getSecurityDefinitionsFieldBuilder(); + getSecurityFieldBuilder(); + getTagsFieldBuilder(); + getExternalDocsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + swagger_ = ""; + info_ = null; + if (infoBuilder_ != null) { + infoBuilder_.dispose(); + infoBuilder_ = null; + } + host_ = ""; + basePath_ = ""; + schemes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + internalGetMutableResponses().clear(); + securityDefinitions_ = null; + if (securityDefinitionsBuilder_ != null) { + securityDefinitionsBuilder_.dispose(); + securityDefinitionsBuilder_ = null; + } + if (securityBuilder_ == null) { + security_ = java.util.Collections.emptyList(); + } else { + security_ = null; + securityBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (tagsBuilder_ == null) { + tags_ = java.util.Collections.emptyList(); + } else { + tags_ = null; + tagsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Swagger build() { + grpc.gateway.protoc_gen_openapiv2.options.Swagger result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Swagger buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Swagger result = new grpc.gateway.protoc_gen_openapiv2.options.Swagger(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Swagger result) { + if (((bitField0_ & 0x00000010) != 0)) { + schemes_ = java.util.Collections.unmodifiableList(schemes_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.schemes_ = schemes_; + if (securityBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + security_ = java.util.Collections.unmodifiableList(security_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.security_ = security_; + } else { + result.security_ = securityBuilder_.build(); + } + if (tagsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + tags_ = java.util.Collections.unmodifiableList(tags_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.tags_ = tags_; + } else { + result.tags_ = tagsBuilder_.build(); + } + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Swagger result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.swagger_ = swagger_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.info_ = infoBuilder_ == null + ? info_ + : infoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.host_ = host_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.basePath_ = basePath_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + consumes_.makeImmutable(); + result.consumes_ = consumes_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + produces_.makeImmutable(); + result.produces_ = produces_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.responses_ = internalGetResponses().build(ResponsesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.securityDefinitions_ = securityDefinitionsBuilder_ == null + ? securityDefinitions_ + : securityDefinitionsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.externalDocs_ = externalDocsBuilder_ == null + ? externalDocs_ + : externalDocsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Swagger) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Swagger)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Swagger other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance()) return this; + if (!other.getSwagger().isEmpty()) { + swagger_ = other.swagger_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasInfo()) { + mergeInfo(other.getInfo()); + } + if (!other.getHost().isEmpty()) { + host_ = other.host_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getBasePath().isEmpty()) { + basePath_ = other.basePath_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.schemes_.isEmpty()) { + if (schemes_.isEmpty()) { + schemes_ = other.schemes_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureSchemesIsMutable(); + schemes_.addAll(other.schemes_); + } + onChanged(); + } + if (!other.consumes_.isEmpty()) { + if (consumes_.isEmpty()) { + consumes_ = other.consumes_; + bitField0_ |= 0x00000020; + } else { + ensureConsumesIsMutable(); + consumes_.addAll(other.consumes_); + } + onChanged(); + } + if (!other.produces_.isEmpty()) { + if (produces_.isEmpty()) { + produces_ = other.produces_; + bitField0_ |= 0x00000040; + } else { + ensureProducesIsMutable(); + produces_.addAll(other.produces_); + } + onChanged(); + } + internalGetMutableResponses().mergeFrom( + other.internalGetResponses()); + bitField0_ |= 0x00000080; + if (other.hasSecurityDefinitions()) { + mergeSecurityDefinitions(other.getSecurityDefinitions()); + } + if (securityBuilder_ == null) { + if (!other.security_.isEmpty()) { + if (security_.isEmpty()) { + security_ = other.security_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureSecurityIsMutable(); + security_.addAll(other.security_); + } + onChanged(); + } + } else { + if (!other.security_.isEmpty()) { + if (securityBuilder_.isEmpty()) { + securityBuilder_.dispose(); + securityBuilder_ = null; + security_ = other.security_; + bitField0_ = (bitField0_ & ~0x00000200); + securityBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSecurityFieldBuilder() : null; + } else { + securityBuilder_.addAllMessages(other.security_); + } + } + } + if (tagsBuilder_ == null) { + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + } else { + if (!other.tags_.isEmpty()) { + if (tagsBuilder_.isEmpty()) { + tagsBuilder_.dispose(); + tagsBuilder_ = null; + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000400); + tagsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTagsFieldBuilder() : null; + } else { + tagsBuilder_.addAllMessages(other.tags_); + } + } + } + if (other.hasExternalDocs()) { + mergeExternalDocs(other.getExternalDocs()); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00001000; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + swagger_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + basePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + int tmpRaw = input.readEnum(); + ensureSchemesIsMutable(); + schemes_.add(tmpRaw); + break; + } // case 40 + case 42: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSchemesIsMutable(); + schemes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsumesIsMutable(); + consumes_.add(s); + break; + } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureProducesIsMutable(); + produces_.add(s); + break; + } // case 58 + case 82: { + com.google.protobuf.MapEntry + responses__ = input.readMessage( + ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableResponses().ensureBuilderMap().put( + responses__.getKey(), responses__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: { + input.readMessage( + getSecurityDefinitionsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 90 + case 98: { + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement m = + input.readMessage( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.parser(), + extensionRegistry); + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(m); + } else { + securityBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + grpc.gateway.protoc_gen_openapiv2.options.Tag m = + input.readMessage( + grpc.gateway.protoc_gen_openapiv2.options.Tag.parser(), + extensionRegistry); + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.add(m); + } else { + tagsBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: { + input.readMessage( + getExternalDocsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 114 + case 122: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 122 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object swagger_ = ""; + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The swagger. + */ + public java.lang.String getSwagger() { + java.lang.Object ref = swagger_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + swagger_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The bytes for swagger. + */ + public com.google.protobuf.ByteString + getSwaggerBytes() { + java.lang.Object ref = swagger_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + swagger_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @param value The swagger to set. + * @return This builder for chaining. + */ + public Builder setSwagger( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + swagger_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return This builder for chaining. + */ + public Builder clearSwagger() { + swagger_ = getDefaultInstance().getSwagger(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @param value The bytes for swagger to set. + * @return This builder for chaining. + */ + public Builder setSwaggerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + swagger_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private grpc.gateway.protoc_gen_openapiv2.options.Info info_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Info, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder> infoBuilder_; + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + public boolean hasInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return The info. + */ + public grpc.gateway.protoc_gen_openapiv2.options.Info getInfo() { + if (infoBuilder_ == null) { + return info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; + } else { + return infoBuilder_.getMessage(); + } + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public Builder setInfo(grpc.gateway.protoc_gen_openapiv2.options.Info value) { + if (infoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + info_ = value; + } else { + infoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public Builder setInfo( + grpc.gateway.protoc_gen_openapiv2.options.Info.Builder builderForValue) { + if (infoBuilder_ == null) { + info_ = builderForValue.build(); + } else { + infoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public Builder mergeInfo(grpc.gateway.protoc_gen_openapiv2.options.Info value) { + if (infoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + info_ != null && + info_ != grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance()) { + getInfoBuilder().mergeFrom(value); + } else { + info_ = value; + } + } else { + infoBuilder_.mergeFrom(value); + } + if (info_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public Builder clearInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + info_ = null; + if (infoBuilder_ != null) { + infoBuilder_.dispose(); + infoBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Info.Builder getInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getInfoFieldBuilder().getBuilder(); + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder() { + if (infoBuilder_ != null) { + return infoBuilder_.getMessageOrBuilder(); + } else { + return info_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; + } + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Info, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder> + getInfoFieldBuilder() { + if (infoBuilder_ == null) { + infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Info, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder>( + getInfo(), + getParentForChildren(), + isClean()); + info_ = null; + } + return infoBuilder_; + } + + private java.lang.Object host_ = ""; + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @return The bytes for host. + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + host_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @return This builder for chaining. + */ + public Builder clearHost() { + host_ = getDefaultInstance().getHost(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + host_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object basePath_ = ""; + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The basePath. + */ + public java.lang.String getBasePath() { + java.lang.Object ref = basePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + basePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The bytes for basePath. + */ + public com.google.protobuf.ByteString + getBasePathBytes() { + java.lang.Object ref = basePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + basePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @param value The basePath to set. + * @return This builder for chaining. + */ + public Builder setBasePath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + basePath_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return This builder for chaining. + */ + public Builder clearBasePath() { + basePath_ = getDefaultInstance().getBasePath(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @param value The bytes for basePath to set. + * @return This builder for chaining. + */ + public Builder setBasePathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + basePath_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List schemes_ = + java.util.Collections.emptyList(); + private void ensureSchemesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + schemes_ = new java.util.ArrayList(schemes_); + bitField0_ |= 0x00000010; + } + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + public java.util.List getSchemesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return The count of schemes. + */ + public int getSchemesCount() { + return schemes_.size(); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + public grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { + return schemes_converter_.convert(schemes_.get(index)); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index to set the value at. + * @param value The schemes to set. + * @return This builder for chaining. + */ + public Builder setSchemes( + int index, grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemesIsMutable(); + schemes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param value The schemes to add. + * @return This builder for chaining. + */ + public Builder addSchemes(grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemesIsMutable(); + schemes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param values The schemes to add. + * @return This builder for chaining. + */ + public Builder addAllSchemes( + java.lang.Iterable values) { + ensureSchemesIsMutable(); + for (grpc.gateway.protoc_gen_openapiv2.options.Scheme value : values) { + schemes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return This builder for chaining. + */ + public Builder clearSchemes() { + schemes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + public java.util.List + getSchemesValueList() { + return java.util.Collections.unmodifiableList(schemes_); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + public int getSchemesValue(int index) { + return schemes_.get(index); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for schemes to set. + * @return This builder for chaining. + */ + public Builder setSchemesValue( + int index, int value) { + ensureSchemesIsMutable(); + schemes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param value The enum numeric value on the wire for schemes to add. + * @return This builder for chaining. + */ + public Builder addSchemesValue(int value) { + ensureSchemesIsMutable(); + schemes_.add(value); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param values The enum numeric values on the wire for schemes to add. + * @return This builder for chaining. + */ + public Builder addAllSchemesValue( + java.lang.Iterable values) { + ensureSchemesIsMutable(); + for (int value : values) { + schemes_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureConsumesIsMutable() { + if (!consumes_.isModifiable()) { + consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_); + } + bitField0_ |= 0x00000020; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + public com.google.protobuf.ProtocolStringList + getConsumesList() { + consumes_.makeImmutable(); + return consumes_; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + public int getConsumesCount() { + return consumes_.size(); + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + public java.lang.String getConsumes(int index) { + return consumes_.get(index); + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + public com.google.protobuf.ByteString + getConsumesBytes(int index) { + return consumes_.getByteString(index); + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index to set the value at. + * @param value The consumes to set. + * @return This builder for chaining. + */ + public Builder setConsumes( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureConsumesIsMutable(); + consumes_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param value The consumes to add. + * @return This builder for chaining. + */ + public Builder addConsumes( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureConsumesIsMutable(); + consumes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param values The consumes to add. + * @return This builder for chaining. + */ + public Builder addAllConsumes( + java.lang.Iterable values) { + ensureConsumesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumes_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return This builder for chaining. + */ + public Builder clearConsumes() { + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020);; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param value The bytes of the consumes to add. + * @return This builder for chaining. + */ + public Builder addConsumesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureConsumesIsMutable(); + consumes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureProducesIsMutable() { + if (!produces_.isModifiable()) { + produces_ = new com.google.protobuf.LazyStringArrayList(produces_); + } + bitField0_ |= 0x00000040; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + public com.google.protobuf.ProtocolStringList + getProducesList() { + produces_.makeImmutable(); + return produces_; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + public int getProducesCount() { + return produces_.size(); + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + public java.lang.String getProduces(int index) { + return produces_.get(index); + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + public com.google.protobuf.ByteString + getProducesBytes(int index) { + return produces_.getByteString(index); + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index to set the value at. + * @param value The produces to set. + * @return This builder for chaining. + */ + public Builder setProduces( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureProducesIsMutable(); + produces_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param value The produces to add. + * @return This builder for chaining. + */ + public Builder addProduces( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureProducesIsMutable(); + produces_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param values The produces to add. + * @return This builder for chaining. + */ + public Builder addAllProduces( + java.lang.Iterable values) { + ensureProducesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, produces_); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return This builder for chaining. + */ + public Builder clearProduces() { + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040);; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param value The bytes of the produces to add. + * @return This builder for chaining. + */ + public Builder addProducesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureProducesIsMutable(); + produces_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private static final class ResponsesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response build(grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder val) { + if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { return (grpc.gateway.protoc_gen_openapiv2.options.Response) val; } + return ((grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ResponsesDefaultEntryHolder.defaultEntry; + } + }; + private static final ResponsesConverter responsesConverter = new ResponsesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.Response, grpc.gateway.protoc_gen_openapiv2.options.Response.Builder> responses_; + private com.google.protobuf.MapFieldBuilder + internalGetResponses() { + if (responses_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(responsesConverter); + } + return responses_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableResponses() { + if (responses_ == null) { + responses_ = new com.google.protobuf.MapFieldBuilder<>(responsesConverter); + } + bitField0_ |= 0x00000080; + onChanged(); + return responses_; + } + public int getResponsesCount() { + return internalGetResponses().ensureBuilderMap().size(); + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public boolean containsResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResponses().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResponses() { + return getResponsesMap(); + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public java.util.Map getResponsesMap() { + return internalGetResponses().getImmutableMap(); + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); + return map.containsKey(key) ? responsesConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return responsesConverter.build(map.get(key)); + } + public Builder clearResponses() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableResponses().clear(); + return this; + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + public Builder removeResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableResponses().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableResponses() { + bitField0_ |= 0x00000080; + return internalGetMutableResponses().ensureMessageMap(); + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + public Builder putResponses( + java.lang.String key, + grpc.gateway.protoc_gen_openapiv2.options.Response value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableResponses().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000080; + return this; + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + public Builder putAllResponses( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableResponses().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000080; + return this; + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Response.Builder putResponsesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableResponses().ensureBuilderMap(); + grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { + entry = ((grpc.gateway.protoc_gen_openapiv2.options.Response) entry).toBuilder(); + builderMap.put(key, entry); + } + return (grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) entry; + } + + private grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions securityDefinitions_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder> securityDefinitionsBuilder_; + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return Whether the securityDefinitions field is set. + */ + public boolean hasSecurityDefinitions() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return The securityDefinitions. + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions() { + if (securityDefinitionsBuilder_ == null) { + return securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; + } else { + return securityDefinitionsBuilder_.getMessage(); + } + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public Builder setSecurityDefinitions(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions value) { + if (securityDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + securityDefinitions_ = value; + } else { + securityDefinitionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public Builder setSecurityDefinitions( + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder builderForValue) { + if (securityDefinitionsBuilder_ == null) { + securityDefinitions_ = builderForValue.build(); + } else { + securityDefinitionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public Builder mergeSecurityDefinitions(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions value) { + if (securityDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + securityDefinitions_ != null && + securityDefinitions_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance()) { + getSecurityDefinitionsBuilder().mergeFrom(value); + } else { + securityDefinitions_ = value; + } + } else { + securityDefinitionsBuilder_.mergeFrom(value); + } + if (securityDefinitions_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public Builder clearSecurityDefinitions() { + bitField0_ = (bitField0_ & ~0x00000100); + securityDefinitions_ = null; + if (securityDefinitionsBuilder_ != null) { + securityDefinitionsBuilder_.dispose(); + securityDefinitionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder getSecurityDefinitionsBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getSecurityDefinitionsFieldBuilder().getBuilder(); + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder() { + if (securityDefinitionsBuilder_ != null) { + return securityDefinitionsBuilder_.getMessageOrBuilder(); + } else { + return securityDefinitions_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; + } + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder> + getSecurityDefinitionsFieldBuilder() { + if (securityDefinitionsBuilder_ == null) { + securityDefinitionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder>( + getSecurityDefinitions(), + getParentForChildren(), + isClean()); + securityDefinitions_ = null; + } + return securityDefinitionsBuilder_; + } + + private java.util.List security_ = + java.util.Collections.emptyList(); + private void ensureSecurityIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + security_ = new java.util.ArrayList(security_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> securityBuilder_; + + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List getSecurityList() { + if (securityBuilder_ == null) { + return java.util.Collections.unmodifiableList(security_); + } else { + return securityBuilder_.getMessageList(); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public int getSecurityCount() { + if (securityBuilder_ == null) { + return security_.size(); + } else { + return securityBuilder_.getCount(); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { + if (securityBuilder_ == null) { + return security_.get(index); + } else { + return securityBuilder_.getMessage(index); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder setSecurity( + int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.set(index, value); + onChanged(); + } else { + securityBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder setSecurity( + int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.set(index, builderForValue.build()); + onChanged(); + } else { + securityBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.add(value); + onChanged(); + } else { + securityBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.add(index, value); + onChanged(); + } else { + securityBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(builderForValue.build()); + onChanged(); + } else { + securityBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(index, builderForValue.build()); + onChanged(); + } else { + securityBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addAllSecurity( + java.lang.Iterable values) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, security_); + onChanged(); + } else { + securityBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder clearSecurity() { + if (securityBuilder_ == null) { + security_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + securityBuilder_.clear(); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder removeSecurity(int index) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.remove(index); + onChanged(); + } else { + securityBuilder_.remove(index); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder getSecurityBuilder( + int index) { + return getSecurityFieldBuilder().getBuilder(index); + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index) { + if (securityBuilder_ == null) { + return security_.get(index); } else { + return securityBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List + getSecurityOrBuilderList() { + if (securityBuilder_ != null) { + return securityBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(security_); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder() { + return getSecurityFieldBuilder().addBuilder( + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder( + int index) { + return getSecurityFieldBuilder().addBuilder( + index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List + getSecurityBuilderList() { + return getSecurityFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> + getSecurityFieldBuilder() { + if (securityBuilder_ == null) { + securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder>( + security_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + security_ = null; + } + return securityBuilder_; + } + + private java.util.List tags_ = + java.util.Collections.emptyList(); + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + tags_ = new java.util.ArrayList(tags_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Tag, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder> tagsBuilder_; + + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public java.util.List getTagsList() { + if (tagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tags_); + } else { + return tagsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public int getTagsCount() { + if (tagsBuilder_ == null) { + return tags_.size(); + } else { + return tagsBuilder_.getCount(); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); + } else { + return tagsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder setTags( + int index, grpc.gateway.protoc_gen_openapiv2.options.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + } else { + tagsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder setTags( + int index, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.set(index, builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addTags(grpc.gateway.protoc_gen_openapiv2.options.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + } else { + tagsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addTags( + int index, grpc.gateway.protoc_gen_openapiv2.options.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(index, value); + onChanged(); + } else { + tagsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addTags( + grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.add(builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addTags( + int index, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.add(index, builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addAllTags( + java.lang.Iterable values) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + } else { + tagsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder clearTags() { + if (tagsBuilder_ == null) { + tags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + tagsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder removeTags(int index) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.remove(index); + onChanged(); + } else { + tagsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder getTagsBuilder( + int index) { + return getTagsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( + int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); } else { + return tagsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public java.util.List + getTagsOrBuilderList() { + if (tagsBuilder_ != null) { + return tagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tags_); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder addTagsBuilder() { + return getTagsFieldBuilder().addBuilder( + grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder addTagsBuilder( + int index) { + return getTagsFieldBuilder().addBuilder( + index, grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public java.util.List + getTagsBuilderList() { + return getTagsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Tag, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder> + getTagsFieldBuilder() { + if (tagsBuilder_ == null) { + tagsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.Tag, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder>( + tags_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + tags_ = null; + } + return tagsBuilder_; + } + + private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + if (externalDocsBuilder_ == null) { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } else { + return externalDocsBuilder_.getMessage(); + } + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalDocs_ = value; + } else { + externalDocsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs( + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { + if (externalDocsBuilder_ == null) { + externalDocs_ = builderForValue.build(); + } else { + externalDocsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) && + externalDocs_ != null && + externalDocs_ != grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { + getExternalDocsBuilder().mergeFrom(value); + } else { + externalDocs_ = value; + } + } else { + externalDocsBuilder_.mergeFrom(value); + } + if (externalDocs_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public Builder clearExternalDocs() { + bitField0_ = (bitField0_ & ~0x00000800); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getExternalDocsFieldBuilder().getBuilder(); + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + if (externalDocsBuilder_ != null) { + return externalDocsBuilder_.getMessageOrBuilder(); + } else { + return externalDocs_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> + getExternalDocsFieldBuilder() { + if (externalDocsBuilder_ == null) { + externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( + getExternalDocs(), + getParentForChildren(), + isClean()); + externalDocs_ = null; + } + return externalDocsBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00001000; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00001000); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00001000; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00001000; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00001000; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + private static final grpc.gateway.protoc_gen_openapiv2.options.Swagger DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Swagger(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Swagger parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java new file mode 100644 index 00000000..4a29212a --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java @@ -0,0 +1,568 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface SwaggerOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Specifies the OpenAPI Specification version being used. It can be
+   * used by the OpenAPI UI and other clients to interpret the API listing. The
+   * value MUST be "2.0".
+   * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The swagger. + */ + java.lang.String getSwagger(); + /** + *
+   * Specifies the OpenAPI Specification version being used. It can be
+   * used by the OpenAPI UI and other clients to interpret the API listing. The
+   * value MUST be "2.0".
+   * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The bytes for swagger. + */ + com.google.protobuf.ByteString + getSwaggerBytes(); + + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + boolean hasInfo(); + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return The info. + */ + grpc.gateway.protoc_gen_openapiv2.options.Info getInfo(); + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder(); + + /** + *
+   * The host (name or ip) serving the API. This MUST be the host only and does
+   * not include the scheme nor sub-paths. It MAY include a port. If the host is
+   * not included, the host serving the documentation is to be used (including
+   * the port). The host does not support path templating.
+   * 
+ * + * string host = 3 [json_name = "host"]; + * @return The host. + */ + java.lang.String getHost(); + /** + *
+   * The host (name or ip) serving the API. This MUST be the host only and does
+   * not include the scheme nor sub-paths. It MAY include a port. If the host is
+   * not included, the host serving the documentation is to be used (including
+   * the port). The host does not support path templating.
+   * 
+ * + * string host = 3 [json_name = "host"]; + * @return The bytes for host. + */ + com.google.protobuf.ByteString + getHostBytes(); + + /** + *
+   * The base path on which the API is served, which is relative to the host. If
+   * it is not included, the API is served directly under the host. The value
+   * MUST start with a leading slash (/). The basePath does not support path
+   * templating.
+   * Note that using `base_path` does not change the endpoint paths that are
+   * generated in the resulting OpenAPI file. If you wish to use `base_path`
+   * with relatively generated OpenAPI paths, the `base_path` prefix must be
+   * manually removed from your `google.api.http` paths and your code changed to
+   * serve the API from the `base_path`.
+   * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The basePath. + */ + java.lang.String getBasePath(); + /** + *
+   * The base path on which the API is served, which is relative to the host. If
+   * it is not included, the API is served directly under the host. The value
+   * MUST start with a leading slash (/). The basePath does not support path
+   * templating.
+   * Note that using `base_path` does not change the endpoint paths that are
+   * generated in the resulting OpenAPI file. If you wish to use `base_path`
+   * with relatively generated OpenAPI paths, the `base_path` prefix must be
+   * manually removed from your `google.api.http` paths and your code changed to
+   * serve the API from the `base_path`.
+   * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The bytes for basePath. + */ + com.google.protobuf.ByteString + getBasePathBytes(); + + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + java.util.List getSchemesList(); + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return The count of schemes. + */ + int getSchemesCount(); + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index); + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + java.util.List + getSchemesValueList(); + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + int getSchemesValue(int index); + + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + java.util.List + getConsumesList(); + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + int getConsumesCount(); + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + java.lang.String getConsumes(int index); + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + com.google.protobuf.ByteString + getConsumesBytes(int index); + + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + java.util.List + getProducesList(); + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + int getProducesCount(); + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + java.lang.String getProduces(int index); + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + com.google.protobuf.ByteString + getProducesBytes(int index); + + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + int getResponsesCount(); + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + boolean containsResponses( + java.lang.String key); + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getResponses(); + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + java.util.Map + getResponsesMap(); + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue); + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key); + + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return Whether the securityDefinitions field is set. + */ + boolean hasSecurityDefinitions(); + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return The securityDefinitions. + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions(); + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder(); + + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + java.util.List + getSecurityList(); + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index); + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + int getSecurityCount(); + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + java.util.List + getSecurityOrBuilderList(); + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index); + + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + java.util.List + getTagsList(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + int getTagsCount(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + java.util.List + getTagsOrBuilderList(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( + int index); + + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + boolean hasExternalDocs(); + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Tag.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Tag.java new file mode 100644 index 00000000..0b64e715 --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Tag.java @@ -0,0 +1,1386 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Tag` is a representation of OpenAPI v2 specification's Tag object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ +public final class Tag extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Tag) + TagOrBuilder { +private static final long serialVersionUID = 0L; + // Use Tag.newBuilder() to construct. + private Tag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Tag() { + name_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Tag(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Tag.class, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the tag. Use it to allow override of the name of a
+   * global Tag object, then use that name to reference the tag throughout the
+   * OpenAPI file.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the tag. Use it to allow override of the name of a
+   * global Tag object, then use that name to reference the tag throughout the
+   * OpenAPI file.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description for the tag. GFM syntax can be used for rich text
+   * representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description for the tag. GFM syntax can be used for rich text
+   * representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_DOCS_FIELD_NUMBER = 3; + private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + @java.lang.Override + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 4; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getExternalDocs()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getExternalDocs()); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Tag)) { + return super.equals(obj); + } + grpc.gateway.protoc_gen_openapiv2.options.Tag other = (grpc.gateway.protoc_gen_openapiv2.options.Tag) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasExternalDocs() != other.hasExternalDocs()) return false; + if (hasExternalDocs()) { + if (!getExternalDocs() + .equals(other.getExternalDocs())) return false; + } + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasExternalDocs()) { + hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; + hash = (53 * hash) + getExternalDocs().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Tag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Tag` is a representation of OpenAPI v2 specification's Tag object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Tag) + grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.gateway.protoc_gen_openapiv2.options.Tag.class, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder.class); + } + + // Construct using grpc.gateway.protoc_gen_openapiv2.options.Tag.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getExternalDocsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstanceForType() { + return grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance(); + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Tag build() { + grpc.gateway.protoc_gen_openapiv2.options.Tag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Tag buildPartial() { + grpc.gateway.protoc_gen_openapiv2.options.Tag result = new grpc.gateway.protoc_gen_openapiv2.options.Tag(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Tag result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.externalDocs_ = externalDocsBuilder_ == null + ? externalDocs_ + : externalDocsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Tag) { + return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Tag)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Tag other) { + if (other == grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasExternalDocs()) { + mergeExternalDocs(other.getExternalDocs()); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000008; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getExternalDocsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + if (externalDocsBuilder_ == null) { + return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } else { + return externalDocsBuilder_.getMessage(); + } + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalDocs_ = value; + } else { + externalDocsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs( + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { + if (externalDocsBuilder_ == null) { + externalDocs_ = builderForValue.build(); + } else { + externalDocsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + externalDocs_ != null && + externalDocs_ != grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { + getExternalDocsBuilder().mergeFrom(value); + } else { + externalDocs_ = value; + } + } else { + externalDocsBuilder_.mergeFrom(value); + } + if (externalDocs_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public Builder clearExternalDocs() { + bitField0_ = (bitField0_ & ~0x00000004); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getExternalDocsFieldBuilder().getBuilder(); + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + if (externalDocsBuilder_ != null) { + return externalDocsBuilder_.getMessageOrBuilder(); + } else { + return externalDocs_ == null ? + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> + getExternalDocsFieldBuilder() { + if (externalDocsBuilder_ == null) { + externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( + getExternalDocs(), + getParentForChildren(), + isClean()); + externalDocs_ = null; + } + return externalDocsBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000008; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000008; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Tag) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Tag) + private static final grpc.gateway.protoc_gen_openapiv2.options.Tag DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Tag(); + } + + public static grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java new file mode 100644 index 00000000..4d300a7f --- /dev/null +++ b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java @@ -0,0 +1,147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: protoc-gen-openapiv2/options/openapiv2.proto + +// Protobuf Java Version: 3.25.3 +package grpc.gateway.protoc_gen_openapiv2.options; + +public interface TagOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Tag) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the tag. Use it to allow override of the name of a
+   * global Tag object, then use that name to reference the tag throughout the
+   * OpenAPI file.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the tag. Use it to allow override of the name of a
+   * global Tag object, then use that name to reference the tag throughout the
+   * OpenAPI file.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A short description for the tag. GFM syntax can be used for rich text
+   * representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description for the tag. GFM syntax can be used for rich text
+   * representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + boolean hasExternalDocs(); + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationProto.java b/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationProto.java new file mode 100644 index 00000000..6df17b73 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationProto.java @@ -0,0 +1,220 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public final class AuthorizationProto { + private AuthorizationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_Entity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_Entity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_EntityCustom_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_EntityCustom_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_EntityChain_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_EntityChain_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_DecisionRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_DecisionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_DecisionResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_DecisionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_GetDecisionsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_GetDecisionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_GetDecisionsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_GetDecisionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_GetEntitlementsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_GetEntitlementsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_EntityEntitlements_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_EntityEntitlements_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_ResourceAttribute_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_ResourceAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_authorization_GetEntitlementsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!authorization/authorization.proto\022\raut" + + "horization\032\034google/api/annotations.proto" + + "\032\031google/protobuf/any.proto\032\024policy/obje" + + "cts.proto\"\226\002\n\006Entity\022\016\n\002id\030\001 \001(\tR\002id\022%\n\r" + + "email_address\030\002 \001(\tH\000R\014emailAddress\022\035\n\tu" + + "ser_name\030\003 \001(\tH\000R\010userName\022,\n\021remote_cla" + + "ims_url\030\004 \001(\tH\000R\017remoteClaimsUrl\022\022\n\003jwt\030" + + "\005 \001(\tH\000R\003jwt\022.\n\006claims\030\006 \001(\0132\024.google.pr" + + "otobuf.AnyH\000R\006claims\0225\n\006custom\030\007 \001(\0132\033.a" + + "uthorization.EntityCustomH\000R\006customB\r\n\013e" + + "ntity_type\"B\n\014EntityCustom\0222\n\textension\030" + + "\001 \001(\0132\024.google.protobuf.AnyR\textension\"P" + + "\n\013EntityChain\022\016\n\002id\030\001 \001(\tR\002id\0221\n\010entitie" + + "s\030\002 \003(\0132\025.authorization.EntityR\010entities" + + "\"\317\001\n\017DecisionRequest\022(\n\007actions\030\001 \003(\0132\016." + + "policy.ActionR\007actions\022?\n\rentity_chains\030" + + "\002 \003(\0132\032.authorization.EntityChainR\014entit" + + "yChains\022Q\n\023resource_attributes\030\003 \003(\0132 .a" + + "uthorization.ResourceAttributeR\022resource" + + "Attributes\"\316\002\n\020DecisionResponse\022&\n\017entit" + + "y_chain_id\030\001 \001(\tR\rentityChainId\0224\n\026resou" + + "rce_attributes_id\030\002 \001(\tR\024resourceAttribu" + + "tesId\022&\n\006action\030\003 \001(\0132\016.policy.ActionR\006a" + + "ction\022D\n\010decision\030\004 \001(\0162(.authorization." + + "DecisionResponse.DecisionR\010decision\022 \n\013o" + + "bligations\030\005 \003(\tR\013obligations\"L\n\010Decisio" + + "n\022\030\n\024DECISION_UNSPECIFIED\020\000\022\021\n\rDECISION_" + + "DENY\020\001\022\023\n\017DECISION_PERMIT\020\002\"b\n\023GetDecisi" + + "onsRequest\022K\n\021decision_requests\030\001 \003(\0132\036." + + "authorization.DecisionRequestR\020decisionR" + + "equests\"f\n\024GetDecisionsResponse\022N\n\022decis" + + "ion_responses\030\001 \003(\0132\037.authorization.Deci" + + "sionResponseR\021decisionResponses\"\222\001\n\026GetE" + + "ntitlementsRequest\0221\n\010entities\030\001 \003(\0132\025.a" + + "uthorization.EntityR\010entities\022;\n\005scope\030\002" + + " \001(\0132 .authorization.ResourceAttributeH\000" + + "R\005scope\210\001\001B\010\n\006_scope\"T\n\022EntityEntitlemen" + + "ts\022\033\n\tentity_id\030\001 \001(\tR\010entityId\022!\n\014attri" + + "bute_id\030\002 \003(\tR\013attributeId\":\n\021ResourceAt" + + "tribute\022%\n\016attribute_fqns\030\002 \003(\tR\rattribu" + + "teFqns\"`\n\027GetEntitlementsResponse\022E\n\014ent" + + "itlements\030\001 \003(\0132!.authorization.EntityEn" + + "titlementsR\014entitlements2\206\002\n\024Authorizati" + + "onService\022r\n\014GetDecisions\022\".authorizatio" + + "n.GetDecisionsRequest\032#.authorization.Ge" + + "tDecisionsResponse\"\031\202\323\344\223\002\023\"\021/v1/authoriz" + + "ation\022z\n\017GetEntitlements\022%.authorization" + + ".GetEntitlementsRequest\032&.authorization." + + "GetEntitlementsResponse\"\030\202\323\344\223\002\022\"\020/v1/ent" + + "itlementsB\213\001\n!io.opentdf.platform.author" + + "izationB\022AuthorizationProtoP\001\242\002\003AXX\252\002\rAu" + + "thorization\312\002\rAuthorization\342\002\031Authorizat" + + "ion\\GPBMetadata\352\002\rAuthorizationb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + io.opentdf.platform.policy.ObjectsProto.getDescriptor(), + }); + internal_static_authorization_Entity_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_authorization_Entity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_Entity_descriptor, + new java.lang.String[] { "Id", "EmailAddress", "UserName", "RemoteClaimsUrl", "Jwt", "Claims", "Custom", "EntityType", }); + internal_static_authorization_EntityCustom_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_authorization_EntityCustom_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_EntityCustom_descriptor, + new java.lang.String[] { "Extension", }); + internal_static_authorization_EntityChain_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_authorization_EntityChain_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_EntityChain_descriptor, + new java.lang.String[] { "Id", "Entities", }); + internal_static_authorization_DecisionRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_authorization_DecisionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_DecisionRequest_descriptor, + new java.lang.String[] { "Actions", "EntityChains", "ResourceAttributes", }); + internal_static_authorization_DecisionResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_authorization_DecisionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_DecisionResponse_descriptor, + new java.lang.String[] { "EntityChainId", "ResourceAttributesId", "Action", "Decision", "Obligations", }); + internal_static_authorization_GetDecisionsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_authorization_GetDecisionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_GetDecisionsRequest_descriptor, + new java.lang.String[] { "DecisionRequests", }); + internal_static_authorization_GetDecisionsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_authorization_GetDecisionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_GetDecisionsResponse_descriptor, + new java.lang.String[] { "DecisionResponses", }); + internal_static_authorization_GetEntitlementsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_authorization_GetEntitlementsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_GetEntitlementsRequest_descriptor, + new java.lang.String[] { "Entities", "Scope", }); + internal_static_authorization_EntityEntitlements_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_authorization_EntityEntitlements_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_EntityEntitlements_descriptor, + new java.lang.String[] { "EntityId", "AttributeId", }); + internal_static_authorization_ResourceAttribute_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_authorization_ResourceAttribute_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_ResourceAttribute_descriptor, + new java.lang.String[] { "AttributeFqns", }); + internal_static_authorization_GetEntitlementsResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_authorization_GetEntitlementsResponse_descriptor, + new java.lang.String[] { "Entitlements", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + io.opentdf.platform.policy.ObjectsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationServiceGrpc.java new file mode 100644 index 00000000..cee6cc34 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationServiceGrpc.java @@ -0,0 +1,367 @@ +package io.opentdf.platform.authorization; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.61.1)", + comments = "Source: authorization/authorization.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AuthorizationServiceGrpc { + + private AuthorizationServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "authorization.AuthorizationService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetDecisionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDecisions", + requestType = io.opentdf.platform.authorization.GetDecisionsRequest.class, + responseType = io.opentdf.platform.authorization.GetDecisionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetDecisionsMethod() { + io.grpc.MethodDescriptor getGetDecisionsMethod; + if ((getGetDecisionsMethod = AuthorizationServiceGrpc.getGetDecisionsMethod) == null) { + synchronized (AuthorizationServiceGrpc.class) { + if ((getGetDecisionsMethod = AuthorizationServiceGrpc.getGetDecisionsMethod) == null) { + AuthorizationServiceGrpc.getGetDecisionsMethod = getGetDecisionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDecisions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.authorization.GetDecisionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.authorization.GetDecisionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AuthorizationServiceMethodDescriptorSupplier("GetDecisions")) + .build(); + } + } + } + return getGetDecisionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetEntitlementsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEntitlements", + requestType = io.opentdf.platform.authorization.GetEntitlementsRequest.class, + responseType = io.opentdf.platform.authorization.GetEntitlementsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetEntitlementsMethod() { + io.grpc.MethodDescriptor getGetEntitlementsMethod; + if ((getGetEntitlementsMethod = AuthorizationServiceGrpc.getGetEntitlementsMethod) == null) { + synchronized (AuthorizationServiceGrpc.class) { + if ((getGetEntitlementsMethod = AuthorizationServiceGrpc.getGetEntitlementsMethod) == null) { + AuthorizationServiceGrpc.getGetEntitlementsMethod = getGetEntitlementsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEntitlements")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.authorization.GetEntitlementsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.authorization.GetEntitlementsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AuthorizationServiceMethodDescriptorSupplier("GetEntitlements")) + .build(); + } + } + } + return getGetEntitlementsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static AuthorizationServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizationServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizationServiceStub(channel, callOptions); + } + }; + return AuthorizationServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AuthorizationServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizationServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizationServiceBlockingStub(channel, callOptions); + } + }; + return AuthorizationServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static AuthorizationServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AuthorizationServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizationServiceFutureStub(channel, callOptions); + } + }; + return AuthorizationServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + */ + default void getDecisions(io.opentdf.platform.authorization.GetDecisionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDecisionsMethod(), responseObserver); + } + + /** + */ + default void getEntitlements(io.opentdf.platform.authorization.GetEntitlementsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetEntitlementsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AuthorizationService. + */ + public static abstract class AuthorizationServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return AuthorizationServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AuthorizationService. + */ + public static final class AuthorizationServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private AuthorizationServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizationServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizationServiceStub(channel, callOptions); + } + + /** + */ + public void getDecisions(io.opentdf.platform.authorization.GetDecisionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDecisionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getEntitlements(io.opentdf.platform.authorization.GetEntitlementsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEntitlementsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AuthorizationService. + */ + public static final class AuthorizationServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AuthorizationServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizationServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizationServiceBlockingStub(channel, callOptions); + } + + /** + */ + public io.opentdf.platform.authorization.GetDecisionsResponse getDecisions(io.opentdf.platform.authorization.GetDecisionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDecisionsMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.authorization.GetEntitlementsResponse getEntitlements(io.opentdf.platform.authorization.GetEntitlementsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEntitlementsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AuthorizationService. + */ + public static final class AuthorizationServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AuthorizationServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AuthorizationServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AuthorizationServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getDecisions( + io.opentdf.platform.authorization.GetDecisionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDecisionsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getEntitlements( + io.opentdf.platform.authorization.GetEntitlementsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEntitlementsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_DECISIONS = 0; + private static final int METHODID_GET_ENTITLEMENTS = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_DECISIONS: + serviceImpl.getDecisions((io.opentdf.platform.authorization.GetDecisionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ENTITLEMENTS: + serviceImpl.getEntitlements((io.opentdf.platform.authorization.GetEntitlementsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetDecisionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.authorization.GetDecisionsRequest, + io.opentdf.platform.authorization.GetDecisionsResponse>( + service, METHODID_GET_DECISIONS))) + .addMethod( + getGetEntitlementsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.authorization.GetEntitlementsRequest, + io.opentdf.platform.authorization.GetEntitlementsResponse>( + service, METHODID_GET_ENTITLEMENTS))) + .build(); + } + + private static abstract class AuthorizationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AuthorizationServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AuthorizationService"); + } + } + + private static final class AuthorizationServiceFileDescriptorSupplier + extends AuthorizationServiceBaseDescriptorSupplier { + AuthorizationServiceFileDescriptorSupplier() {} + } + + private static final class AuthorizationServiceMethodDescriptorSupplier + extends AuthorizationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AuthorizationServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AuthorizationServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AuthorizationServiceFileDescriptorSupplier()) + .addMethod(getGetDecisionsMethod()) + .addMethod(getGetEntitlementsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequest.java b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequest.java new file mode 100644 index 00000000..c5b90013 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequest.java @@ -0,0 +1,1552 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
+ *
+ *Example Request Get Decisions to answer the question -  Do Bob (represented by entity chain ec1)
+ *and Alice (represented by entity chain ec2) have TRANSMIT authorization for
+ *2 resources; resource1 (attr-set-1) defined by attributes foo:bar  resource2 (attr-set-2) defined by attribute foo:bar, color:red ?
+ *
+ *{
+ *"actions": [
+ *{
+ *"standard": "STANDARD_ACTION_TRANSMIT"
+ *}
+ *],
+ *"entityChains": [
+ *{
+ *"id": "ec1",
+ *"entities": [
+ *{
+ *"emailAddress": "bob@example.org"
+ *}
+ *]
+ *},
+ *{
+ *"id": "ec2",
+ *"entities": [
+ *{
+ *"userName": "alice@example.org"
+ *}
+ *]
+ *}
+ *],
+ *"resourceAttributes": [
+ *{
+ *"attributeFqns": [
+ *"https://www.example.org/attr/foo/value/value1"
+ *]
+ *},
+ *{
+ *"attributeFqns": [
+ *"https://example.net/attr/attr1/value/value1",
+ *"https://example.net/attr/attr1/value/value2"
+ *]
+ *}
+ *]
+ *}
+ * 
+ * + * Protobuf type {@code authorization.DecisionRequest} + */ +public final class DecisionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.DecisionRequest) + DecisionRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DecisionRequest.newBuilder() to construct. + private DecisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DecisionRequest() { + actions_ = java.util.Collections.emptyList(); + entityChains_ = java.util.Collections.emptyList(); + resourceAttributes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DecisionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.DecisionRequest.class, io.opentdf.platform.authorization.DecisionRequest.Builder.class); + } + + public static final int ACTIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List actions_; + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.Action getActions(int index) { + return actions_.get(index); + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(index); + } + + public static final int ENTITY_CHAINS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List entityChains_; + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + @java.lang.Override + public java.util.List getEntityChainsList() { + return entityChains_; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + @java.lang.Override + public java.util.List + getEntityChainsOrBuilderList() { + return entityChains_; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + @java.lang.Override + public int getEntityChainsCount() { + return entityChains_.size(); + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityChain getEntityChains(int index) { + return entityChains_.get(index); + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityChainOrBuilder getEntityChainsOrBuilder( + int index) { + return entityChains_.get(index); + } + + public static final int RESOURCE_ATTRIBUTES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List resourceAttributes_; + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + @java.lang.Override + public java.util.List getResourceAttributesList() { + return resourceAttributes_; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + @java.lang.Override + public java.util.List + getResourceAttributesOrBuilderList() { + return resourceAttributes_; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + @java.lang.Override + public int getResourceAttributesCount() { + return resourceAttributes_.size(); + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index) { + return resourceAttributes_.get(index); + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( + int index) { + return resourceAttributes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(1, actions_.get(i)); + } + for (int i = 0; i < entityChains_.size(); i++) { + output.writeMessage(2, entityChains_.get(i)); + } + for (int i = 0; i < resourceAttributes_.size(); i++) { + output.writeMessage(3, resourceAttributes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, actions_.get(i)); + } + for (int i = 0; i < entityChains_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, entityChains_.get(i)); + } + for (int i = 0; i < resourceAttributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, resourceAttributes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.DecisionRequest)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.DecisionRequest other = (io.opentdf.platform.authorization.DecisionRequest) obj; + + if (!getActionsList() + .equals(other.getActionsList())) return false; + if (!getEntityChainsList() + .equals(other.getEntityChainsList())) return false; + if (!getResourceAttributesList() + .equals(other.getResourceAttributesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + if (getEntityChainsCount() > 0) { + hash = (37 * hash) + ENTITY_CHAINS_FIELD_NUMBER; + hash = (53 * hash) + getEntityChainsList().hashCode(); + } + if (getResourceAttributesCount() > 0) { + hash = (37 * hash) + RESOURCE_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getResourceAttributesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.DecisionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.DecisionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.DecisionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.DecisionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.DecisionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *Example Request Get Decisions to answer the question -  Do Bob (represented by entity chain ec1)
+   *and Alice (represented by entity chain ec2) have TRANSMIT authorization for
+   *2 resources; resource1 (attr-set-1) defined by attributes foo:bar  resource2 (attr-set-2) defined by attribute foo:bar, color:red ?
+   *
+   *{
+   *"actions": [
+   *{
+   *"standard": "STANDARD_ACTION_TRANSMIT"
+   *}
+   *],
+   *"entityChains": [
+   *{
+   *"id": "ec1",
+   *"entities": [
+   *{
+   *"emailAddress": "bob@example.org"
+   *}
+   *]
+   *},
+   *{
+   *"id": "ec2",
+   *"entities": [
+   *{
+   *"userName": "alice@example.org"
+   *}
+   *]
+   *}
+   *],
+   *"resourceAttributes": [
+   *{
+   *"attributeFqns": [
+   *"https://www.example.org/attr/foo/value/value1"
+   *]
+   *},
+   *{
+   *"attributeFqns": [
+   *"https://example.net/attr/attr1/value/value1",
+   *"https://example.net/attr/attr1/value/value2"
+   *]
+   *}
+   *]
+   *}
+   * 
+ * + * Protobuf type {@code authorization.DecisionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.DecisionRequest) + io.opentdf.platform.authorization.DecisionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.DecisionRequest.class, io.opentdf.platform.authorization.DecisionRequest.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.DecisionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (entityChainsBuilder_ == null) { + entityChains_ = java.util.Collections.emptyList(); + } else { + entityChains_ = null; + entityChainsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (resourceAttributesBuilder_ == null) { + resourceAttributes_ = java.util.Collections.emptyList(); + } else { + resourceAttributes_ = null; + resourceAttributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.DecisionRequest getDefaultInstanceForType() { + return io.opentdf.platform.authorization.DecisionRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.DecisionRequest build() { + io.opentdf.platform.authorization.DecisionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.DecisionRequest buildPartial() { + io.opentdf.platform.authorization.DecisionRequest result = new io.opentdf.platform.authorization.DecisionRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.authorization.DecisionRequest result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + if (entityChainsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + entityChains_ = java.util.Collections.unmodifiableList(entityChains_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.entityChains_ = entityChains_; + } else { + result.entityChains_ = entityChainsBuilder_.build(); + } + if (resourceAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + resourceAttributes_ = java.util.Collections.unmodifiableList(resourceAttributes_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.resourceAttributes_ = resourceAttributes_; + } else { + result.resourceAttributes_ = resourceAttributesBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.authorization.DecisionRequest result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.DecisionRequest) { + return mergeFrom((io.opentdf.platform.authorization.DecisionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.DecisionRequest other) { + if (other == io.opentdf.platform.authorization.DecisionRequest.getDefaultInstance()) return this; + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000001); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionsFieldBuilder() : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + if (entityChainsBuilder_ == null) { + if (!other.entityChains_.isEmpty()) { + if (entityChains_.isEmpty()) { + entityChains_ = other.entityChains_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEntityChainsIsMutable(); + entityChains_.addAll(other.entityChains_); + } + onChanged(); + } + } else { + if (!other.entityChains_.isEmpty()) { + if (entityChainsBuilder_.isEmpty()) { + entityChainsBuilder_.dispose(); + entityChainsBuilder_ = null; + entityChains_ = other.entityChains_; + bitField0_ = (bitField0_ & ~0x00000002); + entityChainsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEntityChainsFieldBuilder() : null; + } else { + entityChainsBuilder_.addAllMessages(other.entityChains_); + } + } + } + if (resourceAttributesBuilder_ == null) { + if (!other.resourceAttributes_.isEmpty()) { + if (resourceAttributes_.isEmpty()) { + resourceAttributes_ = other.resourceAttributes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureResourceAttributesIsMutable(); + resourceAttributes_.addAll(other.resourceAttributes_); + } + onChanged(); + } + } else { + if (!other.resourceAttributes_.isEmpty()) { + if (resourceAttributesBuilder_.isEmpty()) { + resourceAttributesBuilder_.dispose(); + resourceAttributesBuilder_ = null; + resourceAttributes_ = other.resourceAttributes_; + bitField0_ = (bitField0_ & ~0x00000004); + resourceAttributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResourceAttributesFieldBuilder() : null; + } else { + resourceAttributesBuilder_.addAllMessages(other.resourceAttributes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.Action m = + input.readMessage( + io.opentdf.platform.policy.Action.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + io.opentdf.platform.authorization.EntityChain m = + input.readMessage( + io.opentdf.platform.authorization.EntityChain.parser(), + extensionRegistry); + if (entityChainsBuilder_ == null) { + ensureEntityChainsIsMutable(); + entityChains_.add(m); + } else { + entityChainsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + io.opentdf.platform.authorization.ResourceAttribute m = + input.readMessage( + io.opentdf.platform.authorization.ResourceAttribute.parser(), + extensionRegistry); + if (resourceAttributesBuilder_ == null) { + ensureResourceAttributesIsMutable(); + resourceAttributes_.add(m); + } else { + resourceAttributesBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionsBuilder_; + + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder setActions( + int index, io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder setActions( + int index, io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder addActions(io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder addActions( + int index, io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder addActions( + io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder addActions( + int index, io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder getActionsBuilder( + int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( + io.opentdf.platform.policy.Action.getDefaultInstance()); + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder addActionsBuilder( + int index) { + return getActionsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Action.getDefaultInstance()); + } + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( + actions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + private java.util.List entityChains_ = + java.util.Collections.emptyList(); + private void ensureEntityChainsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + entityChains_ = new java.util.ArrayList(entityChains_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.EntityChain, io.opentdf.platform.authorization.EntityChain.Builder, io.opentdf.platform.authorization.EntityChainOrBuilder> entityChainsBuilder_; + + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public java.util.List getEntityChainsList() { + if (entityChainsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entityChains_); + } else { + return entityChainsBuilder_.getMessageList(); + } + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public int getEntityChainsCount() { + if (entityChainsBuilder_ == null) { + return entityChains_.size(); + } else { + return entityChainsBuilder_.getCount(); + } + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public io.opentdf.platform.authorization.EntityChain getEntityChains(int index) { + if (entityChainsBuilder_ == null) { + return entityChains_.get(index); + } else { + return entityChainsBuilder_.getMessage(index); + } + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder setEntityChains( + int index, io.opentdf.platform.authorization.EntityChain value) { + if (entityChainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityChainsIsMutable(); + entityChains_.set(index, value); + onChanged(); + } else { + entityChainsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder setEntityChains( + int index, io.opentdf.platform.authorization.EntityChain.Builder builderForValue) { + if (entityChainsBuilder_ == null) { + ensureEntityChainsIsMutable(); + entityChains_.set(index, builderForValue.build()); + onChanged(); + } else { + entityChainsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder addEntityChains(io.opentdf.platform.authorization.EntityChain value) { + if (entityChainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityChainsIsMutable(); + entityChains_.add(value); + onChanged(); + } else { + entityChainsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder addEntityChains( + int index, io.opentdf.platform.authorization.EntityChain value) { + if (entityChainsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityChainsIsMutable(); + entityChains_.add(index, value); + onChanged(); + } else { + entityChainsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder addEntityChains( + io.opentdf.platform.authorization.EntityChain.Builder builderForValue) { + if (entityChainsBuilder_ == null) { + ensureEntityChainsIsMutable(); + entityChains_.add(builderForValue.build()); + onChanged(); + } else { + entityChainsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder addEntityChains( + int index, io.opentdf.platform.authorization.EntityChain.Builder builderForValue) { + if (entityChainsBuilder_ == null) { + ensureEntityChainsIsMutable(); + entityChains_.add(index, builderForValue.build()); + onChanged(); + } else { + entityChainsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder addAllEntityChains( + java.lang.Iterable values) { + if (entityChainsBuilder_ == null) { + ensureEntityChainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, entityChains_); + onChanged(); + } else { + entityChainsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder clearEntityChains() { + if (entityChainsBuilder_ == null) { + entityChains_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + entityChainsBuilder_.clear(); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public Builder removeEntityChains(int index) { + if (entityChainsBuilder_ == null) { + ensureEntityChainsIsMutable(); + entityChains_.remove(index); + onChanged(); + } else { + entityChainsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public io.opentdf.platform.authorization.EntityChain.Builder getEntityChainsBuilder( + int index) { + return getEntityChainsFieldBuilder().getBuilder(index); + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public io.opentdf.platform.authorization.EntityChainOrBuilder getEntityChainsOrBuilder( + int index) { + if (entityChainsBuilder_ == null) { + return entityChains_.get(index); } else { + return entityChainsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public java.util.List + getEntityChainsOrBuilderList() { + if (entityChainsBuilder_ != null) { + return entityChainsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entityChains_); + } + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public io.opentdf.platform.authorization.EntityChain.Builder addEntityChainsBuilder() { + return getEntityChainsFieldBuilder().addBuilder( + io.opentdf.platform.authorization.EntityChain.getDefaultInstance()); + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public io.opentdf.platform.authorization.EntityChain.Builder addEntityChainsBuilder( + int index) { + return getEntityChainsFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.EntityChain.getDefaultInstance()); + } + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + public java.util.List + getEntityChainsBuilderList() { + return getEntityChainsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.EntityChain, io.opentdf.platform.authorization.EntityChain.Builder, io.opentdf.platform.authorization.EntityChainOrBuilder> + getEntityChainsFieldBuilder() { + if (entityChainsBuilder_ == null) { + entityChainsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.EntityChain, io.opentdf.platform.authorization.EntityChain.Builder, io.opentdf.platform.authorization.EntityChainOrBuilder>( + entityChains_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + entityChains_ = null; + } + return entityChainsBuilder_; + } + + private java.util.List resourceAttributes_ = + java.util.Collections.emptyList(); + private void ensureResourceAttributesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + resourceAttributes_ = new java.util.ArrayList(resourceAttributes_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> resourceAttributesBuilder_; + + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public java.util.List getResourceAttributesList() { + if (resourceAttributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceAttributes_); + } else { + return resourceAttributesBuilder_.getMessageList(); + } + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public int getResourceAttributesCount() { + if (resourceAttributesBuilder_ == null) { + return resourceAttributes_.size(); + } else { + return resourceAttributesBuilder_.getCount(); + } + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index) { + if (resourceAttributesBuilder_ == null) { + return resourceAttributes_.get(index); + } else { + return resourceAttributesBuilder_.getMessage(index); + } + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder setResourceAttributes( + int index, io.opentdf.platform.authorization.ResourceAttribute value) { + if (resourceAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceAttributesIsMutable(); + resourceAttributes_.set(index, value); + onChanged(); + } else { + resourceAttributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder setResourceAttributes( + int index, io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { + if (resourceAttributesBuilder_ == null) { + ensureResourceAttributesIsMutable(); + resourceAttributes_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceAttributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder addResourceAttributes(io.opentdf.platform.authorization.ResourceAttribute value) { + if (resourceAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceAttributesIsMutable(); + resourceAttributes_.add(value); + onChanged(); + } else { + resourceAttributesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder addResourceAttributes( + int index, io.opentdf.platform.authorization.ResourceAttribute value) { + if (resourceAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceAttributesIsMutable(); + resourceAttributes_.add(index, value); + onChanged(); + } else { + resourceAttributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder addResourceAttributes( + io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { + if (resourceAttributesBuilder_ == null) { + ensureResourceAttributesIsMutable(); + resourceAttributes_.add(builderForValue.build()); + onChanged(); + } else { + resourceAttributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder addResourceAttributes( + int index, io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { + if (resourceAttributesBuilder_ == null) { + ensureResourceAttributesIsMutable(); + resourceAttributes_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceAttributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder addAllResourceAttributes( + java.lang.Iterable values) { + if (resourceAttributesBuilder_ == null) { + ensureResourceAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resourceAttributes_); + onChanged(); + } else { + resourceAttributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder clearResourceAttributes() { + if (resourceAttributesBuilder_ == null) { + resourceAttributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + resourceAttributesBuilder_.clear(); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public Builder removeResourceAttributes(int index) { + if (resourceAttributesBuilder_ == null) { + ensureResourceAttributesIsMutable(); + resourceAttributes_.remove(index); + onChanged(); + } else { + resourceAttributesBuilder_.remove(index); + } + return this; + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public io.opentdf.platform.authorization.ResourceAttribute.Builder getResourceAttributesBuilder( + int index) { + return getResourceAttributesFieldBuilder().getBuilder(index); + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( + int index) { + if (resourceAttributesBuilder_ == null) { + return resourceAttributes_.get(index); } else { + return resourceAttributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public java.util.List + getResourceAttributesOrBuilderList() { + if (resourceAttributesBuilder_ != null) { + return resourceAttributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceAttributes_); + } + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public io.opentdf.platform.authorization.ResourceAttribute.Builder addResourceAttributesBuilder() { + return getResourceAttributesFieldBuilder().addBuilder( + io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()); + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public io.opentdf.platform.authorization.ResourceAttribute.Builder addResourceAttributesBuilder( + int index) { + return getResourceAttributesFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()); + } + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + public java.util.List + getResourceAttributesBuilderList() { + return getResourceAttributesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> + getResourceAttributesFieldBuilder() { + if (resourceAttributesBuilder_ == null) { + resourceAttributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder>( + resourceAttributes_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + resourceAttributes_ = null; + } + return resourceAttributesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.DecisionRequest) + } + + // @@protoc_insertion_point(class_scope:authorization.DecisionRequest) + private static final io.opentdf.platform.authorization.DecisionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.DecisionRequest(); + } + + public static io.opentdf.platform.authorization.DecisionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DecisionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.DecisionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java new file mode 100644 index 00000000..390c59ac --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface DecisionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.DecisionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + java.util.List + getActionsList(); + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + io.opentdf.platform.policy.Action getActions(int index); + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + int getActionsCount(); + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + java.util.List + getActionsOrBuilderList(); + /** + * repeated .policy.Action actions = 1 [json_name = "actions"]; + */ + io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index); + + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + java.util.List + getEntityChainsList(); + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + io.opentdf.platform.authorization.EntityChain getEntityChains(int index); + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + int getEntityChainsCount(); + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + java.util.List + getEntityChainsOrBuilderList(); + /** + * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; + */ + io.opentdf.platform.authorization.EntityChainOrBuilder getEntityChainsOrBuilder( + int index); + + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + java.util.List + getResourceAttributesList(); + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index); + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + int getResourceAttributesCount(); + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + java.util.List + getResourceAttributesOrBuilderList(); + /** + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; + */ + io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponse.java b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponse.java new file mode 100644 index 00000000..19f4c687 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponse.java @@ -0,0 +1,1531 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
+ *
+ *
+ *Example response for a Decision Request -  Do Bob (represented by entity chain ec1)
+ *and Alice (represented by entity chain ec2) have TRANSMIT authorization for
+ *2 resources; resource1 (attr-set-1) defined by attributes foo:bar  resource2 (attr-set-2) defined by attribute foo:bar, color:red ?
+ *
+ *Results:
+ *- bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation
+ *- bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes
+ *- alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes
+ *- alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes
+ *
+ *{
+ *"entityChainId":  "ec1",
+ *"resourceAttributesId":  "attr-set-1",
+ *"decision":  "DECISION_PERMIT",
+ *"obligations":  [
+ *"http://www.example.org/obligation/watermark"
+ *]
+ *},
+ *{
+ *"entityChainId":  "ec1",
+ *"resourceAttributesId":  "attr-set-2",
+ *"decision":  "DECISION_PERMIT"
+ *},
+ *{
+ *"entityChainId":  "ec2",
+ *"resourceAttributesId":  "attr-set-1",
+ *"decision":  "DECISION_PERMIT"
+ *},
+ *{
+ *"entityChainId":  "ec2",
+ *"resourceAttributesId":  "attr-set-2",
+ *"decision":  "DECISION_DENY"
+ *}
+ * 
+ * + * Protobuf type {@code authorization.DecisionResponse} + */ +public final class DecisionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.DecisionResponse) + DecisionResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DecisionResponse.newBuilder() to construct. + private DecisionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DecisionResponse() { + entityChainId_ = ""; + resourceAttributesId_ = ""; + decision_ = 0; + obligations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DecisionResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.DecisionResponse.class, io.opentdf.platform.authorization.DecisionResponse.Builder.class); + } + + /** + * Protobuf enum {@code authorization.DecisionResponse.Decision} + */ + public enum Decision + implements com.google.protobuf.ProtocolMessageEnum { + /** + * DECISION_UNSPECIFIED = 0; + */ + DECISION_UNSPECIFIED(0), + /** + * DECISION_DENY = 1; + */ + DECISION_DENY(1), + /** + * DECISION_PERMIT = 2; + */ + DECISION_PERMIT(2), + UNRECOGNIZED(-1), + ; + + /** + * DECISION_UNSPECIFIED = 0; + */ + public static final int DECISION_UNSPECIFIED_VALUE = 0; + /** + * DECISION_DENY = 1; + */ + public static final int DECISION_DENY_VALUE = 1; + /** + * DECISION_PERMIT = 2; + */ + public static final int DECISION_PERMIT_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Decision valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Decision forNumber(int value) { + switch (value) { + case 0: return DECISION_UNSPECIFIED; + case 1: return DECISION_DENY; + case 2: return DECISION_PERMIT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Decision> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Decision findValueByNumber(int number) { + return Decision.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.opentdf.platform.authorization.DecisionResponse.getDescriptor().getEnumTypes().get(0); + } + + private static final Decision[] VALUES = values(); + + public static Decision valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Decision(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:authorization.DecisionResponse.Decision) + } + + private int bitField0_; + public static final int ENTITY_CHAIN_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object entityChainId_ = ""; + /** + *
+   * ephemeral entity chain id from the request
+   * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @return The entityChainId. + */ + @java.lang.Override + public java.lang.String getEntityChainId() { + java.lang.Object ref = entityChainId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityChainId_ = s; + return s; + } + } + /** + *
+   * ephemeral entity chain id from the request
+   * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @return The bytes for entityChainId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntityChainIdBytes() { + java.lang.Object ref = entityChainId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityChainId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_ATTRIBUTES_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceAttributesId_ = ""; + /** + *
+   * ephemeral resource attributes id from the request
+   * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @return The resourceAttributesId. + */ + @java.lang.Override + public java.lang.String getResourceAttributesId() { + java.lang.Object ref = resourceAttributesId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceAttributesId_ = s; + return s; + } + } + /** + *
+   * ephemeral resource attributes id from the request
+   * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @return The bytes for resourceAttributesId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceAttributesIdBytes() { + java.lang.Object ref = resourceAttributesId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceAttributesId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 3; + private io.opentdf.platform.policy.Action action_; + /** + *
+   * Action of the decision response
+   * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + * @return Whether the action field is set. + */ + @java.lang.Override + public boolean hasAction() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Action of the decision response
+   * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + * @return The action. + */ + @java.lang.Override + public io.opentdf.platform.policy.Action getAction() { + return action_ == null ? io.opentdf.platform.policy.Action.getDefaultInstance() : action_; + } + /** + *
+   * Action of the decision response
+   * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ActionOrBuilder getActionOrBuilder() { + return action_ == null ? io.opentdf.platform.policy.Action.getDefaultInstance() : action_; + } + + public static final int DECISION_FIELD_NUMBER = 4; + private int decision_ = 0; + /** + *
+   * The decision response
+   * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @return The enum numeric value on the wire for decision. + */ + @java.lang.Override public int getDecisionValue() { + return decision_; + } + /** + *
+   * The decision response
+   * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @return The decision. + */ + @java.lang.Override public io.opentdf.platform.authorization.DecisionResponse.Decision getDecision() { + io.opentdf.platform.authorization.DecisionResponse.Decision result = io.opentdf.platform.authorization.DecisionResponse.Decision.forNumber(decision_); + return result == null ? io.opentdf.platform.authorization.DecisionResponse.Decision.UNRECOGNIZED : result; + } + + public static final int OBLIGATIONS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList obligations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   *optional list of obligations represented in URI format
+   * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @return A list containing the obligations. + */ + public com.google.protobuf.ProtocolStringList + getObligationsList() { + return obligations_; + } + /** + *
+   *optional list of obligations represented in URI format
+   * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @return The count of obligations. + */ + public int getObligationsCount() { + return obligations_.size(); + } + /** + *
+   *optional list of obligations represented in URI format
+   * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param index The index of the element to return. + * @return The obligations at the given index. + */ + public java.lang.String getObligations(int index) { + return obligations_.get(index); + } + /** + *
+   *optional list of obligations represented in URI format
+   * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param index The index of the value to return. + * @return The bytes of the obligations at the given index. + */ + public com.google.protobuf.ByteString + getObligationsBytes(int index) { + return obligations_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityChainId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityChainId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceAttributesId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceAttributesId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAction()); + } + if (decision_ != io.opentdf.platform.authorization.DecisionResponse.Decision.DECISION_UNSPECIFIED.getNumber()) { + output.writeEnum(4, decision_); + } + for (int i = 0; i < obligations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, obligations_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityChainId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityChainId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceAttributesId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceAttributesId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAction()); + } + if (decision_ != io.opentdf.platform.authorization.DecisionResponse.Decision.DECISION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, decision_); + } + { + int dataSize = 0; + for (int i = 0; i < obligations_.size(); i++) { + dataSize += computeStringSizeNoTag(obligations_.getRaw(i)); + } + size += dataSize; + size += 1 * getObligationsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.DecisionResponse)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.DecisionResponse other = (io.opentdf.platform.authorization.DecisionResponse) obj; + + if (!getEntityChainId() + .equals(other.getEntityChainId())) return false; + if (!getResourceAttributesId() + .equals(other.getResourceAttributesId())) return false; + if (hasAction() != other.hasAction()) return false; + if (hasAction()) { + if (!getAction() + .equals(other.getAction())) return false; + } + if (decision_ != other.decision_) return false; + if (!getObligationsList() + .equals(other.getObligationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITY_CHAIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityChainId().hashCode(); + hash = (37 * hash) + RESOURCE_ATTRIBUTES_ID_FIELD_NUMBER; + hash = (53 * hash) + getResourceAttributesId().hashCode(); + if (hasAction()) { + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + } + hash = (37 * hash) + DECISION_FIELD_NUMBER; + hash = (53 * hash) + decision_; + if (getObligationsCount() > 0) { + hash = (37 * hash) + OBLIGATIONS_FIELD_NUMBER; + hash = (53 * hash) + getObligationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.DecisionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.DecisionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.DecisionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.DecisionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.DecisionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *
+   *Example response for a Decision Request -  Do Bob (represented by entity chain ec1)
+   *and Alice (represented by entity chain ec2) have TRANSMIT authorization for
+   *2 resources; resource1 (attr-set-1) defined by attributes foo:bar  resource2 (attr-set-2) defined by attribute foo:bar, color:red ?
+   *
+   *Results:
+   *- bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation
+   *- bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes
+   *- alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes
+   *- alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes
+   *
+   *{
+   *"entityChainId":  "ec1",
+   *"resourceAttributesId":  "attr-set-1",
+   *"decision":  "DECISION_PERMIT",
+   *"obligations":  [
+   *"http://www.example.org/obligation/watermark"
+   *]
+   *},
+   *{
+   *"entityChainId":  "ec1",
+   *"resourceAttributesId":  "attr-set-2",
+   *"decision":  "DECISION_PERMIT"
+   *},
+   *{
+   *"entityChainId":  "ec2",
+   *"resourceAttributesId":  "attr-set-1",
+   *"decision":  "DECISION_PERMIT"
+   *},
+   *{
+   *"entityChainId":  "ec2",
+   *"resourceAttributesId":  "attr-set-2",
+   *"decision":  "DECISION_DENY"
+   *}
+   * 
+ * + * Protobuf type {@code authorization.DecisionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.DecisionResponse) + io.opentdf.platform.authorization.DecisionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.DecisionResponse.class, io.opentdf.platform.authorization.DecisionResponse.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.DecisionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getActionFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + entityChainId_ = ""; + resourceAttributesId_ = ""; + action_ = null; + if (actionBuilder_ != null) { + actionBuilder_.dispose(); + actionBuilder_ = null; + } + decision_ = 0; + obligations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.DecisionResponse getDefaultInstanceForType() { + return io.opentdf.platform.authorization.DecisionResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.DecisionResponse build() { + io.opentdf.platform.authorization.DecisionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.DecisionResponse buildPartial() { + io.opentdf.platform.authorization.DecisionResponse result = new io.opentdf.platform.authorization.DecisionResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.authorization.DecisionResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.entityChainId_ = entityChainId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceAttributesId_ = resourceAttributesId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.action_ = actionBuilder_ == null + ? action_ + : actionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.decision_ = decision_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + obligations_.makeImmutable(); + result.obligations_ = obligations_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.DecisionResponse) { + return mergeFrom((io.opentdf.platform.authorization.DecisionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.DecisionResponse other) { + if (other == io.opentdf.platform.authorization.DecisionResponse.getDefaultInstance()) return this; + if (!other.getEntityChainId().isEmpty()) { + entityChainId_ = other.entityChainId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceAttributesId().isEmpty()) { + resourceAttributesId_ = other.resourceAttributesId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAction()) { + mergeAction(other.getAction()); + } + if (other.decision_ != 0) { + setDecisionValue(other.getDecisionValue()); + } + if (!other.obligations_.isEmpty()) { + if (obligations_.isEmpty()) { + obligations_ = other.obligations_; + bitField0_ |= 0x00000010; + } else { + ensureObligationsIsMutable(); + obligations_.addAll(other.obligations_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + entityChainId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + resourceAttributesId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getActionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + decision_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + ensureObligationsIsMutable(); + obligations_.add(s); + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object entityChainId_ = ""; + /** + *
+     * ephemeral entity chain id from the request
+     * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @return The entityChainId. + */ + public java.lang.String getEntityChainId() { + java.lang.Object ref = entityChainId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityChainId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ephemeral entity chain id from the request
+     * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @return The bytes for entityChainId. + */ + public com.google.protobuf.ByteString + getEntityChainIdBytes() { + java.lang.Object ref = entityChainId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityChainId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ephemeral entity chain id from the request
+     * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @param value The entityChainId to set. + * @return This builder for chaining. + */ + public Builder setEntityChainId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entityChainId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * ephemeral entity chain id from the request
+     * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @return This builder for chaining. + */ + public Builder clearEntityChainId() { + entityChainId_ = getDefaultInstance().getEntityChainId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * ephemeral entity chain id from the request
+     * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @param value The bytes for entityChainId to set. + * @return This builder for chaining. + */ + public Builder setEntityChainIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entityChainId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object resourceAttributesId_ = ""; + /** + *
+     * ephemeral resource attributes id from the request
+     * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @return The resourceAttributesId. + */ + public java.lang.String getResourceAttributesId() { + java.lang.Object ref = resourceAttributesId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceAttributesId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ephemeral resource attributes id from the request
+     * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @return The bytes for resourceAttributesId. + */ + public com.google.protobuf.ByteString + getResourceAttributesIdBytes() { + java.lang.Object ref = resourceAttributesId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceAttributesId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ephemeral resource attributes id from the request
+     * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @param value The resourceAttributesId to set. + * @return This builder for chaining. + */ + public Builder setResourceAttributesId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resourceAttributesId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * ephemeral resource attributes id from the request
+     * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @return This builder for chaining. + */ + public Builder clearResourceAttributesId() { + resourceAttributesId_ = getDefaultInstance().getResourceAttributesId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * ephemeral resource attributes id from the request
+     * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @param value The bytes for resourceAttributesId to set. + * @return This builder for chaining. + */ + public Builder setResourceAttributesIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resourceAttributesId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.Action action_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionBuilder_; + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + * @return Whether the action field is set. + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + * @return The action. + */ + public io.opentdf.platform.policy.Action getAction() { + if (actionBuilder_ == null) { + return action_ == null ? io.opentdf.platform.policy.Action.getDefaultInstance() : action_; + } else { + return actionBuilder_.getMessage(); + } + } + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + public Builder setAction(io.opentdf.platform.policy.Action value) { + if (actionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + } else { + actionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + public Builder setAction( + io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionBuilder_ == null) { + action_ = builderForValue.build(); + } else { + actionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + public Builder mergeAction(io.opentdf.platform.policy.Action value) { + if (actionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + action_ != null && + action_ != io.opentdf.platform.policy.Action.getDefaultInstance()) { + getActionBuilder().mergeFrom(value); + } else { + action_ = value; + } + } else { + actionBuilder_.mergeFrom(value); + } + if (action_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000004); + action_ = null; + if (actionBuilder_ != null) { + actionBuilder_.dispose(); + actionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + public io.opentdf.platform.policy.Action.Builder getActionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getActionFieldBuilder().getBuilder(); + } + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + public io.opentdf.platform.policy.ActionOrBuilder getActionOrBuilder() { + if (actionBuilder_ != null) { + return actionBuilder_.getMessageOrBuilder(); + } else { + return action_ == null ? + io.opentdf.platform.policy.Action.getDefaultInstance() : action_; + } + } + /** + *
+     * Action of the decision response
+     * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> + getActionFieldBuilder() { + if (actionBuilder_ == null) { + actionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( + getAction(), + getParentForChildren(), + isClean()); + action_ = null; + } + return actionBuilder_; + } + + private int decision_ = 0; + /** + *
+     * The decision response
+     * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @return The enum numeric value on the wire for decision. + */ + @java.lang.Override public int getDecisionValue() { + return decision_; + } + /** + *
+     * The decision response
+     * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @param value The enum numeric value on the wire for decision to set. + * @return This builder for chaining. + */ + public Builder setDecisionValue(int value) { + decision_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The decision response
+     * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @return The decision. + */ + @java.lang.Override + public io.opentdf.platform.authorization.DecisionResponse.Decision getDecision() { + io.opentdf.platform.authorization.DecisionResponse.Decision result = io.opentdf.platform.authorization.DecisionResponse.Decision.forNumber(decision_); + return result == null ? io.opentdf.platform.authorization.DecisionResponse.Decision.UNRECOGNIZED : result; + } + /** + *
+     * The decision response
+     * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @param value The decision to set. + * @return This builder for chaining. + */ + public Builder setDecision(io.opentdf.platform.authorization.DecisionResponse.Decision value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + decision_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The decision response
+     * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @return This builder for chaining. + */ + public Builder clearDecision() { + bitField0_ = (bitField0_ & ~0x00000008); + decision_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList obligations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureObligationsIsMutable() { + if (!obligations_.isModifiable()) { + obligations_ = new com.google.protobuf.LazyStringArrayList(obligations_); + } + bitField0_ |= 0x00000010; + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @return A list containing the obligations. + */ + public com.google.protobuf.ProtocolStringList + getObligationsList() { + obligations_.makeImmutable(); + return obligations_; + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @return The count of obligations. + */ + public int getObligationsCount() { + return obligations_.size(); + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param index The index of the element to return. + * @return The obligations at the given index. + */ + public java.lang.String getObligations(int index) { + return obligations_.get(index); + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param index The index of the value to return. + * @return The bytes of the obligations at the given index. + */ + public com.google.protobuf.ByteString + getObligationsBytes(int index) { + return obligations_.getByteString(index); + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param index The index to set the value at. + * @param value The obligations to set. + * @return This builder for chaining. + */ + public Builder setObligations( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureObligationsIsMutable(); + obligations_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param value The obligations to add. + * @return This builder for chaining. + */ + public Builder addObligations( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureObligationsIsMutable(); + obligations_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param values The obligations to add. + * @return This builder for chaining. + */ + public Builder addAllObligations( + java.lang.Iterable values) { + ensureObligationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, obligations_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @return This builder for chaining. + */ + public Builder clearObligations() { + obligations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010);; + onChanged(); + return this; + } + /** + *
+     *optional list of obligations represented in URI format
+     * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param value The bytes of the obligations to add. + * @return This builder for chaining. + */ + public Builder addObligationsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureObligationsIsMutable(); + obligations_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.DecisionResponse) + } + + // @@protoc_insertion_point(class_scope:authorization.DecisionResponse) + private static final io.opentdf.platform.authorization.DecisionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.DecisionResponse(); + } + + public static io.opentdf.platform.authorization.DecisionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DecisionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.DecisionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponseOrBuilder.java new file mode 100644 index 00000000..8a9923bd --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponseOrBuilder.java @@ -0,0 +1,137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface DecisionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.DecisionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ephemeral entity chain id from the request
+   * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @return The entityChainId. + */ + java.lang.String getEntityChainId(); + /** + *
+   * ephemeral entity chain id from the request
+   * 
+ * + * string entity_chain_id = 1 [json_name = "entityChainId"]; + * @return The bytes for entityChainId. + */ + com.google.protobuf.ByteString + getEntityChainIdBytes(); + + /** + *
+   * ephemeral resource attributes id from the request
+   * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @return The resourceAttributesId. + */ + java.lang.String getResourceAttributesId(); + /** + *
+   * ephemeral resource attributes id from the request
+   * 
+ * + * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; + * @return The bytes for resourceAttributesId. + */ + com.google.protobuf.ByteString + getResourceAttributesIdBytes(); + + /** + *
+   * Action of the decision response
+   * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + * @return Whether the action field is set. + */ + boolean hasAction(); + /** + *
+   * Action of the decision response
+   * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + * @return The action. + */ + io.opentdf.platform.policy.Action getAction(); + /** + *
+   * Action of the decision response
+   * 
+ * + * .policy.Action action = 3 [json_name = "action"]; + */ + io.opentdf.platform.policy.ActionOrBuilder getActionOrBuilder(); + + /** + *
+   * The decision response
+   * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @return The enum numeric value on the wire for decision. + */ + int getDecisionValue(); + /** + *
+   * The decision response
+   * 
+ * + * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; + * @return The decision. + */ + io.opentdf.platform.authorization.DecisionResponse.Decision getDecision(); + + /** + *
+   *optional list of obligations represented in URI format
+   * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @return A list containing the obligations. + */ + java.util.List + getObligationsList(); + /** + *
+   *optional list of obligations represented in URI format
+   * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @return The count of obligations. + */ + int getObligationsCount(); + /** + *
+   *optional list of obligations represented in URI format
+   * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param index The index of the element to return. + * @return The obligations at the given index. + */ + java.lang.String getObligations(int index); + /** + *
+   *optional list of obligations represented in URI format
+   * 
+ * + * repeated string obligations = 5 [json_name = "obligations"]; + * @param index The index of the value to return. + * @return The bytes of the obligations at the given index. + */ + com.google.protobuf.ByteString + getObligationsBytes(int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/Entity.java b/protocol/src/main/java/io/opentdf/platform/authorization/Entity.java new file mode 100644 index 00000000..2c613b24 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/Entity.java @@ -0,0 +1,1761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
+ * PE (Person Entity) or NPE (Non-Person Entity)
+ * 
+ * + * Protobuf type {@code authorization.Entity} + */ +public final class Entity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.Entity) + EntityOrBuilder { +private static final long serialVersionUID = 0L; + // Use Entity.newBuilder() to construct. + private Entity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Entity() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Entity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.Entity.class, io.opentdf.platform.authorization.Entity.Builder.class); + } + + private int entityTypeCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object entityType_; + public enum EntityTypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EMAIL_ADDRESS(2), + USER_NAME(3), + REMOTE_CLAIMS_URL(4), + JWT(5), + CLAIMS(6), + CUSTOM(7), + ENTITYTYPE_NOT_SET(0); + private final int value; + private EntityTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EntityTypeCase valueOf(int value) { + return forNumber(value); + } + + public static EntityTypeCase forNumber(int value) { + switch (value) { + case 2: return EMAIL_ADDRESS; + case 3: return USER_NAME; + case 4: return REMOTE_CLAIMS_URL; + case 5: return JWT; + case 6: return CLAIMS; + case 7: return CUSTOM; + case 0: return ENTITYTYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public EntityTypeCase + getEntityTypeCase() { + return EntityTypeCase.forNumber( + entityTypeCase_); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * ephemeral id for tracking between request and response
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * ephemeral id for tracking between request and response
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_ADDRESS_FIELD_NUMBER = 2; + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return Whether the emailAddress field is set. + */ + public boolean hasEmailAddress() { + return entityTypeCase_ == 2; + } + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return The emailAddress. + */ + public java.lang.String getEmailAddress() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 2) { + ref = entityType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypeCase_ == 2) { + entityType_ = s; + } + return s; + } + } + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return The bytes for emailAddress. + */ + public com.google.protobuf.ByteString + getEmailAddressBytes() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 2) { + ref = entityType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (entityTypeCase_ == 2) { + entityType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_NAME_FIELD_NUMBER = 3; + /** + * string user_name = 3 [json_name = "userName"]; + * @return Whether the userName field is set. + */ + public boolean hasUserName() { + return entityTypeCase_ == 3; + } + /** + * string user_name = 3 [json_name = "userName"]; + * @return The userName. + */ + public java.lang.String getUserName() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 3) { + ref = entityType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypeCase_ == 3) { + entityType_ = s; + } + return s; + } + } + /** + * string user_name = 3 [json_name = "userName"]; + * @return The bytes for userName. + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 3) { + ref = entityType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (entityTypeCase_ == 3) { + entityType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_CLAIMS_URL_FIELD_NUMBER = 4; + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return Whether the remoteClaimsUrl field is set. + */ + public boolean hasRemoteClaimsUrl() { + return entityTypeCase_ == 4; + } + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return The remoteClaimsUrl. + */ + public java.lang.String getRemoteClaimsUrl() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 4) { + ref = entityType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypeCase_ == 4) { + entityType_ = s; + } + return s; + } + } + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return The bytes for remoteClaimsUrl. + */ + public com.google.protobuf.ByteString + getRemoteClaimsUrlBytes() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 4) { + ref = entityType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (entityTypeCase_ == 4) { + entityType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JWT_FIELD_NUMBER = 5; + /** + * string jwt = 5 [json_name = "jwt"]; + * @return Whether the jwt field is set. + */ + public boolean hasJwt() { + return entityTypeCase_ == 5; + } + /** + * string jwt = 5 [json_name = "jwt"]; + * @return The jwt. + */ + public java.lang.String getJwt() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 5) { + ref = entityType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypeCase_ == 5) { + entityType_ = s; + } + return s; + } + } + /** + * string jwt = 5 [json_name = "jwt"]; + * @return The bytes for jwt. + */ + public com.google.protobuf.ByteString + getJwtBytes() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 5) { + ref = entityType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (entityTypeCase_ == 5) { + entityType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLAIMS_FIELD_NUMBER = 6; + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + * @return Whether the claims field is set. + */ + @java.lang.Override + public boolean hasClaims() { + return entityTypeCase_ == 6; + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + * @return The claims. + */ + @java.lang.Override + public com.google.protobuf.Any getClaims() { + if (entityTypeCase_ == 6) { + return (com.google.protobuf.Any) entityType_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getClaimsOrBuilder() { + if (entityTypeCase_ == 6) { + return (com.google.protobuf.Any) entityType_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + + public static final int CUSTOM_FIELD_NUMBER = 7; + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return entityTypeCase_ == 7; + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + * @return The custom. + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityCustom getCustom() { + if (entityTypeCase_ == 7) { + return (io.opentdf.platform.authorization.EntityCustom) entityType_; + } + return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityCustomOrBuilder getCustomOrBuilder() { + if (entityTypeCase_ == 7) { + return (io.opentdf.platform.authorization.EntityCustom) entityType_; + } + return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (entityTypeCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityType_); + } + if (entityTypeCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entityType_); + } + if (entityTypeCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, entityType_); + } + if (entityTypeCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, entityType_); + } + if (entityTypeCase_ == 6) { + output.writeMessage(6, (com.google.protobuf.Any) entityType_); + } + if (entityTypeCase_ == 7) { + output.writeMessage(7, (io.opentdf.platform.authorization.EntityCustom) entityType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (entityTypeCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entityType_); + } + if (entityTypeCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entityType_); + } + if (entityTypeCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, entityType_); + } + if (entityTypeCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, entityType_); + } + if (entityTypeCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.protobuf.Any) entityType_); + } + if (entityTypeCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (io.opentdf.platform.authorization.EntityCustom) entityType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.Entity)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.Entity other = (io.opentdf.platform.authorization.Entity) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getEntityTypeCase().equals(other.getEntityTypeCase())) return false; + switch (entityTypeCase_) { + case 2: + if (!getEmailAddress() + .equals(other.getEmailAddress())) return false; + break; + case 3: + if (!getUserName() + .equals(other.getUserName())) return false; + break; + case 4: + if (!getRemoteClaimsUrl() + .equals(other.getRemoteClaimsUrl())) return false; + break; + case 5: + if (!getJwt() + .equals(other.getJwt())) return false; + break; + case 6: + if (!getClaims() + .equals(other.getClaims())) return false; + break; + case 7: + if (!getCustom() + .equals(other.getCustom())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + switch (entityTypeCase_) { + case 2: + hash = (37 * hash) + EMAIL_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getEmailAddress().hashCode(); + break; + case 3: + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + break; + case 4: + hash = (37 * hash) + REMOTE_CLAIMS_URL_FIELD_NUMBER; + hash = (53 * hash) + getRemoteClaimsUrl().hashCode(); + break; + case 5: + hash = (37 * hash) + JWT_FIELD_NUMBER; + hash = (53 * hash) + getJwt().hashCode(); + break; + case 6: + hash = (37 * hash) + CLAIMS_FIELD_NUMBER; + hash = (53 * hash) + getClaims().hashCode(); + break; + case 7: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.Entity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.Entity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.Entity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.Entity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.Entity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.Entity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.Entity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.Entity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.Entity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.Entity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.Entity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.Entity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.Entity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PE (Person Entity) or NPE (Non-Person Entity)
+   * 
+ * + * Protobuf type {@code authorization.Entity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.Entity) + io.opentdf.platform.authorization.EntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.Entity.class, io.opentdf.platform.authorization.Entity.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.Entity.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + if (claimsBuilder_ != null) { + claimsBuilder_.clear(); + } + if (customBuilder_ != null) { + customBuilder_.clear(); + } + entityTypeCase_ = 0; + entityType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.Entity getDefaultInstanceForType() { + return io.opentdf.platform.authorization.Entity.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.Entity build() { + io.opentdf.platform.authorization.Entity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.Entity buildPartial() { + io.opentdf.platform.authorization.Entity result = new io.opentdf.platform.authorization.Entity(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.authorization.Entity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + private void buildPartialOneofs(io.opentdf.platform.authorization.Entity result) { + result.entityTypeCase_ = entityTypeCase_; + result.entityType_ = this.entityType_; + if (entityTypeCase_ == 6 && + claimsBuilder_ != null) { + result.entityType_ = claimsBuilder_.build(); + } + if (entityTypeCase_ == 7 && + customBuilder_ != null) { + result.entityType_ = customBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.Entity) { + return mergeFrom((io.opentdf.platform.authorization.Entity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.Entity other) { + if (other == io.opentdf.platform.authorization.Entity.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getEntityTypeCase()) { + case EMAIL_ADDRESS: { + entityTypeCase_ = 2; + entityType_ = other.entityType_; + onChanged(); + break; + } + case USER_NAME: { + entityTypeCase_ = 3; + entityType_ = other.entityType_; + onChanged(); + break; + } + case REMOTE_CLAIMS_URL: { + entityTypeCase_ = 4; + entityType_ = other.entityType_; + onChanged(); + break; + } + case JWT: { + entityTypeCase_ = 5; + entityType_ = other.entityType_; + onChanged(); + break; + } + case CLAIMS: { + mergeClaims(other.getClaims()); + break; + } + case CUSTOM: { + mergeCustom(other.getCustom()); + break; + } + case ENTITYTYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + entityTypeCase_ = 2; + entityType_ = s; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + entityTypeCase_ = 3; + entityType_ = s; + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + entityTypeCase_ = 4; + entityType_ = s; + break; + } // case 34 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + entityTypeCase_ = 5; + entityType_ = s; + break; + } // case 42 + case 50: { + input.readMessage( + getClaimsFieldBuilder().getBuilder(), + extensionRegistry); + entityTypeCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getCustomFieldBuilder().getBuilder(), + extensionRegistry); + entityTypeCase_ = 7; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int entityTypeCase_ = 0; + private java.lang.Object entityType_; + public EntityTypeCase + getEntityTypeCase() { + return EntityTypeCase.forNumber( + entityTypeCase_); + } + + public Builder clearEntityType() { + entityTypeCase_ = 0; + entityType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return Whether the emailAddress field is set. + */ + @java.lang.Override + public boolean hasEmailAddress() { + return entityTypeCase_ == 2; + } + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return The emailAddress. + */ + @java.lang.Override + public java.lang.String getEmailAddress() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 2) { + ref = entityType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypeCase_ == 2) { + entityType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return The bytes for emailAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEmailAddressBytes() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 2) { + ref = entityType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (entityTypeCase_ == 2) { + entityType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @param value The emailAddress to set. + * @return This builder for chaining. + */ + public Builder setEmailAddress( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entityTypeCase_ = 2; + entityType_ = value; + onChanged(); + return this; + } + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return This builder for chaining. + */ + public Builder clearEmailAddress() { + if (entityTypeCase_ == 2) { + entityTypeCase_ = 0; + entityType_ = null; + onChanged(); + } + return this; + } + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @param value The bytes for emailAddress to set. + * @return This builder for chaining. + */ + public Builder setEmailAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entityTypeCase_ = 2; + entityType_ = value; + onChanged(); + return this; + } + + /** + * string user_name = 3 [json_name = "userName"]; + * @return Whether the userName field is set. + */ + @java.lang.Override + public boolean hasUserName() { + return entityTypeCase_ == 3; + } + /** + * string user_name = 3 [json_name = "userName"]; + * @return The userName. + */ + @java.lang.Override + public java.lang.String getUserName() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 3) { + ref = entityType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypeCase_ == 3) { + entityType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string user_name = 3 [json_name = "userName"]; + * @return The bytes for userName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 3) { + ref = entityType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (entityTypeCase_ == 3) { + entityType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string user_name = 3 [json_name = "userName"]; + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entityTypeCase_ = 3; + entityType_ = value; + onChanged(); + return this; + } + /** + * string user_name = 3 [json_name = "userName"]; + * @return This builder for chaining. + */ + public Builder clearUserName() { + if (entityTypeCase_ == 3) { + entityTypeCase_ = 0; + entityType_ = null; + onChanged(); + } + return this; + } + /** + * string user_name = 3 [json_name = "userName"]; + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entityTypeCase_ = 3; + entityType_ = value; + onChanged(); + return this; + } + + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return Whether the remoteClaimsUrl field is set. + */ + @java.lang.Override + public boolean hasRemoteClaimsUrl() { + return entityTypeCase_ == 4; + } + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return The remoteClaimsUrl. + */ + @java.lang.Override + public java.lang.String getRemoteClaimsUrl() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 4) { + ref = entityType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypeCase_ == 4) { + entityType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return The bytes for remoteClaimsUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemoteClaimsUrlBytes() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 4) { + ref = entityType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (entityTypeCase_ == 4) { + entityType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @param value The remoteClaimsUrl to set. + * @return This builder for chaining. + */ + public Builder setRemoteClaimsUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entityTypeCase_ = 4; + entityType_ = value; + onChanged(); + return this; + } + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return This builder for chaining. + */ + public Builder clearRemoteClaimsUrl() { + if (entityTypeCase_ == 4) { + entityTypeCase_ = 0; + entityType_ = null; + onChanged(); + } + return this; + } + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @param value The bytes for remoteClaimsUrl to set. + * @return This builder for chaining. + */ + public Builder setRemoteClaimsUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entityTypeCase_ = 4; + entityType_ = value; + onChanged(); + return this; + } + + /** + * string jwt = 5 [json_name = "jwt"]; + * @return Whether the jwt field is set. + */ + @java.lang.Override + public boolean hasJwt() { + return entityTypeCase_ == 5; + } + /** + * string jwt = 5 [json_name = "jwt"]; + * @return The jwt. + */ + @java.lang.Override + public java.lang.String getJwt() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 5) { + ref = entityType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypeCase_ == 5) { + entityType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string jwt = 5 [json_name = "jwt"]; + * @return The bytes for jwt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getJwtBytes() { + java.lang.Object ref = ""; + if (entityTypeCase_ == 5) { + ref = entityType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (entityTypeCase_ == 5) { + entityType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string jwt = 5 [json_name = "jwt"]; + * @param value The jwt to set. + * @return This builder for chaining. + */ + public Builder setJwt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entityTypeCase_ = 5; + entityType_ = value; + onChanged(); + return this; + } + /** + * string jwt = 5 [json_name = "jwt"]; + * @return This builder for chaining. + */ + public Builder clearJwt() { + if (entityTypeCase_ == 5) { + entityTypeCase_ = 0; + entityType_ = null; + onChanged(); + } + return this; + } + /** + * string jwt = 5 [json_name = "jwt"]; + * @param value The bytes for jwt to set. + * @return This builder for chaining. + */ + public Builder setJwtBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entityTypeCase_ = 5; + entityType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> claimsBuilder_; + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + * @return Whether the claims field is set. + */ + @java.lang.Override + public boolean hasClaims() { + return entityTypeCase_ == 6; + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + * @return The claims. + */ + @java.lang.Override + public com.google.protobuf.Any getClaims() { + if (claimsBuilder_ == null) { + if (entityTypeCase_ == 6) { + return (com.google.protobuf.Any) entityType_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } else { + if (entityTypeCase_ == 6) { + return claimsBuilder_.getMessage(); + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + public Builder setClaims(com.google.protobuf.Any value) { + if (claimsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entityType_ = value; + onChanged(); + } else { + claimsBuilder_.setMessage(value); + } + entityTypeCase_ = 6; + return this; + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + public Builder setClaims( + com.google.protobuf.Any.Builder builderForValue) { + if (claimsBuilder_ == null) { + entityType_ = builderForValue.build(); + onChanged(); + } else { + claimsBuilder_.setMessage(builderForValue.build()); + } + entityTypeCase_ = 6; + return this; + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + public Builder mergeClaims(com.google.protobuf.Any value) { + if (claimsBuilder_ == null) { + if (entityTypeCase_ == 6 && + entityType_ != com.google.protobuf.Any.getDefaultInstance()) { + entityType_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) entityType_) + .mergeFrom(value).buildPartial(); + } else { + entityType_ = value; + } + onChanged(); + } else { + if (entityTypeCase_ == 6) { + claimsBuilder_.mergeFrom(value); + } else { + claimsBuilder_.setMessage(value); + } + } + entityTypeCase_ = 6; + return this; + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + public Builder clearClaims() { + if (claimsBuilder_ == null) { + if (entityTypeCase_ == 6) { + entityTypeCase_ = 0; + entityType_ = null; + onChanged(); + } + } else { + if (entityTypeCase_ == 6) { + entityTypeCase_ = 0; + entityType_ = null; + } + claimsBuilder_.clear(); + } + return this; + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + public com.google.protobuf.Any.Builder getClaimsBuilder() { + return getClaimsFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getClaimsOrBuilder() { + if ((entityTypeCase_ == 6) && (claimsBuilder_ != null)) { + return claimsBuilder_.getMessageOrBuilder(); + } else { + if (entityTypeCase_ == 6) { + return (com.google.protobuf.Any) entityType_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getClaimsFieldBuilder() { + if (claimsBuilder_ == null) { + if (!(entityTypeCase_ == 6)) { + entityType_ = com.google.protobuf.Any.getDefaultInstance(); + } + claimsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + (com.google.protobuf.Any) entityType_, + getParentForChildren(), + isClean()); + entityType_ = null; + } + entityTypeCase_ = 6; + onChanged(); + return claimsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.authorization.EntityCustom, io.opentdf.platform.authorization.EntityCustom.Builder, io.opentdf.platform.authorization.EntityCustomOrBuilder> customBuilder_; + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return entityTypeCase_ == 7; + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + * @return The custom. + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityCustom getCustom() { + if (customBuilder_ == null) { + if (entityTypeCase_ == 7) { + return (io.opentdf.platform.authorization.EntityCustom) entityType_; + } + return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); + } else { + if (entityTypeCase_ == 7) { + return customBuilder_.getMessage(); + } + return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); + } + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + public Builder setCustom(io.opentdf.platform.authorization.EntityCustom value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entityType_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + entityTypeCase_ = 7; + return this; + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + public Builder setCustom( + io.opentdf.platform.authorization.EntityCustom.Builder builderForValue) { + if (customBuilder_ == null) { + entityType_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + entityTypeCase_ = 7; + return this; + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + public Builder mergeCustom(io.opentdf.platform.authorization.EntityCustom value) { + if (customBuilder_ == null) { + if (entityTypeCase_ == 7 && + entityType_ != io.opentdf.platform.authorization.EntityCustom.getDefaultInstance()) { + entityType_ = io.opentdf.platform.authorization.EntityCustom.newBuilder((io.opentdf.platform.authorization.EntityCustom) entityType_) + .mergeFrom(value).buildPartial(); + } else { + entityType_ = value; + } + onChanged(); + } else { + if (entityTypeCase_ == 7) { + customBuilder_.mergeFrom(value); + } else { + customBuilder_.setMessage(value); + } + } + entityTypeCase_ = 7; + return this; + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (entityTypeCase_ == 7) { + entityTypeCase_ = 0; + entityType_ = null; + onChanged(); + } + } else { + if (entityTypeCase_ == 7) { + entityTypeCase_ = 0; + entityType_ = null; + } + customBuilder_.clear(); + } + return this; + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + public io.opentdf.platform.authorization.EntityCustom.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityCustomOrBuilder getCustomOrBuilder() { + if ((entityTypeCase_ == 7) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (entityTypeCase_ == 7) { + return (io.opentdf.platform.authorization.EntityCustom) entityType_; + } + return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); + } + } + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.authorization.EntityCustom, io.opentdf.platform.authorization.EntityCustom.Builder, io.opentdf.platform.authorization.EntityCustomOrBuilder> + getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(entityTypeCase_ == 7)) { + entityType_ = io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.authorization.EntityCustom, io.opentdf.platform.authorization.EntityCustom.Builder, io.opentdf.platform.authorization.EntityCustomOrBuilder>( + (io.opentdf.platform.authorization.EntityCustom) entityType_, + getParentForChildren(), + isClean()); + entityType_ = null; + } + entityTypeCase_ = 7; + onChanged(); + return customBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.Entity) + } + + // @@protoc_insertion_point(class_scope:authorization.Entity) + private static final io.opentdf.platform.authorization.Entity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.Entity(); + } + + public static io.opentdf.platform.authorization.Entity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.Entity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityChain.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityChain.java new file mode 100644 index 00000000..7b3734c2 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/EntityChain.java @@ -0,0 +1,932 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
+ * A set of related PE and NPE
+ * 
+ * + * Protobuf type {@code authorization.EntityChain} + */ +public final class EntityChain extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.EntityChain) + EntityChainOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityChain.newBuilder() to construct. + private EntityChain(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityChain() { + id_ = ""; + entities_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityChain(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.EntityChain.class, io.opentdf.platform.authorization.EntityChain.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * ephemeral id for tracking between request and response
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * ephemeral id for tracking between request and response
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITIES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List entities_; + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + @java.lang.Override + public java.util.List getEntitiesList() { + return entities_; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + @java.lang.Override + public java.util.List + getEntitiesOrBuilderList() { + return entities_; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + @java.lang.Override + public int getEntitiesCount() { + return entities_.size(); + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.Entity getEntities(int index) { + return entities_.get(index); + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( + int index) { + return entities_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + for (int i = 0; i < entities_.size(); i++) { + output.writeMessage(2, entities_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + for (int i = 0; i < entities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, entities_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.EntityChain)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.EntityChain other = (io.opentdf.platform.authorization.EntityChain) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getEntitiesList() + .equals(other.getEntitiesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getEntitiesCount() > 0) { + hash = (37 * hash) + ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getEntitiesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.EntityChain parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.EntityChain parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.EntityChain parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.EntityChain parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.EntityChain prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of related PE and NPE
+   * 
+ * + * Protobuf type {@code authorization.EntityChain} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.EntityChain) + io.opentdf.platform.authorization.EntityChainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.EntityChain.class, io.opentdf.platform.authorization.EntityChain.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.EntityChain.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + if (entitiesBuilder_ == null) { + entities_ = java.util.Collections.emptyList(); + } else { + entities_ = null; + entitiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityChain getDefaultInstanceForType() { + return io.opentdf.platform.authorization.EntityChain.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityChain build() { + io.opentdf.platform.authorization.EntityChain result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityChain buildPartial() { + io.opentdf.platform.authorization.EntityChain result = new io.opentdf.platform.authorization.EntityChain(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.authorization.EntityChain result) { + if (entitiesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + entities_ = java.util.Collections.unmodifiableList(entities_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.entities_ = entities_; + } else { + result.entities_ = entitiesBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.authorization.EntityChain result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.EntityChain) { + return mergeFrom((io.opentdf.platform.authorization.EntityChain)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.EntityChain other) { + if (other == io.opentdf.platform.authorization.EntityChain.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (entitiesBuilder_ == null) { + if (!other.entities_.isEmpty()) { + if (entities_.isEmpty()) { + entities_ = other.entities_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEntitiesIsMutable(); + entities_.addAll(other.entities_); + } + onChanged(); + } + } else { + if (!other.entities_.isEmpty()) { + if (entitiesBuilder_.isEmpty()) { + entitiesBuilder_.dispose(); + entitiesBuilder_ = null; + entities_ = other.entities_; + bitField0_ = (bitField0_ & ~0x00000002); + entitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEntitiesFieldBuilder() : null; + } else { + entitiesBuilder_.addAllMessages(other.entities_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.opentdf.platform.authorization.Entity m = + input.readMessage( + io.opentdf.platform.authorization.Entity.parser(), + extensionRegistry); + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.add(m); + } else { + entitiesBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * ephemeral id for tracking between request and response
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List entities_ = + java.util.Collections.emptyList(); + private void ensureEntitiesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + entities_ = new java.util.ArrayList(entities_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder> entitiesBuilder_; + + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public java.util.List getEntitiesList() { + if (entitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entities_); + } else { + return entitiesBuilder_.getMessageList(); + } + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public int getEntitiesCount() { + if (entitiesBuilder_ == null) { + return entities_.size(); + } else { + return entitiesBuilder_.getCount(); + } + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.Entity getEntities(int index) { + if (entitiesBuilder_ == null) { + return entities_.get(index); + } else { + return entitiesBuilder_.getMessage(index); + } + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder setEntities( + int index, io.opentdf.platform.authorization.Entity value) { + if (entitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitiesIsMutable(); + entities_.set(index, value); + onChanged(); + } else { + entitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder setEntities( + int index, io.opentdf.platform.authorization.Entity.Builder builderForValue) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.set(index, builderForValue.build()); + onChanged(); + } else { + entitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder addEntities(io.opentdf.platform.authorization.Entity value) { + if (entitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitiesIsMutable(); + entities_.add(value); + onChanged(); + } else { + entitiesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder addEntities( + int index, io.opentdf.platform.authorization.Entity value) { + if (entitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitiesIsMutable(); + entities_.add(index, value); + onChanged(); + } else { + entitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder addEntities( + io.opentdf.platform.authorization.Entity.Builder builderForValue) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.add(builderForValue.build()); + onChanged(); + } else { + entitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder addEntities( + int index, io.opentdf.platform.authorization.Entity.Builder builderForValue) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.add(index, builderForValue.build()); + onChanged(); + } else { + entitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder addAllEntities( + java.lang.Iterable values) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, entities_); + onChanged(); + } else { + entitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder clearEntities() { + if (entitiesBuilder_ == null) { + entities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + entitiesBuilder_.clear(); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public Builder removeEntities(int index) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.remove(index); + onChanged(); + } else { + entitiesBuilder_.remove(index); + } + return this; + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.Entity.Builder getEntitiesBuilder( + int index) { + return getEntitiesFieldBuilder().getBuilder(index); + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( + int index) { + if (entitiesBuilder_ == null) { + return entities_.get(index); } else { + return entitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public java.util.List + getEntitiesOrBuilderList() { + if (entitiesBuilder_ != null) { + return entitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entities_); + } + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder() { + return getEntitiesFieldBuilder().addBuilder( + io.opentdf.platform.authorization.Entity.getDefaultInstance()); + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder( + int index) { + return getEntitiesFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.Entity.getDefaultInstance()); + } + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + public java.util.List + getEntitiesBuilderList() { + return getEntitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder> + getEntitiesFieldBuilder() { + if (entitiesBuilder_ == null) { + entitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder>( + entities_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + entities_ = null; + } + return entitiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.EntityChain) + } + + // @@protoc_insertion_point(class_scope:authorization.EntityChain) + private static final io.opentdf.platform.authorization.EntityChain DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.EntityChain(); + } + + public static io.opentdf.platform.authorization.EntityChain getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityChain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityChain getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityChainOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityChainOrBuilder.java new file mode 100644 index 00000000..323bb4d5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/EntityChainOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface EntityChainOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.EntityChain) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ephemeral id for tracking between request and response
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * ephemeral id for tracking between request and response
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + java.util.List + getEntitiesList(); + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + io.opentdf.platform.authorization.Entity getEntities(int index); + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + int getEntitiesCount(); + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + java.util.List + getEntitiesOrBuilderList(); + /** + * repeated .authorization.Entity entities = 2 [json_name = "entities"]; + */ + io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustom.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustom.java new file mode 100644 index 00000000..74bc7b1f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustom.java @@ -0,0 +1,607 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
+ * Entity type for custom entities beyond the standard types
+ * 
+ * + * Protobuf type {@code authorization.EntityCustom} + */ +public final class EntityCustom extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.EntityCustom) + EntityCustomOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityCustom.newBuilder() to construct. + private EntityCustom(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityCustom() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityCustom(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.EntityCustom.class, io.opentdf.platform.authorization.EntityCustom.Builder.class); + } + + private int bitField0_; + public static final int EXTENSION_FIELD_NUMBER = 1; + private com.google.protobuf.Any extension_; + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + * @return Whether the extension field is set. + */ + @java.lang.Override + public boolean hasExtension() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + * @return The extension. + */ + @java.lang.Override + public com.google.protobuf.Any getExtension() { + return extension_ == null ? com.google.protobuf.Any.getDefaultInstance() : extension_; + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getExtensionOrBuilder() { + return extension_ == null ? com.google.protobuf.Any.getDefaultInstance() : extension_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getExtension()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getExtension()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.EntityCustom)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.EntityCustom other = (io.opentdf.platform.authorization.EntityCustom) obj; + + if (hasExtension() != other.hasExtension()) return false; + if (hasExtension()) { + if (!getExtension() + .equals(other.getExtension())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExtension()) { + hash = (37 * hash) + EXTENSION_FIELD_NUMBER; + hash = (53 * hash) + getExtension().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.EntityCustom parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.EntityCustom parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.EntityCustom parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.EntityCustom parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.EntityCustom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Entity type for custom entities beyond the standard types
+   * 
+ * + * Protobuf type {@code authorization.EntityCustom} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.EntityCustom) + io.opentdf.platform.authorization.EntityCustomOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.EntityCustom.class, io.opentdf.platform.authorization.EntityCustom.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.EntityCustom.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getExtensionFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + extension_ = null; + if (extensionBuilder_ != null) { + extensionBuilder_.dispose(); + extensionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityCustom getDefaultInstanceForType() { + return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityCustom build() { + io.opentdf.platform.authorization.EntityCustom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityCustom buildPartial() { + io.opentdf.platform.authorization.EntityCustom result = new io.opentdf.platform.authorization.EntityCustom(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.authorization.EntityCustom result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.extension_ = extensionBuilder_ == null + ? extension_ + : extensionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.EntityCustom) { + return mergeFrom((io.opentdf.platform.authorization.EntityCustom)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.EntityCustom other) { + if (other == io.opentdf.platform.authorization.EntityCustom.getDefaultInstance()) return this; + if (other.hasExtension()) { + mergeExtension(other.getExtension()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getExtensionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Any extension_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> extensionBuilder_; + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + * @return Whether the extension field is set. + */ + public boolean hasExtension() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + * @return The extension. + */ + public com.google.protobuf.Any getExtension() { + if (extensionBuilder_ == null) { + return extension_ == null ? com.google.protobuf.Any.getDefaultInstance() : extension_; + } else { + return extensionBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + public Builder setExtension(com.google.protobuf.Any value) { + if (extensionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + extension_ = value; + } else { + extensionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + public Builder setExtension( + com.google.protobuf.Any.Builder builderForValue) { + if (extensionBuilder_ == null) { + extension_ = builderForValue.build(); + } else { + extensionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + public Builder mergeExtension(com.google.protobuf.Any value) { + if (extensionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + extension_ != null && + extension_ != com.google.protobuf.Any.getDefaultInstance()) { + getExtensionBuilder().mergeFrom(value); + } else { + extension_ = value; + } + } else { + extensionBuilder_.mergeFrom(value); + } + if (extension_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + public Builder clearExtension() { + bitField0_ = (bitField0_ & ~0x00000001); + extension_ = null; + if (extensionBuilder_ != null) { + extensionBuilder_.dispose(); + extensionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + public com.google.protobuf.Any.Builder getExtensionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getExtensionFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + public com.google.protobuf.AnyOrBuilder getExtensionOrBuilder() { + if (extensionBuilder_ != null) { + return extensionBuilder_.getMessageOrBuilder(); + } else { + return extension_ == null ? + com.google.protobuf.Any.getDefaultInstance() : extension_; + } + } + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getExtensionFieldBuilder() { + if (extensionBuilder_ == null) { + extensionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getExtension(), + getParentForChildren(), + isClean()); + extension_ = null; + } + return extensionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.EntityCustom) + } + + // @@protoc_insertion_point(class_scope:authorization.EntityCustom) + private static final io.opentdf.platform.authorization.EntityCustom DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.EntityCustom(); + } + + public static io.opentdf.platform.authorization.EntityCustom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityCustom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityCustom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustomOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustomOrBuilder.java new file mode 100644 index 00000000..100ff00d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustomOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface EntityCustomOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.EntityCustom) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + * @return Whether the extension field is set. + */ + boolean hasExtension(); + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + * @return The extension. + */ + com.google.protobuf.Any getExtension(); + /** + * .google.protobuf.Any extension = 1 [json_name = "extension"]; + */ + com.google.protobuf.AnyOrBuilder getExtensionOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlements.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlements.java new file mode 100644 index 00000000..3badea65 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlements.java @@ -0,0 +1,731 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + * Protobuf type {@code authorization.EntityEntitlements} + */ +public final class EntityEntitlements extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.EntityEntitlements) + EntityEntitlementsOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityEntitlements.newBuilder() to construct. + private EntityEntitlements(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityEntitlements() { + entityId_ = ""; + attributeId_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityEntitlements(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.EntityEntitlements.class, io.opentdf.platform.authorization.EntityEntitlements.Builder.class); + } + + public static final int ENTITY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object entityId_ = ""; + /** + * string entity_id = 1 [json_name = "entityId"]; + * @return The entityId. + */ + @java.lang.Override + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } + } + /** + * string entity_id = 1 [json_name = "entityId"]; + * @return The bytes for entityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributeId_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @return A list containing the attributeId. + */ + public com.google.protobuf.ProtocolStringList + getAttributeIdList() { + return attributeId_; + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @return The count of attributeId. + */ + public int getAttributeIdCount() { + return attributeId_.size(); + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param index The index of the element to return. + * @return The attributeId at the given index. + */ + public java.lang.String getAttributeId(int index) { + return attributeId_.get(index); + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param index The index of the value to return. + * @return The bytes of the attributeId at the given index. + */ + public com.google.protobuf.ByteString + getAttributeIdBytes(int index) { + return attributeId_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); + } + for (int i = 0; i < attributeId_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeId_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); + } + { + int dataSize = 0; + for (int i = 0; i < attributeId_.size(); i++) { + dataSize += computeStringSizeNoTag(attributeId_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributeIdList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.EntityEntitlements)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.EntityEntitlements other = (io.opentdf.platform.authorization.EntityEntitlements) obj; + + if (!getEntityId() + .equals(other.getEntityId())) return false; + if (!getAttributeIdList() + .equals(other.getAttributeIdList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityId().hashCode(); + if (getAttributeIdCount() > 0) { + hash = (37 * hash) + ATTRIBUTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeIdList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.EntityEntitlements parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.EntityEntitlements parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.EntityEntitlements prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code authorization.EntityEntitlements} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.EntityEntitlements) + io.opentdf.platform.authorization.EntityEntitlementsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.EntityEntitlements.class, io.opentdf.platform.authorization.EntityEntitlements.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.EntityEntitlements.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + entityId_ = ""; + attributeId_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityEntitlements getDefaultInstanceForType() { + return io.opentdf.platform.authorization.EntityEntitlements.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityEntitlements build() { + io.opentdf.platform.authorization.EntityEntitlements result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityEntitlements buildPartial() { + io.opentdf.platform.authorization.EntityEntitlements result = new io.opentdf.platform.authorization.EntityEntitlements(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.authorization.EntityEntitlements result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.entityId_ = entityId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + attributeId_.makeImmutable(); + result.attributeId_ = attributeId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.EntityEntitlements) { + return mergeFrom((io.opentdf.platform.authorization.EntityEntitlements)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.EntityEntitlements other) { + if (other == io.opentdf.platform.authorization.EntityEntitlements.getDefaultInstance()) return this; + if (!other.getEntityId().isEmpty()) { + entityId_ = other.entityId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.attributeId_.isEmpty()) { + if (attributeId_.isEmpty()) { + attributeId_ = other.attributeId_; + bitField0_ |= 0x00000002; + } else { + ensureAttributeIdIsMutable(); + attributeId_.addAll(other.attributeId_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + entityId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAttributeIdIsMutable(); + attributeId_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object entityId_ = ""; + /** + * string entity_id = 1 [json_name = "entityId"]; + * @return The entityId. + */ + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string entity_id = 1 [json_name = "entityId"]; + * @return The bytes for entityId. + */ + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string entity_id = 1 [json_name = "entityId"]; + * @param value The entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + entityId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string entity_id = 1 [json_name = "entityId"]; + * @return This builder for chaining. + */ + public Builder clearEntityId() { + entityId_ = getDefaultInstance().getEntityId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string entity_id = 1 [json_name = "entityId"]; + * @param value The bytes for entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + entityId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList attributeId_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAttributeIdIsMutable() { + if (!attributeId_.isModifiable()) { + attributeId_ = new com.google.protobuf.LazyStringArrayList(attributeId_); + } + bitField0_ |= 0x00000002; + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @return A list containing the attributeId. + */ + public com.google.protobuf.ProtocolStringList + getAttributeIdList() { + attributeId_.makeImmutable(); + return attributeId_; + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @return The count of attributeId. + */ + public int getAttributeIdCount() { + return attributeId_.size(); + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param index The index of the element to return. + * @return The attributeId at the given index. + */ + public java.lang.String getAttributeId(int index) { + return attributeId_.get(index); + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param index The index of the value to return. + * @return The bytes of the attributeId at the given index. + */ + public com.google.protobuf.ByteString + getAttributeIdBytes(int index) { + return attributeId_.getByteString(index); + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param index The index to set the value at. + * @param value The attributeId to set. + * @return This builder for chaining. + */ + public Builder setAttributeId( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAttributeIdIsMutable(); + attributeId_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param value The attributeId to add. + * @return This builder for chaining. + */ + public Builder addAttributeId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAttributeIdIsMutable(); + attributeId_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param values The attributeId to add. + * @return This builder for chaining. + */ + public Builder addAllAttributeId( + java.lang.Iterable values) { + ensureAttributeIdIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, attributeId_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @return This builder for chaining. + */ + public Builder clearAttributeId() { + attributeId_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param value The bytes of the attributeId to add. + * @return This builder for chaining. + */ + public Builder addAttributeIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAttributeIdIsMutable(); + attributeId_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.EntityEntitlements) + } + + // @@protoc_insertion_point(class_scope:authorization.EntityEntitlements) + private static final io.opentdf.platform.authorization.EntityEntitlements DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.EntityEntitlements(); + } + + public static io.opentdf.platform.authorization.EntityEntitlements getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityEntitlements parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.EntityEntitlements getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlementsOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlementsOrBuilder.java new file mode 100644 index 00000000..645af3a7 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlementsOrBuilder.java @@ -0,0 +1,47 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface EntityEntitlementsOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.EntityEntitlements) + com.google.protobuf.MessageOrBuilder { + + /** + * string entity_id = 1 [json_name = "entityId"]; + * @return The entityId. + */ + java.lang.String getEntityId(); + /** + * string entity_id = 1 [json_name = "entityId"]; + * @return The bytes for entityId. + */ + com.google.protobuf.ByteString + getEntityIdBytes(); + + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @return A list containing the attributeId. + */ + java.util.List + getAttributeIdList(); + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @return The count of attributeId. + */ + int getAttributeIdCount(); + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param index The index of the element to return. + * @return The attributeId at the given index. + */ + java.lang.String getAttributeId(int index); + /** + * repeated string attribute_id = 2 [json_name = "attributeId"]; + * @param index The index of the value to return. + * @return The bytes of the attributeId at the given index. + */ + com.google.protobuf.ByteString + getAttributeIdBytes(int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityOrBuilder.java new file mode 100644 index 00000000..7b3e27f6 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/EntityOrBuilder.java @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface EntityOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.Entity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ephemeral id for tracking between request and response
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * ephemeral id for tracking between request and response
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return Whether the emailAddress field is set. + */ + boolean hasEmailAddress(); + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return The emailAddress. + */ + java.lang.String getEmailAddress(); + /** + * string email_address = 2 [json_name = "emailAddress"]; + * @return The bytes for emailAddress. + */ + com.google.protobuf.ByteString + getEmailAddressBytes(); + + /** + * string user_name = 3 [json_name = "userName"]; + * @return Whether the userName field is set. + */ + boolean hasUserName(); + /** + * string user_name = 3 [json_name = "userName"]; + * @return The userName. + */ + java.lang.String getUserName(); + /** + * string user_name = 3 [json_name = "userName"]; + * @return The bytes for userName. + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return Whether the remoteClaimsUrl field is set. + */ + boolean hasRemoteClaimsUrl(); + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return The remoteClaimsUrl. + */ + java.lang.String getRemoteClaimsUrl(); + /** + * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; + * @return The bytes for remoteClaimsUrl. + */ + com.google.protobuf.ByteString + getRemoteClaimsUrlBytes(); + + /** + * string jwt = 5 [json_name = "jwt"]; + * @return Whether the jwt field is set. + */ + boolean hasJwt(); + /** + * string jwt = 5 [json_name = "jwt"]; + * @return The jwt. + */ + java.lang.String getJwt(); + /** + * string jwt = 5 [json_name = "jwt"]; + * @return The bytes for jwt. + */ + com.google.protobuf.ByteString + getJwtBytes(); + + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + * @return Whether the claims field is set. + */ + boolean hasClaims(); + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + * @return The claims. + */ + com.google.protobuf.Any getClaims(); + /** + * .google.protobuf.Any claims = 6 [json_name = "claims"]; + */ + com.google.protobuf.AnyOrBuilder getClaimsOrBuilder(); + + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + boolean hasCustom(); + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + * @return The custom. + */ + io.opentdf.platform.authorization.EntityCustom getCustom(); + /** + * .authorization.EntityCustom custom = 7 [json_name = "custom"]; + */ + io.opentdf.platform.authorization.EntityCustomOrBuilder getCustomOrBuilder(); + + io.opentdf.platform.authorization.Entity.EntityTypeCase getEntityTypeCase(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequest.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequest.java new file mode 100644 index 00000000..aa745d7f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequest.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + * Protobuf type {@code authorization.GetDecisionsRequest} + */ +public final class GetDecisionsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.GetDecisionsRequest) + GetDecisionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetDecisionsRequest.newBuilder() to construct. + private GetDecisionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetDecisionsRequest() { + decisionRequests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetDecisionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.GetDecisionsRequest.class, io.opentdf.platform.authorization.GetDecisionsRequest.Builder.class); + } + + public static final int DECISION_REQUESTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List decisionRequests_; + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + @java.lang.Override + public java.util.List getDecisionRequestsList() { + return decisionRequests_; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + @java.lang.Override + public java.util.List + getDecisionRequestsOrBuilderList() { + return decisionRequests_; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + @java.lang.Override + public int getDecisionRequestsCount() { + return decisionRequests_.size(); + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.DecisionRequest getDecisionRequests(int index) { + return decisionRequests_.get(index); + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.DecisionRequestOrBuilder getDecisionRequestsOrBuilder( + int index) { + return decisionRequests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < decisionRequests_.size(); i++) { + output.writeMessage(1, decisionRequests_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < decisionRequests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, decisionRequests_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.GetDecisionsRequest)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.GetDecisionsRequest other = (io.opentdf.platform.authorization.GetDecisionsRequest) obj; + + if (!getDecisionRequestsList() + .equals(other.getDecisionRequestsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDecisionRequestsCount() > 0) { + hash = (37 * hash) + DECISION_REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getDecisionRequestsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.GetDecisionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.GetDecisionsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.GetDecisionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code authorization.GetDecisionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.GetDecisionsRequest) + io.opentdf.platform.authorization.GetDecisionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.GetDecisionsRequest.class, io.opentdf.platform.authorization.GetDecisionsRequest.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.GetDecisionsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (decisionRequestsBuilder_ == null) { + decisionRequests_ = java.util.Collections.emptyList(); + } else { + decisionRequests_ = null; + decisionRequestsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetDecisionsRequest getDefaultInstanceForType() { + return io.opentdf.platform.authorization.GetDecisionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetDecisionsRequest build() { + io.opentdf.platform.authorization.GetDecisionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetDecisionsRequest buildPartial() { + io.opentdf.platform.authorization.GetDecisionsRequest result = new io.opentdf.platform.authorization.GetDecisionsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.authorization.GetDecisionsRequest result) { + if (decisionRequestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + decisionRequests_ = java.util.Collections.unmodifiableList(decisionRequests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.decisionRequests_ = decisionRequests_; + } else { + result.decisionRequests_ = decisionRequestsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.authorization.GetDecisionsRequest result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.GetDecisionsRequest) { + return mergeFrom((io.opentdf.platform.authorization.GetDecisionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.GetDecisionsRequest other) { + if (other == io.opentdf.platform.authorization.GetDecisionsRequest.getDefaultInstance()) return this; + if (decisionRequestsBuilder_ == null) { + if (!other.decisionRequests_.isEmpty()) { + if (decisionRequests_.isEmpty()) { + decisionRequests_ = other.decisionRequests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDecisionRequestsIsMutable(); + decisionRequests_.addAll(other.decisionRequests_); + } + onChanged(); + } + } else { + if (!other.decisionRequests_.isEmpty()) { + if (decisionRequestsBuilder_.isEmpty()) { + decisionRequestsBuilder_.dispose(); + decisionRequestsBuilder_ = null; + decisionRequests_ = other.decisionRequests_; + bitField0_ = (bitField0_ & ~0x00000001); + decisionRequestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDecisionRequestsFieldBuilder() : null; + } else { + decisionRequestsBuilder_.addAllMessages(other.decisionRequests_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.authorization.DecisionRequest m = + input.readMessage( + io.opentdf.platform.authorization.DecisionRequest.parser(), + extensionRegistry); + if (decisionRequestsBuilder_ == null) { + ensureDecisionRequestsIsMutable(); + decisionRequests_.add(m); + } else { + decisionRequestsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List decisionRequests_ = + java.util.Collections.emptyList(); + private void ensureDecisionRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + decisionRequests_ = new java.util.ArrayList(decisionRequests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.DecisionRequest, io.opentdf.platform.authorization.DecisionRequest.Builder, io.opentdf.platform.authorization.DecisionRequestOrBuilder> decisionRequestsBuilder_; + + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public java.util.List getDecisionRequestsList() { + if (decisionRequestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(decisionRequests_); + } else { + return decisionRequestsBuilder_.getMessageList(); + } + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public int getDecisionRequestsCount() { + if (decisionRequestsBuilder_ == null) { + return decisionRequests_.size(); + } else { + return decisionRequestsBuilder_.getCount(); + } + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public io.opentdf.platform.authorization.DecisionRequest getDecisionRequests(int index) { + if (decisionRequestsBuilder_ == null) { + return decisionRequests_.get(index); + } else { + return decisionRequestsBuilder_.getMessage(index); + } + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder setDecisionRequests( + int index, io.opentdf.platform.authorization.DecisionRequest value) { + if (decisionRequestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDecisionRequestsIsMutable(); + decisionRequests_.set(index, value); + onChanged(); + } else { + decisionRequestsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder setDecisionRequests( + int index, io.opentdf.platform.authorization.DecisionRequest.Builder builderForValue) { + if (decisionRequestsBuilder_ == null) { + ensureDecisionRequestsIsMutable(); + decisionRequests_.set(index, builderForValue.build()); + onChanged(); + } else { + decisionRequestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder addDecisionRequests(io.opentdf.platform.authorization.DecisionRequest value) { + if (decisionRequestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDecisionRequestsIsMutable(); + decisionRequests_.add(value); + onChanged(); + } else { + decisionRequestsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder addDecisionRequests( + int index, io.opentdf.platform.authorization.DecisionRequest value) { + if (decisionRequestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDecisionRequestsIsMutable(); + decisionRequests_.add(index, value); + onChanged(); + } else { + decisionRequestsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder addDecisionRequests( + io.opentdf.platform.authorization.DecisionRequest.Builder builderForValue) { + if (decisionRequestsBuilder_ == null) { + ensureDecisionRequestsIsMutable(); + decisionRequests_.add(builderForValue.build()); + onChanged(); + } else { + decisionRequestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder addDecisionRequests( + int index, io.opentdf.platform.authorization.DecisionRequest.Builder builderForValue) { + if (decisionRequestsBuilder_ == null) { + ensureDecisionRequestsIsMutable(); + decisionRequests_.add(index, builderForValue.build()); + onChanged(); + } else { + decisionRequestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder addAllDecisionRequests( + java.lang.Iterable values) { + if (decisionRequestsBuilder_ == null) { + ensureDecisionRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, decisionRequests_); + onChanged(); + } else { + decisionRequestsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder clearDecisionRequests() { + if (decisionRequestsBuilder_ == null) { + decisionRequests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + decisionRequestsBuilder_.clear(); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public Builder removeDecisionRequests(int index) { + if (decisionRequestsBuilder_ == null) { + ensureDecisionRequestsIsMutable(); + decisionRequests_.remove(index); + onChanged(); + } else { + decisionRequestsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public io.opentdf.platform.authorization.DecisionRequest.Builder getDecisionRequestsBuilder( + int index) { + return getDecisionRequestsFieldBuilder().getBuilder(index); + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public io.opentdf.platform.authorization.DecisionRequestOrBuilder getDecisionRequestsOrBuilder( + int index) { + if (decisionRequestsBuilder_ == null) { + return decisionRequests_.get(index); } else { + return decisionRequestsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public java.util.List + getDecisionRequestsOrBuilderList() { + if (decisionRequestsBuilder_ != null) { + return decisionRequestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(decisionRequests_); + } + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public io.opentdf.platform.authorization.DecisionRequest.Builder addDecisionRequestsBuilder() { + return getDecisionRequestsFieldBuilder().addBuilder( + io.opentdf.platform.authorization.DecisionRequest.getDefaultInstance()); + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public io.opentdf.platform.authorization.DecisionRequest.Builder addDecisionRequestsBuilder( + int index) { + return getDecisionRequestsFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.DecisionRequest.getDefaultInstance()); + } + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + public java.util.List + getDecisionRequestsBuilderList() { + return getDecisionRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.DecisionRequest, io.opentdf.platform.authorization.DecisionRequest.Builder, io.opentdf.platform.authorization.DecisionRequestOrBuilder> + getDecisionRequestsFieldBuilder() { + if (decisionRequestsBuilder_ == null) { + decisionRequestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.DecisionRequest, io.opentdf.platform.authorization.DecisionRequest.Builder, io.opentdf.platform.authorization.DecisionRequestOrBuilder>( + decisionRequests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + decisionRequests_ = null; + } + return decisionRequestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.GetDecisionsRequest) + } + + // @@protoc_insertion_point(class_scope:authorization.GetDecisionsRequest) + private static final io.opentdf.platform.authorization.GetDecisionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.GetDecisionsRequest(); + } + + public static io.opentdf.platform.authorization.GetDecisionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDecisionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetDecisionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequestOrBuilder.java new file mode 100644 index 00000000..28d46421 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequestOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface GetDecisionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.GetDecisionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + java.util.List + getDecisionRequestsList(); + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + io.opentdf.platform.authorization.DecisionRequest getDecisionRequests(int index); + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + int getDecisionRequestsCount(); + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + java.util.List + getDecisionRequestsOrBuilderList(); + /** + * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; + */ + io.opentdf.platform.authorization.DecisionRequestOrBuilder getDecisionRequestsOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponse.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponse.java new file mode 100644 index 00000000..f88a9cfc --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + * Protobuf type {@code authorization.GetDecisionsResponse} + */ +public final class GetDecisionsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.GetDecisionsResponse) + GetDecisionsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetDecisionsResponse.newBuilder() to construct. + private GetDecisionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetDecisionsResponse() { + decisionResponses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetDecisionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.GetDecisionsResponse.class, io.opentdf.platform.authorization.GetDecisionsResponse.Builder.class); + } + + public static final int DECISION_RESPONSES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List decisionResponses_; + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + @java.lang.Override + public java.util.List getDecisionResponsesList() { + return decisionResponses_; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + @java.lang.Override + public java.util.List + getDecisionResponsesOrBuilderList() { + return decisionResponses_; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + @java.lang.Override + public int getDecisionResponsesCount() { + return decisionResponses_.size(); + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.DecisionResponse getDecisionResponses(int index) { + return decisionResponses_.get(index); + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.DecisionResponseOrBuilder getDecisionResponsesOrBuilder( + int index) { + return decisionResponses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < decisionResponses_.size(); i++) { + output.writeMessage(1, decisionResponses_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < decisionResponses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, decisionResponses_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.GetDecisionsResponse)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.GetDecisionsResponse other = (io.opentdf.platform.authorization.GetDecisionsResponse) obj; + + if (!getDecisionResponsesList() + .equals(other.getDecisionResponsesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDecisionResponsesCount() > 0) { + hash = (37 * hash) + DECISION_RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getDecisionResponsesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.GetDecisionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.GetDecisionsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.GetDecisionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code authorization.GetDecisionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.GetDecisionsResponse) + io.opentdf.platform.authorization.GetDecisionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.GetDecisionsResponse.class, io.opentdf.platform.authorization.GetDecisionsResponse.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.GetDecisionsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (decisionResponsesBuilder_ == null) { + decisionResponses_ = java.util.Collections.emptyList(); + } else { + decisionResponses_ = null; + decisionResponsesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetDecisionsResponse getDefaultInstanceForType() { + return io.opentdf.platform.authorization.GetDecisionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetDecisionsResponse build() { + io.opentdf.platform.authorization.GetDecisionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetDecisionsResponse buildPartial() { + io.opentdf.platform.authorization.GetDecisionsResponse result = new io.opentdf.platform.authorization.GetDecisionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.authorization.GetDecisionsResponse result) { + if (decisionResponsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + decisionResponses_ = java.util.Collections.unmodifiableList(decisionResponses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.decisionResponses_ = decisionResponses_; + } else { + result.decisionResponses_ = decisionResponsesBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.authorization.GetDecisionsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.GetDecisionsResponse) { + return mergeFrom((io.opentdf.platform.authorization.GetDecisionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.GetDecisionsResponse other) { + if (other == io.opentdf.platform.authorization.GetDecisionsResponse.getDefaultInstance()) return this; + if (decisionResponsesBuilder_ == null) { + if (!other.decisionResponses_.isEmpty()) { + if (decisionResponses_.isEmpty()) { + decisionResponses_ = other.decisionResponses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDecisionResponsesIsMutable(); + decisionResponses_.addAll(other.decisionResponses_); + } + onChanged(); + } + } else { + if (!other.decisionResponses_.isEmpty()) { + if (decisionResponsesBuilder_.isEmpty()) { + decisionResponsesBuilder_.dispose(); + decisionResponsesBuilder_ = null; + decisionResponses_ = other.decisionResponses_; + bitField0_ = (bitField0_ & ~0x00000001); + decisionResponsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDecisionResponsesFieldBuilder() : null; + } else { + decisionResponsesBuilder_.addAllMessages(other.decisionResponses_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.authorization.DecisionResponse m = + input.readMessage( + io.opentdf.platform.authorization.DecisionResponse.parser(), + extensionRegistry); + if (decisionResponsesBuilder_ == null) { + ensureDecisionResponsesIsMutable(); + decisionResponses_.add(m); + } else { + decisionResponsesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List decisionResponses_ = + java.util.Collections.emptyList(); + private void ensureDecisionResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + decisionResponses_ = new java.util.ArrayList(decisionResponses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.DecisionResponse, io.opentdf.platform.authorization.DecisionResponse.Builder, io.opentdf.platform.authorization.DecisionResponseOrBuilder> decisionResponsesBuilder_; + + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public java.util.List getDecisionResponsesList() { + if (decisionResponsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(decisionResponses_); + } else { + return decisionResponsesBuilder_.getMessageList(); + } + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public int getDecisionResponsesCount() { + if (decisionResponsesBuilder_ == null) { + return decisionResponses_.size(); + } else { + return decisionResponsesBuilder_.getCount(); + } + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public io.opentdf.platform.authorization.DecisionResponse getDecisionResponses(int index) { + if (decisionResponsesBuilder_ == null) { + return decisionResponses_.get(index); + } else { + return decisionResponsesBuilder_.getMessage(index); + } + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder setDecisionResponses( + int index, io.opentdf.platform.authorization.DecisionResponse value) { + if (decisionResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDecisionResponsesIsMutable(); + decisionResponses_.set(index, value); + onChanged(); + } else { + decisionResponsesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder setDecisionResponses( + int index, io.opentdf.platform.authorization.DecisionResponse.Builder builderForValue) { + if (decisionResponsesBuilder_ == null) { + ensureDecisionResponsesIsMutable(); + decisionResponses_.set(index, builderForValue.build()); + onChanged(); + } else { + decisionResponsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder addDecisionResponses(io.opentdf.platform.authorization.DecisionResponse value) { + if (decisionResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDecisionResponsesIsMutable(); + decisionResponses_.add(value); + onChanged(); + } else { + decisionResponsesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder addDecisionResponses( + int index, io.opentdf.platform.authorization.DecisionResponse value) { + if (decisionResponsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDecisionResponsesIsMutable(); + decisionResponses_.add(index, value); + onChanged(); + } else { + decisionResponsesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder addDecisionResponses( + io.opentdf.platform.authorization.DecisionResponse.Builder builderForValue) { + if (decisionResponsesBuilder_ == null) { + ensureDecisionResponsesIsMutable(); + decisionResponses_.add(builderForValue.build()); + onChanged(); + } else { + decisionResponsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder addDecisionResponses( + int index, io.opentdf.platform.authorization.DecisionResponse.Builder builderForValue) { + if (decisionResponsesBuilder_ == null) { + ensureDecisionResponsesIsMutable(); + decisionResponses_.add(index, builderForValue.build()); + onChanged(); + } else { + decisionResponsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder addAllDecisionResponses( + java.lang.Iterable values) { + if (decisionResponsesBuilder_ == null) { + ensureDecisionResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, decisionResponses_); + onChanged(); + } else { + decisionResponsesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder clearDecisionResponses() { + if (decisionResponsesBuilder_ == null) { + decisionResponses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + decisionResponsesBuilder_.clear(); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public Builder removeDecisionResponses(int index) { + if (decisionResponsesBuilder_ == null) { + ensureDecisionResponsesIsMutable(); + decisionResponses_.remove(index); + onChanged(); + } else { + decisionResponsesBuilder_.remove(index); + } + return this; + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public io.opentdf.platform.authorization.DecisionResponse.Builder getDecisionResponsesBuilder( + int index) { + return getDecisionResponsesFieldBuilder().getBuilder(index); + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public io.opentdf.platform.authorization.DecisionResponseOrBuilder getDecisionResponsesOrBuilder( + int index) { + if (decisionResponsesBuilder_ == null) { + return decisionResponses_.get(index); } else { + return decisionResponsesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public java.util.List + getDecisionResponsesOrBuilderList() { + if (decisionResponsesBuilder_ != null) { + return decisionResponsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(decisionResponses_); + } + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public io.opentdf.platform.authorization.DecisionResponse.Builder addDecisionResponsesBuilder() { + return getDecisionResponsesFieldBuilder().addBuilder( + io.opentdf.platform.authorization.DecisionResponse.getDefaultInstance()); + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public io.opentdf.platform.authorization.DecisionResponse.Builder addDecisionResponsesBuilder( + int index) { + return getDecisionResponsesFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.DecisionResponse.getDefaultInstance()); + } + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + public java.util.List + getDecisionResponsesBuilderList() { + return getDecisionResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.DecisionResponse, io.opentdf.platform.authorization.DecisionResponse.Builder, io.opentdf.platform.authorization.DecisionResponseOrBuilder> + getDecisionResponsesFieldBuilder() { + if (decisionResponsesBuilder_ == null) { + decisionResponsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.DecisionResponse, io.opentdf.platform.authorization.DecisionResponse.Builder, io.opentdf.platform.authorization.DecisionResponseOrBuilder>( + decisionResponses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + decisionResponses_ = null; + } + return decisionResponsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.GetDecisionsResponse) + } + + // @@protoc_insertion_point(class_scope:authorization.GetDecisionsResponse) + private static final io.opentdf.platform.authorization.GetDecisionsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.GetDecisionsResponse(); + } + + public static io.opentdf.platform.authorization.GetDecisionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDecisionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetDecisionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponseOrBuilder.java new file mode 100644 index 00000000..488031c5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface GetDecisionsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.GetDecisionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + java.util.List + getDecisionResponsesList(); + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + io.opentdf.platform.authorization.DecisionResponse getDecisionResponses(int index); + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + int getDecisionResponsesCount(); + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + java.util.List + getDecisionResponsesOrBuilderList(); + /** + * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; + */ + io.opentdf.platform.authorization.DecisionResponseOrBuilder getDecisionResponsesOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequest.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequest.java new file mode 100644 index 00000000..e346c4f4 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequest.java @@ -0,0 +1,1134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
+ *
+ *Request to get entitlements for one or more entities for an optional attribute scope
+ *
+ *Example: Get entitlements for bob and alice (both represented using an email address
+ *
+ *{
+ *"entities": [
+ *{
+ *"id": "e1",
+ *"emailAddress": "bob@example.org"
+ *},
+ *{
+ *"id": "e2",
+ *"emailAddress": "alice@example.org"
+ *}
+ *]
+ *}
+ * 
+ * + * Protobuf type {@code authorization.GetEntitlementsRequest} + */ +public final class GetEntitlementsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.GetEntitlementsRequest) + GetEntitlementsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetEntitlementsRequest.newBuilder() to construct. + private GetEntitlementsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetEntitlementsRequest() { + entities_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetEntitlementsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.GetEntitlementsRequest.class, io.opentdf.platform.authorization.GetEntitlementsRequest.Builder.class); + } + + private int bitField0_; + public static final int ENTITIES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List entities_; + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + @java.lang.Override + public java.util.List getEntitiesList() { + return entities_; + } + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + @java.lang.Override + public java.util.List + getEntitiesOrBuilderList() { + return entities_; + } + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + @java.lang.Override + public int getEntitiesCount() { + return entities_.size(); + } + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.Entity getEntities(int index) { + return entities_.get(index); + } + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( + int index) { + return entities_.get(index); + } + + public static final int SCOPE_FIELD_NUMBER = 2; + private io.opentdf.platform.authorization.ResourceAttribute scope_; + /** + *
+   *optional attribute fqn as a scope
+   * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + * @return Whether the scope field is set. + */ + @java.lang.Override + public boolean hasScope() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   *optional attribute fqn as a scope
+   * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + * @return The scope. + */ + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute getScope() { + return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; + } + /** + *
+   *optional attribute fqn as a scope
+   * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder() { + return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < entities_.size(); i++) { + output.writeMessage(1, entities_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getScope()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, entities_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getScope()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.GetEntitlementsRequest)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.GetEntitlementsRequest other = (io.opentdf.platform.authorization.GetEntitlementsRequest) obj; + + if (!getEntitiesList() + .equals(other.getEntitiesList())) return false; + if (hasScope() != other.hasScope()) return false; + if (hasScope()) { + if (!getScope() + .equals(other.getScope())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntitiesCount() > 0) { + hash = (37 * hash) + ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getEntitiesList().hashCode(); + } + if (hasScope()) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.GetEntitlementsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *Request to get entitlements for one or more entities for an optional attribute scope
+   *
+   *Example: Get entitlements for bob and alice (both represented using an email address
+   *
+   *{
+   *"entities": [
+   *{
+   *"id": "e1",
+   *"emailAddress": "bob@example.org"
+   *},
+   *{
+   *"id": "e2",
+   *"emailAddress": "alice@example.org"
+   *}
+   *]
+   *}
+   * 
+ * + * Protobuf type {@code authorization.GetEntitlementsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.GetEntitlementsRequest) + io.opentdf.platform.authorization.GetEntitlementsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.GetEntitlementsRequest.class, io.opentdf.platform.authorization.GetEntitlementsRequest.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.GetEntitlementsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getEntitiesFieldBuilder(); + getScopeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entitiesBuilder_ == null) { + entities_ = java.util.Collections.emptyList(); + } else { + entities_ = null; + entitiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + scope_ = null; + if (scopeBuilder_ != null) { + scopeBuilder_.dispose(); + scopeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetEntitlementsRequest getDefaultInstanceForType() { + return io.opentdf.platform.authorization.GetEntitlementsRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetEntitlementsRequest build() { + io.opentdf.platform.authorization.GetEntitlementsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetEntitlementsRequest buildPartial() { + io.opentdf.platform.authorization.GetEntitlementsRequest result = new io.opentdf.platform.authorization.GetEntitlementsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.authorization.GetEntitlementsRequest result) { + if (entitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entities_ = java.util.Collections.unmodifiableList(entities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entities_ = entities_; + } else { + result.entities_ = entitiesBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.authorization.GetEntitlementsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.scope_ = scopeBuilder_ == null + ? scope_ + : scopeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.GetEntitlementsRequest) { + return mergeFrom((io.opentdf.platform.authorization.GetEntitlementsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.GetEntitlementsRequest other) { + if (other == io.opentdf.platform.authorization.GetEntitlementsRequest.getDefaultInstance()) return this; + if (entitiesBuilder_ == null) { + if (!other.entities_.isEmpty()) { + if (entities_.isEmpty()) { + entities_ = other.entities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntitiesIsMutable(); + entities_.addAll(other.entities_); + } + onChanged(); + } + } else { + if (!other.entities_.isEmpty()) { + if (entitiesBuilder_.isEmpty()) { + entitiesBuilder_.dispose(); + entitiesBuilder_ = null; + entities_ = other.entities_; + bitField0_ = (bitField0_ & ~0x00000001); + entitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEntitiesFieldBuilder() : null; + } else { + entitiesBuilder_.addAllMessages(other.entities_); + } + } + } + if (other.hasScope()) { + mergeScope(other.getScope()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.authorization.Entity m = + input.readMessage( + io.opentdf.platform.authorization.Entity.parser(), + extensionRegistry); + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.add(m); + } else { + entitiesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getScopeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List entities_ = + java.util.Collections.emptyList(); + private void ensureEntitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entities_ = new java.util.ArrayList(entities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder> entitiesBuilder_; + + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public java.util.List getEntitiesList() { + if (entitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entities_); + } else { + return entitiesBuilder_.getMessageList(); + } + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public int getEntitiesCount() { + if (entitiesBuilder_ == null) { + return entities_.size(); + } else { + return entitiesBuilder_.getCount(); + } + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.Entity getEntities(int index) { + if (entitiesBuilder_ == null) { + return entities_.get(index); + } else { + return entitiesBuilder_.getMessage(index); + } + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder setEntities( + int index, io.opentdf.platform.authorization.Entity value) { + if (entitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitiesIsMutable(); + entities_.set(index, value); + onChanged(); + } else { + entitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder setEntities( + int index, io.opentdf.platform.authorization.Entity.Builder builderForValue) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.set(index, builderForValue.build()); + onChanged(); + } else { + entitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder addEntities(io.opentdf.platform.authorization.Entity value) { + if (entitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitiesIsMutable(); + entities_.add(value); + onChanged(); + } else { + entitiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder addEntities( + int index, io.opentdf.platform.authorization.Entity value) { + if (entitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitiesIsMutable(); + entities_.add(index, value); + onChanged(); + } else { + entitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder addEntities( + io.opentdf.platform.authorization.Entity.Builder builderForValue) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.add(builderForValue.build()); + onChanged(); + } else { + entitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder addEntities( + int index, io.opentdf.platform.authorization.Entity.Builder builderForValue) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.add(index, builderForValue.build()); + onChanged(); + } else { + entitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder addAllEntities( + java.lang.Iterable values) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, entities_); + onChanged(); + } else { + entitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder clearEntities() { + if (entitiesBuilder_ == null) { + entities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entitiesBuilder_.clear(); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public Builder removeEntities(int index) { + if (entitiesBuilder_ == null) { + ensureEntitiesIsMutable(); + entities_.remove(index); + onChanged(); + } else { + entitiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.Entity.Builder getEntitiesBuilder( + int index) { + return getEntitiesFieldBuilder().getBuilder(index); + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( + int index) { + if (entitiesBuilder_ == null) { + return entities_.get(index); } else { + return entitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public java.util.List + getEntitiesOrBuilderList() { + if (entitiesBuilder_ != null) { + return entitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entities_); + } + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder() { + return getEntitiesFieldBuilder().addBuilder( + io.opentdf.platform.authorization.Entity.getDefaultInstance()); + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder( + int index) { + return getEntitiesFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.Entity.getDefaultInstance()); + } + /** + *
+     * list of requested entities
+     * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + public java.util.List + getEntitiesBuilderList() { + return getEntitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder> + getEntitiesFieldBuilder() { + if (entitiesBuilder_ == null) { + entitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder>( + entities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + entities_ = null; + } + return entitiesBuilder_; + } + + private io.opentdf.platform.authorization.ResourceAttribute scope_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> scopeBuilder_; + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + * @return Whether the scope field is set. + */ + public boolean hasScope() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + * @return The scope. + */ + public io.opentdf.platform.authorization.ResourceAttribute getScope() { + if (scopeBuilder_ == null) { + return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; + } else { + return scopeBuilder_.getMessage(); + } + } + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + public Builder setScope(io.opentdf.platform.authorization.ResourceAttribute value) { + if (scopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scope_ = value; + } else { + scopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + public Builder setScope( + io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { + if (scopeBuilder_ == null) { + scope_ = builderForValue.build(); + } else { + scopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + public Builder mergeScope(io.opentdf.platform.authorization.ResourceAttribute value) { + if (scopeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + scope_ != null && + scope_ != io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()) { + getScopeBuilder().mergeFrom(value); + } else { + scope_ = value; + } + } else { + scopeBuilder_.mergeFrom(value); + } + if (scope_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000002); + scope_ = null; + if (scopeBuilder_ != null) { + scopeBuilder_.dispose(); + scopeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + public io.opentdf.platform.authorization.ResourceAttribute.Builder getScopeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getScopeFieldBuilder().getBuilder(); + } + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder() { + if (scopeBuilder_ != null) { + return scopeBuilder_.getMessageOrBuilder(); + } else { + return scope_ == null ? + io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; + } + } + /** + *
+     *optional attribute fqn as a scope
+     * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> + getScopeFieldBuilder() { + if (scopeBuilder_ == null) { + scopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder>( + getScope(), + getParentForChildren(), + isClean()); + scope_ = null; + } + return scopeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.GetEntitlementsRequest) + } + + // @@protoc_insertion_point(class_scope:authorization.GetEntitlementsRequest) + private static final io.opentdf.platform.authorization.GetEntitlementsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.GetEntitlementsRequest(); + } + + public static io.opentdf.platform.authorization.GetEntitlementsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEntitlementsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetEntitlementsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java new file mode 100644 index 00000000..af49f7b2 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface GetEntitlementsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.GetEntitlementsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + java.util.List + getEntitiesList(); + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + io.opentdf.platform.authorization.Entity getEntities(int index); + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + int getEntitiesCount(); + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + java.util.List + getEntitiesOrBuilderList(); + /** + *
+   * list of requested entities
+   * 
+ * + * repeated .authorization.Entity entities = 1 [json_name = "entities"]; + */ + io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( + int index); + + /** + *
+   *optional attribute fqn as a scope
+   * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + * @return Whether the scope field is set. + */ + boolean hasScope(); + /** + *
+   *optional attribute fqn as a scope
+   * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + * @return The scope. + */ + io.opentdf.platform.authorization.ResourceAttribute getScope(); + /** + *
+   *optional attribute fqn as a scope
+   * 
+ * + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; + */ + io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponse.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponse.java new file mode 100644 index 00000000..652e467e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponse.java @@ -0,0 +1,814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
+ *
+ *
+ *Example Response for a request of : Get entitlements for bob and alice (both represented using an email address
+ *
+ *{
+ *"entitlements":  [
+ *{
+ *"entityId":  "e1",
+ *"attributeValueReferences":  [
+ *{
+ *"attributeFqn":  "http://www.example.org/attr/foo/value/bar"
+ *}
+ *]
+ *},
+ *{
+ *"entityId":  "e2",
+ *"attributeValueReferences":  [
+ *{
+ *"attributeFqn":  "http://www.example.org/attr/color/value/red"
+ *}
+ *]
+ *}
+ *]
+ *}
+ * 
+ * + * Protobuf type {@code authorization.GetEntitlementsResponse} + */ +public final class GetEntitlementsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.GetEntitlementsResponse) + GetEntitlementsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetEntitlementsResponse.newBuilder() to construct. + private GetEntitlementsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetEntitlementsResponse() { + entitlements_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetEntitlementsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.GetEntitlementsResponse.class, io.opentdf.platform.authorization.GetEntitlementsResponse.Builder.class); + } + + public static final int ENTITLEMENTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List entitlements_; + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + @java.lang.Override + public java.util.List getEntitlementsList() { + return entitlements_; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + @java.lang.Override + public java.util.List + getEntitlementsOrBuilderList() { + return entitlements_; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + @java.lang.Override + public int getEntitlementsCount() { + return entitlements_.size(); + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityEntitlements getEntitlements(int index) { + return entitlements_.get(index); + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.EntityEntitlementsOrBuilder getEntitlementsOrBuilder( + int index) { + return entitlements_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < entitlements_.size(); i++) { + output.writeMessage(1, entitlements_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entitlements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, entitlements_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.GetEntitlementsResponse)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.GetEntitlementsResponse other = (io.opentdf.platform.authorization.GetEntitlementsResponse) obj; + + if (!getEntitlementsList() + .equals(other.getEntitlementsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntitlementsCount() > 0) { + hash = (37 * hash) + ENTITLEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEntitlementsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.GetEntitlementsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *
+   *Example Response for a request of : Get entitlements for bob and alice (both represented using an email address
+   *
+   *{
+   *"entitlements":  [
+   *{
+   *"entityId":  "e1",
+   *"attributeValueReferences":  [
+   *{
+   *"attributeFqn":  "http://www.example.org/attr/foo/value/bar"
+   *}
+   *]
+   *},
+   *{
+   *"entityId":  "e2",
+   *"attributeValueReferences":  [
+   *{
+   *"attributeFqn":  "http://www.example.org/attr/color/value/red"
+   *}
+   *]
+   *}
+   *]
+   *}
+   * 
+ * + * Protobuf type {@code authorization.GetEntitlementsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.GetEntitlementsResponse) + io.opentdf.platform.authorization.GetEntitlementsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.GetEntitlementsResponse.class, io.opentdf.platform.authorization.GetEntitlementsResponse.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.GetEntitlementsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + } else { + entitlements_ = null; + entitlementsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetEntitlementsResponse getDefaultInstanceForType() { + return io.opentdf.platform.authorization.GetEntitlementsResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetEntitlementsResponse build() { + io.opentdf.platform.authorization.GetEntitlementsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetEntitlementsResponse buildPartial() { + io.opentdf.platform.authorization.GetEntitlementsResponse result = new io.opentdf.platform.authorization.GetEntitlementsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.authorization.GetEntitlementsResponse result) { + if (entitlementsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entitlements_ = entitlements_; + } else { + result.entitlements_ = entitlementsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.authorization.GetEntitlementsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.GetEntitlementsResponse) { + return mergeFrom((io.opentdf.platform.authorization.GetEntitlementsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.GetEntitlementsResponse other) { + if (other == io.opentdf.platform.authorization.GetEntitlementsResponse.getDefaultInstance()) return this; + if (entitlementsBuilder_ == null) { + if (!other.entitlements_.isEmpty()) { + if (entitlements_.isEmpty()) { + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntitlementsIsMutable(); + entitlements_.addAll(other.entitlements_); + } + onChanged(); + } + } else { + if (!other.entitlements_.isEmpty()) { + if (entitlementsBuilder_.isEmpty()) { + entitlementsBuilder_.dispose(); + entitlementsBuilder_ = null; + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + entitlementsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEntitlementsFieldBuilder() : null; + } else { + entitlementsBuilder_.addAllMessages(other.entitlements_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.authorization.EntityEntitlements m = + input.readMessage( + io.opentdf.platform.authorization.EntityEntitlements.parser(), + extensionRegistry); + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(m); + } else { + entitlementsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List entitlements_ = + java.util.Collections.emptyList(); + private void ensureEntitlementsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entitlements_ = new java.util.ArrayList(entitlements_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.EntityEntitlements, io.opentdf.platform.authorization.EntityEntitlements.Builder, io.opentdf.platform.authorization.EntityEntitlementsOrBuilder> entitlementsBuilder_; + + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public java.util.List getEntitlementsList() { + if (entitlementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entitlements_); + } else { + return entitlementsBuilder_.getMessageList(); + } + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public int getEntitlementsCount() { + if (entitlementsBuilder_ == null) { + return entitlements_.size(); + } else { + return entitlementsBuilder_.getCount(); + } + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public io.opentdf.platform.authorization.EntityEntitlements getEntitlements(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessage(index); + } + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder setEntitlements( + int index, io.opentdf.platform.authorization.EntityEntitlements value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.set(index, value); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder setEntitlements( + int index, io.opentdf.platform.authorization.EntityEntitlements.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.set(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder addEntitlements(io.opentdf.platform.authorization.EntityEntitlements value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder addEntitlements( + int index, io.opentdf.platform.authorization.EntityEntitlements value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(index, value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder addEntitlements( + io.opentdf.platform.authorization.EntityEntitlements.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder addEntitlements( + int index, io.opentdf.platform.authorization.EntityEntitlements.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder addAllEntitlements( + java.lang.Iterable values) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, entitlements_); + onChanged(); + } else { + entitlementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder clearEntitlements() { + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entitlementsBuilder_.clear(); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public Builder removeEntitlements(int index) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.remove(index); + onChanged(); + } else { + entitlementsBuilder_.remove(index); + } + return this; + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public io.opentdf.platform.authorization.EntityEntitlements.Builder getEntitlementsBuilder( + int index) { + return getEntitlementsFieldBuilder().getBuilder(index); + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public io.opentdf.platform.authorization.EntityEntitlementsOrBuilder getEntitlementsOrBuilder( + int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); } else { + return entitlementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public java.util.List + getEntitlementsOrBuilderList() { + if (entitlementsBuilder_ != null) { + return entitlementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entitlements_); + } + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public io.opentdf.platform.authorization.EntityEntitlements.Builder addEntitlementsBuilder() { + return getEntitlementsFieldBuilder().addBuilder( + io.opentdf.platform.authorization.EntityEntitlements.getDefaultInstance()); + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public io.opentdf.platform.authorization.EntityEntitlements.Builder addEntitlementsBuilder( + int index) { + return getEntitlementsFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.EntityEntitlements.getDefaultInstance()); + } + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + public java.util.List + getEntitlementsBuilderList() { + return getEntitlementsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.EntityEntitlements, io.opentdf.platform.authorization.EntityEntitlements.Builder, io.opentdf.platform.authorization.EntityEntitlementsOrBuilder> + getEntitlementsFieldBuilder() { + if (entitlementsBuilder_ == null) { + entitlementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.EntityEntitlements, io.opentdf.platform.authorization.EntityEntitlements.Builder, io.opentdf.platform.authorization.EntityEntitlementsOrBuilder>( + entitlements_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + entitlements_ = null; + } + return entitlementsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.GetEntitlementsResponse) + } + + // @@protoc_insertion_point(class_scope:authorization.GetEntitlementsResponse) + private static final io.opentdf.platform.authorization.GetEntitlementsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.GetEntitlementsResponse(); + } + + public static io.opentdf.platform.authorization.GetEntitlementsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEntitlementsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.GetEntitlementsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponseOrBuilder.java new file mode 100644 index 00000000..8f0d42f7 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface GetEntitlementsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.GetEntitlementsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + java.util.List + getEntitlementsList(); + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + io.opentdf.platform.authorization.EntityEntitlements getEntitlements(int index); + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + int getEntitlementsCount(); + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + java.util.List + getEntitlementsOrBuilderList(); + /** + * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; + */ + io.opentdf.platform.authorization.EntityEntitlementsOrBuilder getEntitlementsOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttribute.java b/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttribute.java new file mode 100644 index 00000000..4d4e6784 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttribute.java @@ -0,0 +1,603 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
+ *A logical bucket of attributes belonging to a "Resource"
+ * 
+ * + * Protobuf type {@code authorization.ResourceAttribute} + */ +public final class ResourceAttribute extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.ResourceAttribute) + ResourceAttributeOrBuilder { +private static final long serialVersionUID = 0L; + // Use ResourceAttribute.newBuilder() to construct. + private ResourceAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourceAttribute() { + attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourceAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.ResourceAttribute.class, io.opentdf.platform.authorization.ResourceAttribute.Builder.class); + } + + public static final int ATTRIBUTE_FQNS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return A list containing the attributeFqns. + */ + public com.google.protobuf.ProtocolStringList + getAttributeFqnsList() { + return attributeFqns_; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return The count of attributeFqns. + */ + public int getAttributeFqnsCount() { + return attributeFqns_.size(); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the element to return. + * @return The attributeFqns at the given index. + */ + public java.lang.String getAttributeFqns(int index) { + return attributeFqns_.get(index); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the value to return. + * @return The bytes of the attributeFqns at the given index. + */ + public com.google.protobuf.ByteString + getAttributeFqnsBytes(int index) { + return attributeFqns_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < attributeFqns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeFqns_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < attributeFqns_.size(); i++) { + dataSize += computeStringSizeNoTag(attributeFqns_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributeFqnsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.ResourceAttribute)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.ResourceAttribute other = (io.opentdf.platform.authorization.ResourceAttribute) obj; + + if (!getAttributeFqnsList() + .equals(other.getAttributeFqnsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAttributeFqnsCount() > 0) { + hash = (37 * hash) + ATTRIBUTE_FQNS_FIELD_NUMBER; + hash = (53 * hash) + getAttributeFqnsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.ResourceAttribute parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.ResourceAttribute parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.ResourceAttribute prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *A logical bucket of attributes belonging to a "Resource"
+   * 
+ * + * Protobuf type {@code authorization.ResourceAttribute} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.ResourceAttribute) + io.opentdf.platform.authorization.ResourceAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.ResourceAttribute.class, io.opentdf.platform.authorization.ResourceAttribute.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.ResourceAttribute.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute getDefaultInstanceForType() { + return io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute build() { + io.opentdf.platform.authorization.ResourceAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute buildPartial() { + io.opentdf.platform.authorization.ResourceAttribute result = new io.opentdf.platform.authorization.ResourceAttribute(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.authorization.ResourceAttribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + attributeFqns_.makeImmutable(); + result.attributeFqns_ = attributeFqns_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.ResourceAttribute) { + return mergeFrom((io.opentdf.platform.authorization.ResourceAttribute)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.ResourceAttribute other) { + if (other == io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()) return this; + if (!other.attributeFqns_.isEmpty()) { + if (attributeFqns_.isEmpty()) { + attributeFqns_ = other.attributeFqns_; + bitField0_ |= 0x00000001; + } else { + ensureAttributeFqnsIsMutable(); + attributeFqns_.addAll(other.attributeFqns_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAttributeFqnsIsMutable(); + attributeFqns_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAttributeFqnsIsMutable() { + if (!attributeFqns_.isModifiable()) { + attributeFqns_ = new com.google.protobuf.LazyStringArrayList(attributeFqns_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return A list containing the attributeFqns. + */ + public com.google.protobuf.ProtocolStringList + getAttributeFqnsList() { + attributeFqns_.makeImmutable(); + return attributeFqns_; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return The count of attributeFqns. + */ + public int getAttributeFqnsCount() { + return attributeFqns_.size(); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the element to return. + * @return The attributeFqns at the given index. + */ + public java.lang.String getAttributeFqns(int index) { + return attributeFqns_.get(index); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the value to return. + * @return The bytes of the attributeFqns at the given index. + */ + public com.google.protobuf.ByteString + getAttributeFqnsBytes(int index) { + return attributeFqns_.getByteString(index); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index to set the value at. + * @param value The attributeFqns to set. + * @return This builder for chaining. + */ + public Builder setAttributeFqns( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAttributeFqnsIsMutable(); + attributeFqns_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param value The attributeFqns to add. + * @return This builder for chaining. + */ + public Builder addAttributeFqns( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAttributeFqnsIsMutable(); + attributeFqns_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param values The attributeFqns to add. + * @return This builder for chaining. + */ + public Builder addAllAttributeFqns( + java.lang.Iterable values) { + ensureAttributeFqnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, attributeFqns_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return This builder for chaining. + */ + public Builder clearAttributeFqns() { + attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param value The bytes of the attributeFqns to add. + * @return This builder for chaining. + */ + public Builder addAttributeFqnsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAttributeFqnsIsMutable(); + attributeFqns_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.ResourceAttribute) + } + + // @@protoc_insertion_point(class_scope:authorization.ResourceAttribute) + private static final io.opentdf.platform.authorization.ResourceAttribute DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.ResourceAttribute(); + } + + public static io.opentdf.platform.authorization.ResourceAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceAttribute parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java new file mode 100644 index 00000000..739a01bf --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface ResourceAttributeOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.ResourceAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return A list containing the attributeFqns. + */ + java.util.List + getAttributeFqnsList(); + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return The count of attributeFqns. + */ + int getAttributeFqnsCount(); + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the element to return. + * @return The attributeFqns at the given index. + */ + java.lang.String getAttributeFqns(int index); + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the value to return. + * @return The bytes of the attributeFqns at the given index. + */ + com.google.protobuf.ByteString + getAttributeFqnsBytes(int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/common/ActiveStateEnum.java b/protocol/src/main/java/io/opentdf/platform/common/ActiveStateEnum.java new file mode 100644 index 00000000..db9c131d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/common/ActiveStateEnum.java @@ -0,0 +1,136 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common/common.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.common; + +/** + *
+ * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package
+ * 
+ * + * Protobuf enum {@code common.ActiveStateEnum} + */ +public enum ActiveStateEnum + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ACTIVE_STATE_ENUM_UNSPECIFIED = 0; + */ + ACTIVE_STATE_ENUM_UNSPECIFIED(0), + /** + * ACTIVE_STATE_ENUM_ACTIVE = 1; + */ + ACTIVE_STATE_ENUM_ACTIVE(1), + /** + * ACTIVE_STATE_ENUM_INACTIVE = 2; + */ + ACTIVE_STATE_ENUM_INACTIVE(2), + /** + * ACTIVE_STATE_ENUM_ANY = 3; + */ + ACTIVE_STATE_ENUM_ANY(3), + UNRECOGNIZED(-1), + ; + + /** + * ACTIVE_STATE_ENUM_UNSPECIFIED = 0; + */ + public static final int ACTIVE_STATE_ENUM_UNSPECIFIED_VALUE = 0; + /** + * ACTIVE_STATE_ENUM_ACTIVE = 1; + */ + public static final int ACTIVE_STATE_ENUM_ACTIVE_VALUE = 1; + /** + * ACTIVE_STATE_ENUM_INACTIVE = 2; + */ + public static final int ACTIVE_STATE_ENUM_INACTIVE_VALUE = 2; + /** + * ACTIVE_STATE_ENUM_ANY = 3; + */ + public static final int ACTIVE_STATE_ENUM_ANY_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActiveStateEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ActiveStateEnum forNumber(int value) { + switch (value) { + case 0: return ACTIVE_STATE_ENUM_UNSPECIFIED; + case 1: return ACTIVE_STATE_ENUM_ACTIVE; + case 2: return ACTIVE_STATE_ENUM_INACTIVE; + case 3: return ACTIVE_STATE_ENUM_ANY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ActiveStateEnum> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ActiveStateEnum findValueByNumber(int number) { + return ActiveStateEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.opentdf.platform.common.CommonProto.getDescriptor().getEnumTypes().get(1); + } + + private static final ActiveStateEnum[] VALUES = values(); + + public static ActiveStateEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ActiveStateEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:common.ActiveStateEnum) +} + diff --git a/protocol/src/main/java/io/opentdf/platform/common/CommonProto.java b/protocol/src/main/java/io/opentdf/platform/common/CommonProto.java new file mode 100644 index 00000000..74dcdd27 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/common/CommonProto.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common/common.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.common; + +public final class CommonProto { + private CommonProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_common_Metadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_common_Metadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_common_Metadata_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_common_Metadata_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_common_MetadataMutable_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_common_MetadataMutable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_common_MetadataMutable_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_common_MetadataMutable_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023common/common.proto\022\006common\032\037google/pr" + + "otobuf/timestamp.proto\"\361\001\n\010Metadata\0229\n\nc" + + "reated_at\030\001 \001(\0132\032.google.protobuf.Timest" + + "ampR\tcreatedAt\0229\n\nupdated_at\030\002 \001(\0132\032.goo" + + "gle.protobuf.TimestampR\tupdatedAt\0224\n\006lab" + + "els\030\003 \003(\0132\034.common.Metadata.LabelsEntryR" + + "\006labels\0329\n\013LabelsEntry\022\020\n\003key\030\001 \001(\tR\003key" + + "\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"\211\001\n\017MetadataM" + + "utable\022;\n\006labels\030\003 \003(\0132#.common.Metadata" + + "Mutable.LabelsEntryR\006labels\0329\n\013LabelsEnt" + + "ry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005val" + + "ue:\0028\001*}\n\022MetadataUpdateEnum\022$\n METADATA" + + "_UPDATE_ENUM_UNSPECIFIED\020\000\022\037\n\033METADATA_U" + + "PDATE_ENUM_EXTEND\020\001\022 \n\034METADATA_UPDATE_E" + + "NUM_REPLACE\020\002*\215\001\n\017ActiveStateEnum\022!\n\035ACT" + + "IVE_STATE_ENUM_UNSPECIFIED\020\000\022\034\n\030ACTIVE_S" + + "TATE_ENUM_ACTIVE\020\001\022\036\n\032ACTIVE_STATE_ENUM_" + + "INACTIVE\020\002\022\031\n\025ACTIVE_STATE_ENUM_ANY\020\003Ba\n" + + "\032io.opentdf.platform.commonB\013CommonProto" + + "P\001\242\002\003CXX\252\002\006Common\312\002\006Common\342\002\022Common\\GPBM" + + "etadata\352\002\006Commonb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_common_Metadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_common_Metadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_common_Metadata_descriptor, + new java.lang.String[] { "CreatedAt", "UpdatedAt", "Labels", }); + internal_static_common_Metadata_LabelsEntry_descriptor = + internal_static_common_Metadata_descriptor.getNestedTypes().get(0); + internal_static_common_Metadata_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_common_Metadata_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_common_MetadataMutable_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_common_MetadataMutable_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_common_MetadataMutable_descriptor, + new java.lang.String[] { "Labels", }); + internal_static_common_MetadataMutable_LabelsEntry_descriptor = + internal_static_common_MetadataMutable_descriptor.getNestedTypes().get(0); + internal_static_common_MetadataMutable_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_common_MetadataMutable_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/common/Metadata.java b/protocol/src/main/java/io/opentdf/platform/common/Metadata.java new file mode 100644 index 00000000..72e2d1a2 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/common/Metadata.java @@ -0,0 +1,1211 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common/common.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.common; + +/** + *
+ * Struct to uniquely identify a resource with optional additional metadata
+ * 
+ * + * Protobuf type {@code common.Metadata} + */ +public final class Metadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:common.Metadata) + MetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Metadata() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Metadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.common.Metadata.class, io.opentdf.platform.common.Metadata.Builder.class); + } + + private int bitField0_; + public static final int CREATED_AT_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createdAt_; + /** + *
+   * created_at set by server (entity who created will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + * @return Whether the createdAt field is set. + */ + @java.lang.Override + public boolean hasCreatedAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * created_at set by server (entity who created will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + * @return The createdAt. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreatedAt() { + return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; + } + /** + *
+   * created_at set by server (entity who created will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { + return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; + } + + public static final int UPDATED_AT_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updatedAt_; + /** + *
+   * updated_at set by server (entity who updated will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + * @return Whether the updatedAt field is set. + */ + @java.lang.Override + public boolean hasUpdatedAt() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * updated_at set by server (entity who updated will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + * @return The updatedAt. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdatedAt() { + return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; + } + /** + *
+   * updated_at set by server (entity who updated will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder() { + return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; + } + + public static final int LABELS_FIELD_NUMBER = 3; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreatedAt()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdatedAt()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreatedAt()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdatedAt()); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, labels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.common.Metadata)) { + return super.equals(obj); + } + io.opentdf.platform.common.Metadata other = (io.opentdf.platform.common.Metadata) obj; + + if (hasCreatedAt() != other.hasCreatedAt()) return false; + if (hasCreatedAt()) { + if (!getCreatedAt() + .equals(other.getCreatedAt())) return false; + } + if (hasUpdatedAt() != other.hasUpdatedAt()) return false; + if (hasUpdatedAt()) { + if (!getUpdatedAt() + .equals(other.getUpdatedAt())) return false; + } + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreatedAt()) { + hash = (37 * hash) + CREATED_AT_FIELD_NUMBER; + hash = (53 * hash) + getCreatedAt().hashCode(); + } + if (hasUpdatedAt()) { + hash = (37 * hash) + UPDATED_AT_FIELD_NUMBER; + hash = (53 * hash) + getUpdatedAt().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.common.Metadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.common.Metadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.common.Metadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.common.Metadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.common.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.common.Metadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.common.Metadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.common.Metadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.common.Metadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.common.Metadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.common.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.common.Metadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.common.Metadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Struct to uniquely identify a resource with optional additional metadata
+   * 
+ * + * Protobuf type {@code common.Metadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:common.Metadata) + io.opentdf.platform.common.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.common.Metadata.class, io.opentdf.platform.common.Metadata.Builder.class); + } + + // Construct using io.opentdf.platform.common.Metadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCreatedAtFieldBuilder(); + getUpdatedAtFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createdAt_ = null; + if (createdAtBuilder_ != null) { + createdAtBuilder_.dispose(); + createdAtBuilder_ = null; + } + updatedAt_ = null; + if (updatedAtBuilder_ != null) { + updatedAtBuilder_.dispose(); + updatedAtBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.common.Metadata getDefaultInstanceForType() { + return io.opentdf.platform.common.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.common.Metadata build() { + io.opentdf.platform.common.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.common.Metadata buildPartial() { + io.opentdf.platform.common.Metadata result = new io.opentdf.platform.common.Metadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.common.Metadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createdAt_ = createdAtBuilder_ == null + ? createdAt_ + : createdAtBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updatedAt_ = updatedAtBuilder_ == null + ? updatedAt_ + : updatedAtBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.common.Metadata) { + return mergeFrom((io.opentdf.platform.common.Metadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.common.Metadata other) { + if (other == io.opentdf.platform.common.Metadata.getDefaultInstance()) return this; + if (other.hasCreatedAt()) { + mergeCreatedAt(other.getCreatedAt()); + } + if (other.hasUpdatedAt()) { + mergeUpdatedAt(other.getUpdatedAt()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCreatedAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUpdatedAtFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp createdAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_; + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + * @return Whether the createdAt field is set. + */ + public boolean hasCreatedAt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + * @return The createdAt. + */ + public com.google.protobuf.Timestamp getCreatedAt() { + if (createdAtBuilder_ == null) { + return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; + } else { + return createdAtBuilder_.getMessage(); + } + } + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + public Builder setCreatedAt(com.google.protobuf.Timestamp value) { + if (createdAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createdAt_ = value; + } else { + createdAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + public Builder setCreatedAt( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createdAtBuilder_ == null) { + createdAt_ = builderForValue.build(); + } else { + createdAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) { + if (createdAtBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + createdAt_ != null && + createdAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreatedAtBuilder().mergeFrom(value); + } else { + createdAt_ = value; + } + } else { + createdAtBuilder_.mergeFrom(value); + } + if (createdAt_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + public Builder clearCreatedAt() { + bitField0_ = (bitField0_ & ~0x00000001); + createdAt_ = null; + if (createdAtBuilder_ != null) { + createdAtBuilder_.dispose(); + createdAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreatedAtFieldBuilder().getBuilder(); + } + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { + if (createdAtBuilder_ != null) { + return createdAtBuilder_.getMessageOrBuilder(); + } else { + return createdAt_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; + } + } + /** + *
+     * created_at set by server (entity who created will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreatedAtFieldBuilder() { + if (createdAtBuilder_ == null) { + createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreatedAt(), + getParentForChildren(), + isClean()); + createdAt_ = null; + } + return createdAtBuilder_; + } + + private com.google.protobuf.Timestamp updatedAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updatedAtBuilder_; + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + * @return Whether the updatedAt field is set. + */ + public boolean hasUpdatedAt() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + * @return The updatedAt. + */ + public com.google.protobuf.Timestamp getUpdatedAt() { + if (updatedAtBuilder_ == null) { + return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; + } else { + return updatedAtBuilder_.getMessage(); + } + } + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + public Builder setUpdatedAt(com.google.protobuf.Timestamp value) { + if (updatedAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updatedAt_ = value; + } else { + updatedAtBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + public Builder setUpdatedAt( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updatedAtBuilder_ == null) { + updatedAt_ = builderForValue.build(); + } else { + updatedAtBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + public Builder mergeUpdatedAt(com.google.protobuf.Timestamp value) { + if (updatedAtBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + updatedAt_ != null && + updatedAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdatedAtBuilder().mergeFrom(value); + } else { + updatedAt_ = value; + } + } else { + updatedAtBuilder_.mergeFrom(value); + } + if (updatedAt_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + public Builder clearUpdatedAt() { + bitField0_ = (bitField0_ & ~0x00000002); + updatedAt_ = null; + if (updatedAtBuilder_ != null) { + updatedAtBuilder_.dispose(); + updatedAtBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdatedAtBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdatedAtFieldBuilder().getBuilder(); + } + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder() { + if (updatedAtBuilder_ != null) { + return updatedAtBuilder_.getMessageOrBuilder(); + } else { + return updatedAt_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; + } + } + /** + *
+     * updated_at set by server (entity who updated will recorded in an audit event)
+     * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdatedAtFieldBuilder() { + if (updatedAtBuilder_ == null) { + updatedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdatedAt(), + getParentForChildren(), + isClean()); + updatedAt_ = null; + } + return updatedAtBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * optional short description
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * optional short description
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * optional short description
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * optional short description
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * optional short description
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000004; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * optional short description
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * optional short description
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:common.Metadata) + } + + // @@protoc_insertion_point(class_scope:common.Metadata) + private static final io.opentdf.platform.common.Metadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.common.Metadata(); + } + + public static io.opentdf.platform.common.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.common.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/common/MetadataMutable.java b/protocol/src/main/java/io/opentdf/platform/common/MetadataMutable.java new file mode 100644 index 00000000..373d1442 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/common/MetadataMutable.java @@ -0,0 +1,729 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common/common.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.common; + +/** + * Protobuf type {@code common.MetadataMutable} + */ +public final class MetadataMutable extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:common.MetadataMutable) + MetadataMutableOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataMutable.newBuilder() to construct. + private MetadataMutable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataMutable() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataMutable(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.common.MetadataMutable.class, io.opentdf.platform.common.MetadataMutable.Builder.class); + } + + public static final int LABELS_FIELD_NUMBER = 3; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, labels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.common.MetadataMutable)) { + return super.equals(obj); + } + io.opentdf.platform.common.MetadataMutable other = (io.opentdf.platform.common.MetadataMutable) obj; + + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.common.MetadataMutable parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.common.MetadataMutable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.common.MetadataMutable parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.common.MetadataMutable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.common.MetadataMutable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code common.MetadataMutable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:common.MetadataMutable) + io.opentdf.platform.common.MetadataMutableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.common.MetadataMutable.class, io.opentdf.platform.common.MetadataMutable.Builder.class); + } + + // Construct using io.opentdf.platform.common.MetadataMutable.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getDefaultInstanceForType() { + return io.opentdf.platform.common.MetadataMutable.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable build() { + io.opentdf.platform.common.MetadataMutable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable buildPartial() { + io.opentdf.platform.common.MetadataMutable result = new io.opentdf.platform.common.MetadataMutable(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.common.MetadataMutable result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.common.MetadataMutable) { + return mergeFrom((io.opentdf.platform.common.MetadataMutable)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.common.MetadataMutable other) { + if (other == io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) return this; + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLabels().getMutableMap().put( + labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return labels_; + } + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * optional labels
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * optional labels
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * optional labels
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * optional labels
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * optional labels
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + bitField0_ |= 0x00000001; + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * optional labels
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * optional labels
+     * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:common.MetadataMutable) + } + + // @@protoc_insertion_point(class_scope:common.MetadataMutable) + private static final io.opentdf.platform.common.MetadataMutable DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.common.MetadataMutable(); + } + + public static io.opentdf.platform.common.MetadataMutable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataMutable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/common/MetadataMutableOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/common/MetadataMutableOrBuilder.java new file mode 100644 index 00000000..8660768e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/common/MetadataMutableOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common/common.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.common; + +public interface MetadataMutableOrBuilder extends + // @@protoc_insertion_point(interface_extends:common.MetadataMutable) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + int getLabelsCount(); + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * optional labels
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/io/opentdf/platform/common/MetadataOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/common/MetadataOrBuilder.java new file mode 100644 index 00000000..024b9fb0 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/common/MetadataOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common/common.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.common; + +public interface MetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:common.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * created_at set by server (entity who created will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + * @return Whether the createdAt field is set. + */ + boolean hasCreatedAt(); + /** + *
+   * created_at set by server (entity who created will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + * @return The createdAt. + */ + com.google.protobuf.Timestamp getCreatedAt(); + /** + *
+   * created_at set by server (entity who created will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; + */ + com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder(); + + /** + *
+   * updated_at set by server (entity who updated will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + * @return Whether the updatedAt field is set. + */ + boolean hasUpdatedAt(); + /** + *
+   * updated_at set by server (entity who updated will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + * @return The updatedAt. + */ + com.google.protobuf.Timestamp getUpdatedAt(); + /** + *
+   * updated_at set by server (entity who updated will recorded in an audit event)
+   * 
+ * + * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder(); + + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + int getLabelsCount(); + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * optional short description
+   * 
+ * + * map<string, string> labels = 3 [json_name = "labels"]; + */ + java.lang.String getLabelsOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/io/opentdf/platform/common/MetadataUpdateEnum.java b/protocol/src/main/java/io/opentdf/platform/common/MetadataUpdateEnum.java new file mode 100644 index 00000000..2f8c1b7f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/common/MetadataUpdateEnum.java @@ -0,0 +1,147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: common/common.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.common; + +/** + * Protobuf enum {@code common.MetadataUpdateEnum} + */ +public enum MetadataUpdateEnum + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * unspecified update type
+   * 
+ * + * METADATA_UPDATE_ENUM_UNSPECIFIED = 0; + */ + METADATA_UPDATE_ENUM_UNSPECIFIED(0), + /** + *
+   * only update the fields that are provided
+   * 
+ * + * METADATA_UPDATE_ENUM_EXTEND = 1; + */ + METADATA_UPDATE_ENUM_EXTEND(1), + /** + *
+   * replace the entire metadata with the provided metadata
+   * 
+ * + * METADATA_UPDATE_ENUM_REPLACE = 2; + */ + METADATA_UPDATE_ENUM_REPLACE(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * unspecified update type
+   * 
+ * + * METADATA_UPDATE_ENUM_UNSPECIFIED = 0; + */ + public static final int METADATA_UPDATE_ENUM_UNSPECIFIED_VALUE = 0; + /** + *
+   * only update the fields that are provided
+   * 
+ * + * METADATA_UPDATE_ENUM_EXTEND = 1; + */ + public static final int METADATA_UPDATE_ENUM_EXTEND_VALUE = 1; + /** + *
+   * replace the entire metadata with the provided metadata
+   * 
+ * + * METADATA_UPDATE_ENUM_REPLACE = 2; + */ + public static final int METADATA_UPDATE_ENUM_REPLACE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetadataUpdateEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetadataUpdateEnum forNumber(int value) { + switch (value) { + case 0: return METADATA_UPDATE_ENUM_UNSPECIFIED; + case 1: return METADATA_UPDATE_ENUM_EXTEND; + case 2: return METADATA_UPDATE_ENUM_REPLACE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MetadataUpdateEnum> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetadataUpdateEnum findValueByNumber(int number) { + return MetadataUpdateEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.opentdf.platform.common.CommonProto.getDescriptor().getEnumTypes().get(0); + } + + private static final MetadataUpdateEnum[] VALUES = values(); + + public static MetadataUpdateEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetadataUpdateEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:common.MetadataUpdateEnum) +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kas/AccessServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/kas/AccessServiceGrpc.java new file mode 100644 index 00000000..a17f2676 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/AccessServiceGrpc.java @@ -0,0 +1,557 @@ +package io.opentdf.platform.kas; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Get app info from the root path
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.61.1)", + comments = "Source: kas/kas.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AccessServiceGrpc { + + private AccessServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "kas.AccessService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Info", + requestType = io.opentdf.platform.kas.InfoRequest.class, + responseType = io.opentdf.platform.kas.InfoResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getInfoMethod() { + io.grpc.MethodDescriptor getInfoMethod; + if ((getInfoMethod = AccessServiceGrpc.getInfoMethod) == null) { + synchronized (AccessServiceGrpc.class) { + if ((getInfoMethod = AccessServiceGrpc.getInfoMethod) == null) { + AccessServiceGrpc.getInfoMethod = getInfoMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Info")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kas.InfoRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kas.InfoResponse.getDefaultInstance())) + .setSchemaDescriptor(new AccessServiceMethodDescriptorSupplier("Info")) + .build(); + } + } + } + return getInfoMethod; + } + + private static volatile io.grpc.MethodDescriptor getPublicKeyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PublicKey", + requestType = io.opentdf.platform.kas.PublicKeyRequest.class, + responseType = io.opentdf.platform.kas.PublicKeyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPublicKeyMethod() { + io.grpc.MethodDescriptor getPublicKeyMethod; + if ((getPublicKeyMethod = AccessServiceGrpc.getPublicKeyMethod) == null) { + synchronized (AccessServiceGrpc.class) { + if ((getPublicKeyMethod = AccessServiceGrpc.getPublicKeyMethod) == null) { + AccessServiceGrpc.getPublicKeyMethod = getPublicKeyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PublicKey")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kas.PublicKeyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kas.PublicKeyResponse.getDefaultInstance())) + .setSchemaDescriptor(new AccessServiceMethodDescriptorSupplier("PublicKey")) + .build(); + } + } + } + return getPublicKeyMethod; + } + + private static volatile io.grpc.MethodDescriptor getLegacyPublicKeyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LegacyPublicKey", + requestType = io.opentdf.platform.kas.LegacyPublicKeyRequest.class, + responseType = com.google.protobuf.StringValue.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLegacyPublicKeyMethod() { + io.grpc.MethodDescriptor getLegacyPublicKeyMethod; + if ((getLegacyPublicKeyMethod = AccessServiceGrpc.getLegacyPublicKeyMethod) == null) { + synchronized (AccessServiceGrpc.class) { + if ((getLegacyPublicKeyMethod = AccessServiceGrpc.getLegacyPublicKeyMethod) == null) { + AccessServiceGrpc.getLegacyPublicKeyMethod = getLegacyPublicKeyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LegacyPublicKey")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kas.LegacyPublicKeyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.StringValue.getDefaultInstance())) + .setSchemaDescriptor(new AccessServiceMethodDescriptorSupplier("LegacyPublicKey")) + .build(); + } + } + } + return getLegacyPublicKeyMethod; + } + + private static volatile io.grpc.MethodDescriptor getRewrapMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Rewrap", + requestType = io.opentdf.platform.kas.RewrapRequest.class, + responseType = io.opentdf.platform.kas.RewrapResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRewrapMethod() { + io.grpc.MethodDescriptor getRewrapMethod; + if ((getRewrapMethod = AccessServiceGrpc.getRewrapMethod) == null) { + synchronized (AccessServiceGrpc.class) { + if ((getRewrapMethod = AccessServiceGrpc.getRewrapMethod) == null) { + AccessServiceGrpc.getRewrapMethod = getRewrapMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Rewrap")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kas.RewrapRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kas.RewrapResponse.getDefaultInstance())) + .setSchemaDescriptor(new AccessServiceMethodDescriptorSupplier("Rewrap")) + .build(); + } + } + } + return getRewrapMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static AccessServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AccessServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AccessServiceStub(channel, callOptions); + } + }; + return AccessServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AccessServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AccessServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AccessServiceBlockingStub(channel, callOptions); + } + }; + return AccessServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static AccessServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AccessServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AccessServiceFutureStub(channel, callOptions); + } + }; + return AccessServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * Get app info from the root path
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Get the current version of the service
+     * 
+ */ + default void info(io.opentdf.platform.kas.InfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getInfoMethod(), responseObserver); + } + + /** + */ + default void publicKey(io.opentdf.platform.kas.PublicKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPublicKeyMethod(), responseObserver); + } + + /** + *
+     * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
+     * 
+ */ + default void legacyPublicKey(io.opentdf.platform.kas.LegacyPublicKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLegacyPublicKeyMethod(), responseObserver); + } + + /** + */ + default void rewrap(io.opentdf.platform.kas.RewrapRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRewrapMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AccessService. + *
+   * Get app info from the root path
+   * 
+ */ + public static abstract class AccessServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return AccessServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AccessService. + *
+   * Get app info from the root path
+   * 
+ */ + public static final class AccessServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private AccessServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AccessServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AccessServiceStub(channel, callOptions); + } + + /** + *
+     * Get the current version of the service
+     * 
+ */ + public void info(io.opentdf.platform.kas.InfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getInfoMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void publicKey(io.opentdf.platform.kas.PublicKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPublicKeyMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
+     * 
+ */ + public void legacyPublicKey(io.opentdf.platform.kas.LegacyPublicKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLegacyPublicKeyMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void rewrap(io.opentdf.platform.kas.RewrapRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRewrapMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AccessService. + *
+   * Get app info from the root path
+   * 
+ */ + public static final class AccessServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AccessServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AccessServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AccessServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * Get the current version of the service
+     * 
+ */ + public io.opentdf.platform.kas.InfoResponse info(io.opentdf.platform.kas.InfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getInfoMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.kas.PublicKeyResponse publicKey(io.opentdf.platform.kas.PublicKeyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPublicKeyMethod(), getCallOptions(), request); + } + + /** + *
+     * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
+     * 
+ */ + public com.google.protobuf.StringValue legacyPublicKey(io.opentdf.platform.kas.LegacyPublicKeyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLegacyPublicKeyMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.kas.RewrapResponse rewrap(io.opentdf.platform.kas.RewrapRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRewrapMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AccessService. + *
+   * Get app info from the root path
+   * 
+ */ + public static final class AccessServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AccessServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AccessServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AccessServiceFutureStub(channel, callOptions); + } + + /** + *
+     * Get the current version of the service
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture info( + io.opentdf.platform.kas.InfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getInfoMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture publicKey( + io.opentdf.platform.kas.PublicKeyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPublicKeyMethod(), getCallOptions()), request); + } + + /** + *
+     * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture legacyPublicKey( + io.opentdf.platform.kas.LegacyPublicKeyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLegacyPublicKeyMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture rewrap( + io.opentdf.platform.kas.RewrapRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRewrapMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_INFO = 0; + private static final int METHODID_PUBLIC_KEY = 1; + private static final int METHODID_LEGACY_PUBLIC_KEY = 2; + private static final int METHODID_REWRAP = 3; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_INFO: + serviceImpl.info((io.opentdf.platform.kas.InfoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PUBLIC_KEY: + serviceImpl.publicKey((io.opentdf.platform.kas.PublicKeyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LEGACY_PUBLIC_KEY: + serviceImpl.legacyPublicKey((io.opentdf.platform.kas.LegacyPublicKeyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REWRAP: + serviceImpl.rewrap((io.opentdf.platform.kas.RewrapRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kas.InfoRequest, + io.opentdf.platform.kas.InfoResponse>( + service, METHODID_INFO))) + .addMethod( + getPublicKeyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kas.PublicKeyRequest, + io.opentdf.platform.kas.PublicKeyResponse>( + service, METHODID_PUBLIC_KEY))) + .addMethod( + getLegacyPublicKeyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kas.LegacyPublicKeyRequest, + com.google.protobuf.StringValue>( + service, METHODID_LEGACY_PUBLIC_KEY))) + .addMethod( + getRewrapMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kas.RewrapRequest, + io.opentdf.platform.kas.RewrapResponse>( + service, METHODID_REWRAP))) + .build(); + } + + private static abstract class AccessServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AccessServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.opentdf.platform.kas.KasProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AccessService"); + } + } + + private static final class AccessServiceFileDescriptorSupplier + extends AccessServiceBaseDescriptorSupplier { + AccessServiceFileDescriptorSupplier() {} + } + + private static final class AccessServiceMethodDescriptorSupplier + extends AccessServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AccessServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AccessServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AccessServiceFileDescriptorSupplier()) + .addMethod(getInfoMethod()) + .addMethod(getPublicKeyMethod()) + .addMethod(getLegacyPublicKeyMethod()) + .addMethod(getRewrapMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/InfoRequest.java b/protocol/src/main/java/io/opentdf/platform/kas/InfoRequest.java new file mode 100644 index 00000000..552c717e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/InfoRequest.java @@ -0,0 +1,407 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +/** + *
+ * Intentionally empty. May include features later.
+ * 
+ * + * Protobuf type {@code kas.InfoRequest} + */ +public final class InfoRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kas.InfoRequest) + InfoRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use InfoRequest.newBuilder() to construct. + private InfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.InfoRequest.class, io.opentdf.platform.kas.InfoRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kas.InfoRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kas.InfoRequest other = (io.opentdf.platform.kas.InfoRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kas.InfoRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kas.InfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kas.InfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.InfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kas.InfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Intentionally empty. May include features later.
+   * 
+ * + * Protobuf type {@code kas.InfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kas.InfoRequest) + io.opentdf.platform.kas.InfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.InfoRequest.class, io.opentdf.platform.kas.InfoRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kas.InfoRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kas.InfoRequest getDefaultInstanceForType() { + return io.opentdf.platform.kas.InfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kas.InfoRequest build() { + io.opentdf.platform.kas.InfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kas.InfoRequest buildPartial() { + io.opentdf.platform.kas.InfoRequest result = new io.opentdf.platform.kas.InfoRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kas.InfoRequest) { + return mergeFrom((io.opentdf.platform.kas.InfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kas.InfoRequest other) { + if (other == io.opentdf.platform.kas.InfoRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kas.InfoRequest) + } + + // @@protoc_insertion_point(class_scope:kas.InfoRequest) + private static final io.opentdf.platform.kas.InfoRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kas.InfoRequest(); + } + + public static io.opentdf.platform.kas.InfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kas.InfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kas/InfoRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/InfoRequestOrBuilder.java new file mode 100644 index 00000000..3481b3b6 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/InfoRequestOrBuilder.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +public interface InfoRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kas.InfoRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/InfoResponse.java b/protocol/src/main/java/io/opentdf/platform/kas/InfoResponse.java new file mode 100644 index 00000000..64c0c131 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/InfoResponse.java @@ -0,0 +1,550 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +/** + *
+ * Service application level metadata
+ * 
+ * + * Protobuf type {@code kas.InfoResponse} + */ +public final class InfoResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kas.InfoResponse) + InfoResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use InfoResponse.newBuilder() to construct. + private InfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoResponse() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.InfoResponse.class, io.opentdf.platform.kas.InfoResponse.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * string version = 1 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * string version = 1 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kas.InfoResponse)) { + return super.equals(obj); + } + io.opentdf.platform.kas.InfoResponse other = (io.opentdf.platform.kas.InfoResponse) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kas.InfoResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kas.InfoResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kas.InfoResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.InfoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kas.InfoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Service application level metadata
+   * 
+ * + * Protobuf type {@code kas.InfoResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kas.InfoResponse) + io.opentdf.platform.kas.InfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.InfoResponse.class, io.opentdf.platform.kas.InfoResponse.Builder.class); + } + + // Construct using io.opentdf.platform.kas.InfoResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kas.InfoResponse getDefaultInstanceForType() { + return io.opentdf.platform.kas.InfoResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kas.InfoResponse build() { + io.opentdf.platform.kas.InfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kas.InfoResponse buildPartial() { + io.opentdf.platform.kas.InfoResponse result = new io.opentdf.platform.kas.InfoResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kas.InfoResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kas.InfoResponse) { + return mergeFrom((io.opentdf.platform.kas.InfoResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kas.InfoResponse other) { + if (other == io.opentdf.platform.kas.InfoResponse.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object version_ = ""; + /** + * string version = 1 [json_name = "version"]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string version = 1 [json_name = "version"]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string version = 1 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string version = 1 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string version = 1 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kas.InfoResponse) + } + + // @@protoc_insertion_point(class_scope:kas.InfoResponse) + private static final io.opentdf.platform.kas.InfoResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kas.InfoResponse(); + } + + public static io.opentdf.platform.kas.InfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kas.InfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kas/InfoResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/InfoResponseOrBuilder.java new file mode 100644 index 00000000..bf9ade1a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/InfoResponseOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +public interface InfoResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:kas.InfoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * string version = 1 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + * string version = 1 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/KasProto.java b/protocol/src/main/java/io/opentdf/platform/kas/KasProto.java new file mode 100644 index 00000000..0ca13ac3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/KasProto.java @@ -0,0 +1,175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +public final class KasProto { + private KasProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kas_InfoRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kas_InfoRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kas_InfoResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kas_InfoResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kas_LegacyPublicKeyRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kas_LegacyPublicKeyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kas_PublicKeyRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kas_PublicKeyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kas_PublicKeyResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kas_PublicKeyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kas_RewrapRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kas_RewrapRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kas_RewrapResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kas_RewrapResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kas_RewrapResponse_MetadataEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kas_RewrapResponse_MetadataEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\rkas/kas.proto\022\003kas\032\034google/api/annotat" + + "ions.proto\032\034google/protobuf/struct.proto" + + "\032\036google/protobuf/wrappers.proto\032.protoc" + + "-gen-openapiv2/options/annotations.proto" + + "\"\r\n\013InfoRequest\"(\n\014InfoResponse\022\030\n\007versi" + + "on\030\001 \001(\tR\007version\"6\n\026LegacyPublicKeyRequ" + + "est\022\034\n\talgorithm\030\001 \001(\tR\talgorithm\"l\n\020Pub" + + "licKeyRequest\022\034\n\talgorithm\030\001 \001(\tR\talgori" + + "thm\022\036\n\003fmt\030\002 \001(\tB\014\222A\t2\007versionR\003fmt\022\032\n\001v" + + "\030\003 \001(\tB\014\222A\t2\007versionR\001v\"2\n\021PublicKeyResp" + + "onse\022\035\n\npublic_key\030\001 \001(\tR\tpublicKey\"Y\n\rR" + + "ewrapRequest\0220\n\024signed_request_token\030\001 \001" + + "(\tR\022signedRequestToken\022\026\n\006bearer\030\002 \001(\tR\006" + + "bearer\"\247\002\n\016RewrapResponse\022=\n\010metadata\030\001 " + + "\003(\0132!.kas.RewrapResponse.MetadataEntryR\010" + + "metadata\022,\n\022entity_wrapped_key\030\002 \001(\014R\020en" + + "tityWrappedKey\022,\n\022session_public_key\030\003 \001" + + "(\tR\020sessionPublicKey\022%\n\016schema_version\030\004" + + " \001(\tR\rschemaVersion\032S\n\rMetadataEntry\022\020\n\003" + + "key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.p" + + "rotobuf.ValueR\005value:\0028\0012\217\003\n\rAccessServi" + + "ce\022E\n\004Info\022\020.kas.InfoRequest\032\021.kas.InfoR" + + "esponse\"\030\222A\tJ\007\n\003200\022\000\202\323\344\223\002\006\022\004/kas\022f\n\tPub" + + "licKey\022\025.kas.PublicKeyRequest\032\026.kas.Publ" + + "icKeyResponse\"*\222A\tJ\007\n\003200\022\000\202\323\344\223\002\030\022\026/kas/" + + "v2/kas_public_key\022u\n\017LegacyPublicKey\022\033.k" + + "as.LegacyPublicKeyRequest\032\034.google.proto" + + "buf.StringValue\"\'\222A\tJ\007\n\003200\022\000\202\323\344\223\002\025\022\023/ka" + + "s/kas_public_key\022X\n\006Rewrap\022\022.kas.RewrapR" + + "equest\032\023.kas.RewrapResponse\"%\222A\tJ\007\n\003200\022" + + "\000\202\323\344\223\002\023\"\016/kas/v2/rewrap:\001*B\305\001\n\027io.opentd" + + "f.platform.kasB\010KasProtoP\001\242\002\003KXX\252\002\003Kas\312\002" + + "\003Kas\342\002\017Kas\\GPBMetadata\352\002\003Kas\222As\022q\n\032OpenT" + + "DF Key Access Service*L\n\022BSD 3-Clause Cl" + + "ear\0226https://github.com/opentdf/backend/" + + "blob/master/LICENSE2\0051.5.0b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(), + }); + internal_static_kas_InfoRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_kas_InfoRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kas_InfoRequest_descriptor, + new java.lang.String[] { }); + internal_static_kas_InfoResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_kas_InfoResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kas_InfoResponse_descriptor, + new java.lang.String[] { "Version", }); + internal_static_kas_LegacyPublicKeyRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_kas_LegacyPublicKeyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kas_LegacyPublicKeyRequest_descriptor, + new java.lang.String[] { "Algorithm", }); + internal_static_kas_PublicKeyRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_kas_PublicKeyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kas_PublicKeyRequest_descriptor, + new java.lang.String[] { "Algorithm", "Fmt", "V", }); + internal_static_kas_PublicKeyResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_kas_PublicKeyResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kas_PublicKeyResponse_descriptor, + new java.lang.String[] { "PublicKey", }); + internal_static_kas_RewrapRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_kas_RewrapRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kas_RewrapRequest_descriptor, + new java.lang.String[] { "SignedRequestToken", "Bearer", }); + internal_static_kas_RewrapResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_kas_RewrapResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kas_RewrapResponse_descriptor, + new java.lang.String[] { "Metadata", "EntityWrappedKey", "SessionPublicKey", "SchemaVersion", }); + internal_static_kas_RewrapResponse_MetadataEntry_descriptor = + internal_static_kas_RewrapResponse_descriptor.getNestedTypes().get(0); + internal_static_kas_RewrapResponse_MetadataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kas_RewrapResponse_MetadataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Field); + registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation); + registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequest.java b/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequest.java new file mode 100644 index 00000000..e9dc9d3e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +/** + * Protobuf type {@code kas.LegacyPublicKeyRequest} + */ +public final class LegacyPublicKeyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kas.LegacyPublicKeyRequest) + LegacyPublicKeyRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use LegacyPublicKeyRequest.newBuilder() to construct. + private LegacyPublicKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LegacyPublicKeyRequest() { + algorithm_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LegacyPublicKeyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.LegacyPublicKeyRequest.class, io.opentdf.platform.kas.LegacyPublicKeyRequest.Builder.class); + } + + public static final int ALGORITHM_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object algorithm_ = ""; + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The algorithm. + */ + @java.lang.Override + public java.lang.String getAlgorithm() { + java.lang.Object ref = algorithm_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + algorithm_ = s; + return s; + } + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The bytes for algorithm. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAlgorithmBytes() { + java.lang.Object ref = algorithm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + algorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, algorithm_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, algorithm_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kas.LegacyPublicKeyRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kas.LegacyPublicKeyRequest other = (io.opentdf.platform.kas.LegacyPublicKeyRequest) obj; + + if (!getAlgorithm() + .equals(other.getAlgorithm())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + getAlgorithm().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kas.LegacyPublicKeyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kas.LegacyPublicKeyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kas.LegacyPublicKeyRequest) + io.opentdf.platform.kas.LegacyPublicKeyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.LegacyPublicKeyRequest.class, io.opentdf.platform.kas.LegacyPublicKeyRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kas.LegacyPublicKeyRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + algorithm_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kas.LegacyPublicKeyRequest getDefaultInstanceForType() { + return io.opentdf.platform.kas.LegacyPublicKeyRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kas.LegacyPublicKeyRequest build() { + io.opentdf.platform.kas.LegacyPublicKeyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kas.LegacyPublicKeyRequest buildPartial() { + io.opentdf.platform.kas.LegacyPublicKeyRequest result = new io.opentdf.platform.kas.LegacyPublicKeyRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kas.LegacyPublicKeyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.algorithm_ = algorithm_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kas.LegacyPublicKeyRequest) { + return mergeFrom((io.opentdf.platform.kas.LegacyPublicKeyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kas.LegacyPublicKeyRequest other) { + if (other == io.opentdf.platform.kas.LegacyPublicKeyRequest.getDefaultInstance()) return this; + if (!other.getAlgorithm().isEmpty()) { + algorithm_ = other.algorithm_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + algorithm_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object algorithm_ = ""; + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The algorithm. + */ + public java.lang.String getAlgorithm() { + java.lang.Object ref = algorithm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + algorithm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The bytes for algorithm. + */ + public com.google.protobuf.ByteString + getAlgorithmBytes() { + java.lang.Object ref = algorithm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + algorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @param value The algorithm to set. + * @return This builder for chaining. + */ + public Builder setAlgorithm( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + algorithm_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return This builder for chaining. + */ + public Builder clearAlgorithm() { + algorithm_ = getDefaultInstance().getAlgorithm(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @param value The bytes for algorithm to set. + * @return This builder for chaining. + */ + public Builder setAlgorithmBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + algorithm_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kas.LegacyPublicKeyRequest) + } + + // @@protoc_insertion_point(class_scope:kas.LegacyPublicKeyRequest) + private static final io.opentdf.platform.kas.LegacyPublicKeyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kas.LegacyPublicKeyRequest(); + } + + public static io.opentdf.platform.kas.LegacyPublicKeyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LegacyPublicKeyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kas.LegacyPublicKeyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequestOrBuilder.java new file mode 100644 index 00000000..09be01fa --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +public interface LegacyPublicKeyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kas.LegacyPublicKeyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The algorithm. + */ + java.lang.String getAlgorithm(); + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The bytes for algorithm. + */ + com.google.protobuf.ByteString + getAlgorithmBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequest.java b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequest.java new file mode 100644 index 00000000..892bf709 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequest.java @@ -0,0 +1,814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +/** + * Protobuf type {@code kas.PublicKeyRequest} + */ +public final class PublicKeyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kas.PublicKeyRequest) + PublicKeyRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use PublicKeyRequest.newBuilder() to construct. + private PublicKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublicKeyRequest() { + algorithm_ = ""; + fmt_ = ""; + v_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublicKeyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.PublicKeyRequest.class, io.opentdf.platform.kas.PublicKeyRequest.Builder.class); + } + + public static final int ALGORITHM_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object algorithm_ = ""; + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The algorithm. + */ + @java.lang.Override + public java.lang.String getAlgorithm() { + java.lang.Object ref = algorithm_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + algorithm_ = s; + return s; + } + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The bytes for algorithm. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAlgorithmBytes() { + java.lang.Object ref = algorithm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + algorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FMT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object fmt_ = ""; + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The fmt. + */ + @java.lang.Override + public java.lang.String getFmt() { + java.lang.Object ref = fmt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fmt_ = s; + return s; + } + } + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The bytes for fmt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFmtBytes() { + java.lang.Object ref = fmt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fmt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int V_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object v_ = ""; + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The v. + */ + @java.lang.Override + public java.lang.String getV() { + java.lang.Object ref = v_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v_ = s; + return s; + } + } + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The bytes for v. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVBytes() { + java.lang.Object ref = v_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, algorithm_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fmt_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fmt_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, v_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, algorithm_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fmt_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fmt_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, v_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kas.PublicKeyRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kas.PublicKeyRequest other = (io.opentdf.platform.kas.PublicKeyRequest) obj; + + if (!getAlgorithm() + .equals(other.getAlgorithm())) return false; + if (!getFmt() + .equals(other.getFmt())) return false; + if (!getV() + .equals(other.getV())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + getAlgorithm().hashCode(); + hash = (37 * hash) + FMT_FIELD_NUMBER; + hash = (53 * hash) + getFmt().hashCode(); + hash = (37 * hash) + V_FIELD_NUMBER; + hash = (53 * hash) + getV().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kas.PublicKeyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kas.PublicKeyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kas.PublicKeyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kas.PublicKeyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kas.PublicKeyRequest) + io.opentdf.platform.kas.PublicKeyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.PublicKeyRequest.class, io.opentdf.platform.kas.PublicKeyRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kas.PublicKeyRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + algorithm_ = ""; + fmt_ = ""; + v_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kas.PublicKeyRequest getDefaultInstanceForType() { + return io.opentdf.platform.kas.PublicKeyRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kas.PublicKeyRequest build() { + io.opentdf.platform.kas.PublicKeyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kas.PublicKeyRequest buildPartial() { + io.opentdf.platform.kas.PublicKeyRequest result = new io.opentdf.platform.kas.PublicKeyRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kas.PublicKeyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.algorithm_ = algorithm_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fmt_ = fmt_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.v_ = v_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kas.PublicKeyRequest) { + return mergeFrom((io.opentdf.platform.kas.PublicKeyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kas.PublicKeyRequest other) { + if (other == io.opentdf.platform.kas.PublicKeyRequest.getDefaultInstance()) return this; + if (!other.getAlgorithm().isEmpty()) { + algorithm_ = other.algorithm_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFmt().isEmpty()) { + fmt_ = other.fmt_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getV().isEmpty()) { + v_ = other.v_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + algorithm_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + fmt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + v_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object algorithm_ = ""; + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The algorithm. + */ + public java.lang.String getAlgorithm() { + java.lang.Object ref = algorithm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + algorithm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The bytes for algorithm. + */ + public com.google.protobuf.ByteString + getAlgorithmBytes() { + java.lang.Object ref = algorithm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + algorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @param value The algorithm to set. + * @return This builder for chaining. + */ + public Builder setAlgorithm( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + algorithm_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return This builder for chaining. + */ + public Builder clearAlgorithm() { + algorithm_ = getDefaultInstance().getAlgorithm(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @param value The bytes for algorithm to set. + * @return This builder for chaining. + */ + public Builder setAlgorithmBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + algorithm_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object fmt_ = ""; + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The fmt. + */ + public java.lang.String getFmt() { + java.lang.Object ref = fmt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fmt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The bytes for fmt. + */ + public com.google.protobuf.ByteString + getFmtBytes() { + java.lang.Object ref = fmt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fmt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @param value The fmt to set. + * @return This builder for chaining. + */ + public Builder setFmt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fmt_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return This builder for chaining. + */ + public Builder clearFmt() { + fmt_ = getDefaultInstance().getFmt(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @param value The bytes for fmt to set. + * @return This builder for chaining. + */ + public Builder setFmtBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fmt_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object v_ = ""; + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The v. + */ + public java.lang.String getV() { + java.lang.Object ref = v_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + v_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The bytes for v. + */ + public com.google.protobuf.ByteString + getVBytes() { + java.lang.Object ref = v_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + v_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @param value The v to set. + * @return This builder for chaining. + */ + public Builder setV( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + v_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return This builder for chaining. + */ + public Builder clearV() { + v_ = getDefaultInstance().getV(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @param value The bytes for v to set. + * @return This builder for chaining. + */ + public Builder setVBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + v_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kas.PublicKeyRequest) + } + + // @@protoc_insertion_point(class_scope:kas.PublicKeyRequest) + private static final io.opentdf.platform.kas.PublicKeyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kas.PublicKeyRequest(); + } + + public static io.opentdf.platform.kas.PublicKeyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublicKeyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kas.PublicKeyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequestOrBuilder.java new file mode 100644 index 00000000..ec1c94fd --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequestOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +public interface PublicKeyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kas.PublicKeyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The algorithm. + */ + java.lang.String getAlgorithm(); + /** + * string algorithm = 1 [json_name = "algorithm"]; + * @return The bytes for algorithm. + */ + com.google.protobuf.ByteString + getAlgorithmBytes(); + + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The fmt. + */ + java.lang.String getFmt(); + /** + * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The bytes for fmt. + */ + com.google.protobuf.ByteString + getFmtBytes(); + + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The v. + */ + java.lang.String getV(); + /** + * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } + * @return The bytes for v. + */ + com.google.protobuf.ByteString + getVBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponse.java b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponse.java new file mode 100644 index 00000000..92d4aefc --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponse.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +/** + * Protobuf type {@code kas.PublicKeyResponse} + */ +public final class PublicKeyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kas.PublicKeyResponse) + PublicKeyResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use PublicKeyResponse.newBuilder() to construct. + private PublicKeyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublicKeyResponse() { + publicKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublicKeyResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.PublicKeyResponse.class, io.opentdf.platform.kas.PublicKeyResponse.Builder.class); + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object publicKey_ = ""; + /** + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kas.PublicKeyResponse)) { + return super.equals(obj); + } + io.opentdf.platform.kas.PublicKeyResponse other = (io.opentdf.platform.kas.PublicKeyResponse) obj; + + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kas.PublicKeyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kas.PublicKeyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kas.PublicKeyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kas.PublicKeyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kas.PublicKeyResponse) + io.opentdf.platform.kas.PublicKeyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.PublicKeyResponse.class, io.opentdf.platform.kas.PublicKeyResponse.Builder.class); + } + + // Construct using io.opentdf.platform.kas.PublicKeyResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + publicKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kas.PublicKeyResponse getDefaultInstanceForType() { + return io.opentdf.platform.kas.PublicKeyResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kas.PublicKeyResponse build() { + io.opentdf.platform.kas.PublicKeyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kas.PublicKeyResponse buildPartial() { + io.opentdf.platform.kas.PublicKeyResponse result = new io.opentdf.platform.kas.PublicKeyResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kas.PublicKeyResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.publicKey_ = publicKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kas.PublicKeyResponse) { + return mergeFrom((io.opentdf.platform.kas.PublicKeyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kas.PublicKeyResponse other) { + if (other == io.opentdf.platform.kas.PublicKeyResponse.getDefaultInstance()) return this; + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + publicKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object publicKey_ = ""; + /** + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string public_key = 1 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + publicKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string public_key = 1 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + publicKey_ = getDefaultInstance().getPublicKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string public_key = 1 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + publicKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kas.PublicKeyResponse) + } + + // @@protoc_insertion_point(class_scope:kas.PublicKeyResponse) + private static final io.opentdf.platform.kas.PublicKeyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kas.PublicKeyResponse(); + } + + public static io.opentdf.platform.kas.PublicKeyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublicKeyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kas.PublicKeyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponseOrBuilder.java new file mode 100644 index 00000000..cde3047a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponseOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +public interface PublicKeyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:kas.PublicKeyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequest.java b/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequest.java new file mode 100644 index 00000000..b5782e60 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequest.java @@ -0,0 +1,678 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +/** + * Protobuf type {@code kas.RewrapRequest} + */ +public final class RewrapRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kas.RewrapRequest) + RewrapRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RewrapRequest.newBuilder() to construct. + private RewrapRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RewrapRequest() { + signedRequestToken_ = ""; + bearer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RewrapRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.RewrapRequest.class, io.opentdf.platform.kas.RewrapRequest.Builder.class); + } + + public static final int SIGNED_REQUEST_TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object signedRequestToken_ = ""; + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @return The signedRequestToken. + */ + @java.lang.Override + public java.lang.String getSignedRequestToken() { + java.lang.Object ref = signedRequestToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedRequestToken_ = s; + return s; + } + } + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @return The bytes for signedRequestToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignedRequestTokenBytes() { + java.lang.Object ref = signedRequestToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedRequestToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BEARER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object bearer_ = ""; + /** + * string bearer = 2 [json_name = "bearer"]; + * @return The bearer. + */ + @java.lang.Override + public java.lang.String getBearer() { + java.lang.Object ref = bearer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bearer_ = s; + return s; + } + } + /** + * string bearer = 2 [json_name = "bearer"]; + * @return The bytes for bearer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBearerBytes() { + java.lang.Object ref = bearer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bearer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRequestToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signedRequestToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bearer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bearer_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRequestToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signedRequestToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bearer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bearer_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kas.RewrapRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kas.RewrapRequest other = (io.opentdf.platform.kas.RewrapRequest) obj; + + if (!getSignedRequestToken() + .equals(other.getSignedRequestToken())) return false; + if (!getBearer() + .equals(other.getBearer())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNED_REQUEST_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getSignedRequestToken().hashCode(); + hash = (37 * hash) + BEARER_FIELD_NUMBER; + hash = (53 * hash) + getBearer().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kas.RewrapRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kas.RewrapRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kas.RewrapRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.RewrapRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kas.RewrapRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kas.RewrapRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kas.RewrapRequest) + io.opentdf.platform.kas.RewrapRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.RewrapRequest.class, io.opentdf.platform.kas.RewrapRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kas.RewrapRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signedRequestToken_ = ""; + bearer_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kas.RewrapRequest getDefaultInstanceForType() { + return io.opentdf.platform.kas.RewrapRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kas.RewrapRequest build() { + io.opentdf.platform.kas.RewrapRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kas.RewrapRequest buildPartial() { + io.opentdf.platform.kas.RewrapRequest result = new io.opentdf.platform.kas.RewrapRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kas.RewrapRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signedRequestToken_ = signedRequestToken_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bearer_ = bearer_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kas.RewrapRequest) { + return mergeFrom((io.opentdf.platform.kas.RewrapRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kas.RewrapRequest other) { + if (other == io.opentdf.platform.kas.RewrapRequest.getDefaultInstance()) return this; + if (!other.getSignedRequestToken().isEmpty()) { + signedRequestToken_ = other.signedRequestToken_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBearer().isEmpty()) { + bearer_ = other.bearer_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + signedRequestToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + bearer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object signedRequestToken_ = ""; + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @return The signedRequestToken. + */ + public java.lang.String getSignedRequestToken() { + java.lang.Object ref = signedRequestToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedRequestToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @return The bytes for signedRequestToken. + */ + public com.google.protobuf.ByteString + getSignedRequestTokenBytes() { + java.lang.Object ref = signedRequestToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedRequestToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @param value The signedRequestToken to set. + * @return This builder for chaining. + */ + public Builder setSignedRequestToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + signedRequestToken_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @return This builder for chaining. + */ + public Builder clearSignedRequestToken() { + signedRequestToken_ = getDefaultInstance().getSignedRequestToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @param value The bytes for signedRequestToken to set. + * @return This builder for chaining. + */ + public Builder setSignedRequestTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + signedRequestToken_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object bearer_ = ""; + /** + * string bearer = 2 [json_name = "bearer"]; + * @return The bearer. + */ + public java.lang.String getBearer() { + java.lang.Object ref = bearer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bearer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string bearer = 2 [json_name = "bearer"]; + * @return The bytes for bearer. + */ + public com.google.protobuf.ByteString + getBearerBytes() { + java.lang.Object ref = bearer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bearer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string bearer = 2 [json_name = "bearer"]; + * @param value The bearer to set. + * @return This builder for chaining. + */ + public Builder setBearer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + bearer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string bearer = 2 [json_name = "bearer"]; + * @return This builder for chaining. + */ + public Builder clearBearer() { + bearer_ = getDefaultInstance().getBearer(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string bearer = 2 [json_name = "bearer"]; + * @param value The bytes for bearer to set. + * @return This builder for chaining. + */ + public Builder setBearerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + bearer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kas.RewrapRequest) + } + + // @@protoc_insertion_point(class_scope:kas.RewrapRequest) + private static final io.opentdf.platform.kas.RewrapRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kas.RewrapRequest(); + } + + public static io.opentdf.platform.kas.RewrapRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RewrapRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kas.RewrapRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequestOrBuilder.java new file mode 100644 index 00000000..72c4fb87 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequestOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +public interface RewrapRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kas.RewrapRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @return The signedRequestToken. + */ + java.lang.String getSignedRequestToken(); + /** + * string signed_request_token = 1 [json_name = "signedRequestToken"]; + * @return The bytes for signedRequestToken. + */ + com.google.protobuf.ByteString + getSignedRequestTokenBytes(); + + /** + * string bearer = 2 [json_name = "bearer"]; + * @return The bearer. + */ + java.lang.String getBearer(); + /** + * string bearer = 2 [json_name = "bearer"]; + * @return The bytes for bearer. + */ + com.google.protobuf.ByteString + getBearerBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponse.java b/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponse.java new file mode 100644 index 00000000..47caeae3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponse.java @@ -0,0 +1,1051 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +/** + * Protobuf type {@code kas.RewrapResponse} + */ +public final class RewrapResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kas.RewrapResponse) + RewrapResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use RewrapResponse.newBuilder() to construct. + private RewrapResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RewrapResponse() { + entityWrappedKey_ = com.google.protobuf.ByteString.EMPTY; + sessionPublicKey_ = ""; + schemaVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RewrapResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.RewrapResponse.class, io.opentdf.platform.kas.RewrapResponse.Builder.class); + } + + public static final int METADATA_FIELD_NUMBER = 1; + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getMetadataOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + @java.lang.Override + public com.google.protobuf.Value getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENTITY_WRAPPED_KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString entityWrappedKey_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; + * @return The entityWrappedKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityWrappedKey() { + return entityWrappedKey_; + } + + public static final int SESSION_PUBLIC_KEY_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object sessionPublicKey_ = ""; + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @return The sessionPublicKey. + */ + @java.lang.Override + public java.lang.String getSessionPublicKey() { + java.lang.Object ref = sessionPublicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionPublicKey_ = s; + return s; + } + } + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @return The bytes for sessionPublicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSessionPublicKeyBytes() { + java.lang.Object ref = sessionPublicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionPublicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_VERSION_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object schemaVersion_ = ""; + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @return The schemaVersion. + */ + @java.lang.Override + public java.lang.String getSchemaVersion() { + java.lang.Object ref = schemaVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaVersion_ = s; + return s; + } + } + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @return The bytes for schemaVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemaVersionBytes() { + java.lang.Object ref = schemaVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetMetadata(), + MetadataDefaultEntryHolder.defaultEntry, + 1); + if (!entityWrappedKey_.isEmpty()) { + output.writeBytes(2, entityWrappedKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionPublicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sessionPublicKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, schemaVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry + metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metadata__); + } + if (!entityWrappedKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, entityWrappedKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionPublicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sessionPublicKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, schemaVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kas.RewrapResponse)) { + return super.equals(obj); + } + io.opentdf.platform.kas.RewrapResponse other = (io.opentdf.platform.kas.RewrapResponse) obj; + + if (!internalGetMetadata().equals( + other.internalGetMetadata())) return false; + if (!getEntityWrappedKey() + .equals(other.getEntityWrappedKey())) return false; + if (!getSessionPublicKey() + .equals(other.getSessionPublicKey())) return false; + if (!getSchemaVersion() + .equals(other.getSchemaVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + hash = (37 * hash) + ENTITY_WRAPPED_KEY_FIELD_NUMBER; + hash = (53 * hash) + getEntityWrappedKey().hashCode(); + hash = (37 * hash) + SESSION_PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getSessionPublicKey().hashCode(); + hash = (37 * hash) + SCHEMA_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getSchemaVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kas.RewrapResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kas.RewrapResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kas.RewrapResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kas.RewrapResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kas.RewrapResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kas.RewrapResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kas.RewrapResponse) + io.opentdf.platform.kas.RewrapResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kas.RewrapResponse.class, io.opentdf.platform.kas.RewrapResponse.Builder.class); + } + + // Construct using io.opentdf.platform.kas.RewrapResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableMetadata().clear(); + entityWrappedKey_ = com.google.protobuf.ByteString.EMPTY; + sessionPublicKey_ = ""; + schemaVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kas.RewrapResponse getDefaultInstanceForType() { + return io.opentdf.platform.kas.RewrapResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kas.RewrapResponse build() { + io.opentdf.platform.kas.RewrapResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kas.RewrapResponse buildPartial() { + io.opentdf.platform.kas.RewrapResponse result = new io.opentdf.platform.kas.RewrapResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kas.RewrapResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metadata_ = internalGetMetadata().build(MetadataDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.entityWrappedKey_ = entityWrappedKey_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sessionPublicKey_ = sessionPublicKey_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.schemaVersion_ = schemaVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kas.RewrapResponse) { + return mergeFrom((io.opentdf.platform.kas.RewrapResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kas.RewrapResponse other) { + if (other == io.opentdf.platform.kas.RewrapResponse.getDefaultInstance()) return this; + internalGetMutableMetadata().mergeFrom( + other.internalGetMetadata()); + bitField0_ |= 0x00000001; + if (other.getEntityWrappedKey() != com.google.protobuf.ByteString.EMPTY) { + setEntityWrappedKey(other.getEntityWrappedKey()); + } + if (!other.getSessionPublicKey().isEmpty()) { + sessionPublicKey_ = other.sessionPublicKey_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getSchemaVersion().isEmpty()) { + schemaVersion_ = other.schemaVersion_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + metadata__ = input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMetadata().ensureBuilderMap().put( + metadata__.getKey(), metadata__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + entityWrappedKey_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + sessionPublicKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + schemaVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private static final class MetadataConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return MetadataDefaultEntryHolder.defaultEntry; + } + }; + private static final MetadataConverter metadataConverter = new MetadataConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> metadata_; + private com.google.protobuf.MapFieldBuilder + internalGetMetadata() { + if (metadata_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(metadataConverter); + } + return metadata_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableMetadata() { + if (metadata_ == null) { + metadata_ = new com.google.protobuf.MapFieldBuilder<>(metadataConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return metadata_; + } + public int getMetadataCount() { + return internalGetMetadata().ensureBuilderMap().size(); + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getImmutableMap(); + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getMetadataOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableMetadata().ensureBuilderMap(); + return map.containsKey(key) ? metadataConverter.build(map.get(key)) : defaultValue; + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + @java.lang.Override + public com.google.protobuf.Value getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableMetadata().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return metadataConverter.build(map.get(key)); + } + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableMetadata().clear(); + return this; + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + public Builder removeMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMetadata().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMetadata() { + bitField0_ |= 0x00000001; + return internalGetMutableMetadata().ensureMessageMap(); + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + public Builder putMetadata( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableMetadata().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + public Builder putAllMetadata( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableMetadata().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + public com.google.protobuf.Value.Builder putMetadataBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableMetadata().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + private com.google.protobuf.ByteString entityWrappedKey_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; + * @return The entityWrappedKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityWrappedKey() { + return entityWrappedKey_; + } + /** + * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; + * @param value The entityWrappedKey to set. + * @return This builder for chaining. + */ + public Builder setEntityWrappedKey(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + entityWrappedKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; + * @return This builder for chaining. + */ + public Builder clearEntityWrappedKey() { + bitField0_ = (bitField0_ & ~0x00000002); + entityWrappedKey_ = getDefaultInstance().getEntityWrappedKey(); + onChanged(); + return this; + } + + private java.lang.Object sessionPublicKey_ = ""; + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @return The sessionPublicKey. + */ + public java.lang.String getSessionPublicKey() { + java.lang.Object ref = sessionPublicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionPublicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @return The bytes for sessionPublicKey. + */ + public com.google.protobuf.ByteString + getSessionPublicKeyBytes() { + java.lang.Object ref = sessionPublicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionPublicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @param value The sessionPublicKey to set. + * @return This builder for chaining. + */ + public Builder setSessionPublicKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sessionPublicKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @return This builder for chaining. + */ + public Builder clearSessionPublicKey() { + sessionPublicKey_ = getDefaultInstance().getSessionPublicKey(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @param value The bytes for sessionPublicKey to set. + * @return This builder for chaining. + */ + public Builder setSessionPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sessionPublicKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object schemaVersion_ = ""; + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @return The schemaVersion. + */ + public java.lang.String getSchemaVersion() { + java.lang.Object ref = schemaVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @return The bytes for schemaVersion. + */ + public com.google.protobuf.ByteString + getSchemaVersionBytes() { + java.lang.Object ref = schemaVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @param value The schemaVersion to set. + * @return This builder for chaining. + */ + public Builder setSchemaVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schemaVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @return This builder for chaining. + */ + public Builder clearSchemaVersion() { + schemaVersion_ = getDefaultInstance().getSchemaVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @param value The bytes for schemaVersion to set. + * @return This builder for chaining. + */ + public Builder setSchemaVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schemaVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kas.RewrapResponse) + } + + // @@protoc_insertion_point(class_scope:kas.RewrapResponse) + private static final io.opentdf.platform.kas.RewrapResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kas.RewrapResponse(); + } + + public static io.opentdf.platform.kas.RewrapResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RewrapResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kas.RewrapResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponseOrBuilder.java new file mode 100644 index 00000000..cc98d8b8 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponseOrBuilder.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kas/kas.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kas; + +public interface RewrapResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:kas.RewrapResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + int getMetadataCount(); + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + boolean containsMetadata( + java.lang.String key); + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMetadata(); + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + java.util.Map + getMetadataMap(); + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + /* nullable */ +com.google.protobuf.Value getMetadataOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; + */ + com.google.protobuf.Value getMetadataOrThrow( + java.lang.String key); + + /** + * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; + * @return The entityWrappedKey. + */ + com.google.protobuf.ByteString getEntityWrappedKey(); + + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @return The sessionPublicKey. + */ + java.lang.String getSessionPublicKey(); + /** + * string session_public_key = 3 [json_name = "sessionPublicKey"]; + * @return The bytes for sessionPublicKey. + */ + com.google.protobuf.ByteString + getSessionPublicKeyBytes(); + + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @return The schemaVersion. + */ + java.lang.String getSchemaVersion(); + /** + * string schema_version = 4 [json_name = "schemaVersion"]; + * @return The bytes for schemaVersion. + */ + com.google.protobuf.ByteString + getSchemaVersionBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequest.java new file mode 100644 index 00000000..f82c08b4 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequest.java @@ -0,0 +1,996 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.CreateKeyAccessServerRequest} + */ +public final class CreateKeyAccessServerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.CreateKeyAccessServerRequest) + CreateKeyAccessServerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateKeyAccessServerRequest.newBuilder() to construct. + private CreateKeyAccessServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateKeyAccessServerRequest() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateKeyAccessServerRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.Builder.class); + } + + private int bitField0_; + public static final int URI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + *
+   * Required
+   * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 2; + private io.opentdf.platform.kasregistry.PublicKey publicKey_; + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return Whether the publicKey field is set. + */ + @java.lang.Override + public boolean hasPublicKey() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return The publicKey. + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPublicKey()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPublicKey()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest other = (io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (hasPublicKey() != other.hasPublicKey()) return false; + if (hasPublicKey()) { + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (hasPublicKey()) { + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.CreateKeyAccessServerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.CreateKeyAccessServerRequest) + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPublicKeyFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + publicKey_ = null; + if (publicKeyBuilder_ != null) { + publicKeyBuilder_.dispose(); + publicKeyBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest build() { + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest buildPartial() { + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest result = new io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.publicKey_ = publicKeyBuilder_ == null + ? publicKey_ + : publicKeyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest) { + return mergeFrom((io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest other) { + if (other == io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPublicKey()) { + mergePublicKey(other.getPublicKey()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPublicKeyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + *
+     * Required
+     * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.kasregistry.PublicKey publicKey_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> publicKeyBuilder_; + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return Whether the publicKey field is set. + */ + public boolean hasPublicKey() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return The publicKey. + */ + public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { + if (publicKeyBuilder_ == null) { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } else { + return publicKeyBuilder_.getMessage(); + } + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public Builder setPublicKey(io.opentdf.platform.kasregistry.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicKey_ = value; + } else { + publicKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public Builder setPublicKey( + io.opentdf.platform.kasregistry.PublicKey.Builder builderForValue) { + if (publicKeyBuilder_ == null) { + publicKey_ = builderForValue.build(); + } else { + publicKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public Builder mergePublicKey(io.opentdf.platform.kasregistry.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + publicKey_ != null && + publicKey_ != io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance()) { + getPublicKeyBuilder().mergeFrom(value); + } else { + publicKey_ = value; + } + } else { + publicKeyBuilder_.mergeFrom(value); + } + if (publicKey_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public Builder clearPublicKey() { + bitField0_ = (bitField0_ & ~0x00000002); + publicKey_ = null; + if (publicKeyBuilder_ != null) { + publicKeyBuilder_.dispose(); + publicKeyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.kasregistry.PublicKey.Builder getPublicKeyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPublicKeyFieldBuilder().getBuilder(); + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { + if (publicKeyBuilder_ != null) { + return publicKeyBuilder_.getMessageOrBuilder(); + } else { + return publicKey_ == null ? + io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + } + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> + getPublicKeyFieldBuilder() { + if (publicKeyBuilder_ == null) { + publicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder>( + getPublicKey(), + getParentForChildren(), + isClean()); + publicKey_ = null; + } + return publicKeyBuilder_; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.CreateKeyAccessServerRequest) + } + + // @@protoc_insertion_point(class_scope:kasregistry.CreateKeyAccessServerRequest) + private static final io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest(); + } + + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateKeyAccessServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequestOrBuilder.java new file mode 100644 index 00000000..77a6b081 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface CreateKeyAccessServerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.CreateKeyAccessServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Required
+   * 
+ * + * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return Whether the publicKey field is set. + */ + boolean hasPublicKey(); + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return The publicKey. + */ + io.opentdf.platform.kasregistry.PublicKey getPublicKey(); + /** + * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder(); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponse.java new file mode 100644 index 00000000..bffb9030 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.CreateKeyAccessServerResponse} + */ +public final class CreateKeyAccessServerResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.CreateKeyAccessServerResponse) + CreateKeyAccessServerResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateKeyAccessServerResponse.newBuilder() to construct. + private CreateKeyAccessServerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateKeyAccessServerResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateKeyAccessServerResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.Builder.class); + } + + private int bitField0_; + public static final int KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + @java.lang.Override + public boolean hasKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse other = (io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse) obj; + + if (hasKeyAccessServer() != other.hasKeyAccessServer()) return false; + if (hasKeyAccessServer()) { + if (!getKeyAccessServer() + .equals(other.getKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeyAccessServer()) { + hash = (37 * hash) + KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.CreateKeyAccessServerResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.CreateKeyAccessServerResponse) + io.opentdf.platform.kasregistry.CreateKeyAccessServerResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyAccessServer_ = null; + if (keyAccessServerBuilder_ != null) { + keyAccessServerBuilder_.dispose(); + keyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse build() { + io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse buildPartial() { + io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse result = new io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyAccessServer_ = keyAccessServerBuilder_ == null + ? keyAccessServer_ + : keyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse) { + return mergeFrom((io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse other) { + if (other == io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.getDefaultInstance()) return this; + if (other.hasKeyAccessServer()) { + mergeKeyAccessServer(other.getKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServerBuilder_; + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + public boolean hasKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { + if (keyAccessServerBuilder_ == null) { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } else { + return keyAccessServerBuilder_.getMessage(); + } + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder setKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyAccessServer_ = value; + } else { + keyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder setKeyAccessServer( + io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (keyAccessServerBuilder_ == null) { + keyAccessServer_ = builderForValue.build(); + } else { + keyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder mergeKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + keyAccessServer_ != null && + keyAccessServer_ != io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) { + getKeyAccessServerBuilder().mergeFrom(value); + } else { + keyAccessServer_ = value; + } + } else { + keyAccessServerBuilder_.mergeFrom(value); + } + if (keyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder clearKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + keyAccessServer_ = null; + if (keyAccessServerBuilder_ != null) { + keyAccessServerBuilder_.dispose(); + keyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { + if (keyAccessServerBuilder_ != null) { + return keyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return keyAccessServer_ == null ? + io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> + getKeyAccessServerFieldBuilder() { + if (keyAccessServerBuilder_ == null) { + keyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( + getKeyAccessServer(), + getParentForChildren(), + isClean()); + keyAccessServer_ = null; + } + return keyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.CreateKeyAccessServerResponse) + } + + // @@protoc_insertion_point(class_scope:kasregistry.CreateKeyAccessServerResponse) + private static final io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse(); + } + + public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateKeyAccessServerResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponseOrBuilder.java new file mode 100644 index 00000000..ba2e5e7f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface CreateKeyAccessServerResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.CreateKeyAccessServerResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + boolean hasKeyAccessServer(); + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer(); + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequest.java new file mode 100644 index 00000000..0cd6f6a6 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.DeleteKeyAccessServerRequest} + */ +public final class DeleteKeyAccessServerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.DeleteKeyAccessServerRequest) + DeleteKeyAccessServerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteKeyAccessServerRequest.newBuilder() to construct. + private DeleteKeyAccessServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteKeyAccessServerRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteKeyAccessServerRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest other = (io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.DeleteKeyAccessServerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.DeleteKeyAccessServerRequest) + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest build() { + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest buildPartial() { + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest result = new io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest) { + return mergeFrom((io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest other) { + if (other == io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.DeleteKeyAccessServerRequest) + } + + // @@protoc_insertion_point(class_scope:kasregistry.DeleteKeyAccessServerRequest) + private static final io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest(); + } + + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteKeyAccessServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequestOrBuilder.java new file mode 100644 index 00000000..d29f008f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface DeleteKeyAccessServerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.DeleteKeyAccessServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponse.java new file mode 100644 index 00000000..007033c6 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.DeleteKeyAccessServerResponse} + */ +public final class DeleteKeyAccessServerResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.DeleteKeyAccessServerResponse) + DeleteKeyAccessServerResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteKeyAccessServerResponse.newBuilder() to construct. + private DeleteKeyAccessServerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteKeyAccessServerResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteKeyAccessServerResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.Builder.class); + } + + private int bitField0_; + public static final int KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + @java.lang.Override + public boolean hasKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse other = (io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse) obj; + + if (hasKeyAccessServer() != other.hasKeyAccessServer()) return false; + if (hasKeyAccessServer()) { + if (!getKeyAccessServer() + .equals(other.getKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeyAccessServer()) { + hash = (37 * hash) + KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.DeleteKeyAccessServerResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.DeleteKeyAccessServerResponse) + io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyAccessServer_ = null; + if (keyAccessServerBuilder_ != null) { + keyAccessServerBuilder_.dispose(); + keyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse build() { + io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse buildPartial() { + io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse result = new io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyAccessServer_ = keyAccessServerBuilder_ == null + ? keyAccessServer_ + : keyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse) { + return mergeFrom((io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse other) { + if (other == io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.getDefaultInstance()) return this; + if (other.hasKeyAccessServer()) { + mergeKeyAccessServer(other.getKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServerBuilder_; + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + public boolean hasKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { + if (keyAccessServerBuilder_ == null) { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } else { + return keyAccessServerBuilder_.getMessage(); + } + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder setKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyAccessServer_ = value; + } else { + keyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder setKeyAccessServer( + io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (keyAccessServerBuilder_ == null) { + keyAccessServer_ = builderForValue.build(); + } else { + keyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder mergeKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + keyAccessServer_ != null && + keyAccessServer_ != io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) { + getKeyAccessServerBuilder().mergeFrom(value); + } else { + keyAccessServer_ = value; + } + } else { + keyAccessServerBuilder_.mergeFrom(value); + } + if (keyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder clearKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + keyAccessServer_ = null; + if (keyAccessServerBuilder_ != null) { + keyAccessServerBuilder_.dispose(); + keyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { + if (keyAccessServerBuilder_ != null) { + return keyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return keyAccessServer_ == null ? + io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> + getKeyAccessServerFieldBuilder() { + if (keyAccessServerBuilder_ == null) { + keyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( + getKeyAccessServer(), + getParentForChildren(), + isClean()); + keyAccessServer_ = null; + } + return keyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.DeleteKeyAccessServerResponse) + } + + // @@protoc_insertion_point(class_scope:kasregistry.DeleteKeyAccessServerResponse) + private static final io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse(); + } + + public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteKeyAccessServerResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponseOrBuilder.java new file mode 100644 index 00000000..ea28255a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface DeleteKeyAccessServerResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.DeleteKeyAccessServerResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + boolean hasKeyAccessServer(); + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer(); + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequest.java new file mode 100644 index 00000000..230d6a7a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.GetKeyAccessServerRequest} + */ +public final class GetKeyAccessServerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.GetKeyAccessServerRequest) + GetKeyAccessServerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetKeyAccessServerRequest.newBuilder() to construct. + private GetKeyAccessServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetKeyAccessServerRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetKeyAccessServerRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.GetKeyAccessServerRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.GetKeyAccessServerRequest other = (io.opentdf.platform.kasregistry.GetKeyAccessServerRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.GetKeyAccessServerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.GetKeyAccessServerRequest) + io.opentdf.platform.kasregistry.GetKeyAccessServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.GetKeyAccessServerRequest getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.GetKeyAccessServerRequest build() { + io.opentdf.platform.kasregistry.GetKeyAccessServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.GetKeyAccessServerRequest buildPartial() { + io.opentdf.platform.kasregistry.GetKeyAccessServerRequest result = new io.opentdf.platform.kasregistry.GetKeyAccessServerRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.GetKeyAccessServerRequest) { + return mergeFrom((io.opentdf.platform.kasregistry.GetKeyAccessServerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest other) { + if (other == io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.GetKeyAccessServerRequest) + } + + // @@protoc_insertion_point(class_scope:kasregistry.GetKeyAccessServerRequest) + private static final io.opentdf.platform.kasregistry.GetKeyAccessServerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.GetKeyAccessServerRequest(); + } + + public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetKeyAccessServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.GetKeyAccessServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequestOrBuilder.java new file mode 100644 index 00000000..ae66ffc9 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface GetKeyAccessServerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.GetKeyAccessServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponse.java new file mode 100644 index 00000000..c557439e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.GetKeyAccessServerResponse} + */ +public final class GetKeyAccessServerResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.GetKeyAccessServerResponse) + GetKeyAccessServerResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetKeyAccessServerResponse.newBuilder() to construct. + private GetKeyAccessServerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetKeyAccessServerResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetKeyAccessServerResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.Builder.class); + } + + private int bitField0_; + public static final int KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + @java.lang.Override + public boolean hasKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.GetKeyAccessServerResponse)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.GetKeyAccessServerResponse other = (io.opentdf.platform.kasregistry.GetKeyAccessServerResponse) obj; + + if (hasKeyAccessServer() != other.hasKeyAccessServer()) return false; + if (hasKeyAccessServer()) { + if (!getKeyAccessServer() + .equals(other.getKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeyAccessServer()) { + hash = (37 * hash) + KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.GetKeyAccessServerResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.GetKeyAccessServerResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.GetKeyAccessServerResponse) + io.opentdf.platform.kasregistry.GetKeyAccessServerResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyAccessServer_ = null; + if (keyAccessServerBuilder_ != null) { + keyAccessServerBuilder_.dispose(); + keyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse build() { + io.opentdf.platform.kasregistry.GetKeyAccessServerResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse buildPartial() { + io.opentdf.platform.kasregistry.GetKeyAccessServerResponse result = new io.opentdf.platform.kasregistry.GetKeyAccessServerResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.GetKeyAccessServerResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyAccessServer_ = keyAccessServerBuilder_ == null + ? keyAccessServer_ + : keyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.GetKeyAccessServerResponse) { + return mergeFrom((io.opentdf.platform.kasregistry.GetKeyAccessServerResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.GetKeyAccessServerResponse other) { + if (other == io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.getDefaultInstance()) return this; + if (other.hasKeyAccessServer()) { + mergeKeyAccessServer(other.getKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServerBuilder_; + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + public boolean hasKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { + if (keyAccessServerBuilder_ == null) { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } else { + return keyAccessServerBuilder_.getMessage(); + } + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder setKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyAccessServer_ = value; + } else { + keyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder setKeyAccessServer( + io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (keyAccessServerBuilder_ == null) { + keyAccessServer_ = builderForValue.build(); + } else { + keyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder mergeKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + keyAccessServer_ != null && + keyAccessServer_ != io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) { + getKeyAccessServerBuilder().mergeFrom(value); + } else { + keyAccessServer_ = value; + } + } else { + keyAccessServerBuilder_.mergeFrom(value); + } + if (keyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder clearKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + keyAccessServer_ = null; + if (keyAccessServerBuilder_ != null) { + keyAccessServerBuilder_.dispose(); + keyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { + if (keyAccessServerBuilder_ != null) { + return keyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return keyAccessServer_ == null ? + io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> + getKeyAccessServerFieldBuilder() { + if (keyAccessServerBuilder_ == null) { + keyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( + getKeyAccessServer(), + getParentForChildren(), + isClean()); + keyAccessServer_ = null; + } + return keyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.GetKeyAccessServerResponse) + } + + // @@protoc_insertion_point(class_scope:kasregistry.GetKeyAccessServerResponse) + private static final io.opentdf.platform.kasregistry.GetKeyAccessServerResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.GetKeyAccessServerResponse(); + } + + public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetKeyAccessServerResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponseOrBuilder.java new file mode 100644 index 00000000..9bc23b13 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface GetKeyAccessServerResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.GetKeyAccessServerResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + boolean hasKeyAccessServer(); + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer(); + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServer.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServer.java new file mode 100644 index 00000000..c269c588 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServer.java @@ -0,0 +1,1142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + *
+ *
+ *Descriptor for a KAS
+ * 
+ * + * Protobuf type {@code kasregistry.KeyAccessServer} + */ +public final class KeyAccessServer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.KeyAccessServer) + KeyAccessServerOrBuilder { +private static final long serialVersionUID = 0L; + // Use KeyAccessServer.newBuilder() to construct. + private KeyAccessServer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KeyAccessServer() { + id_ = ""; + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KeyAccessServer(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.KeyAccessServer.class, io.opentdf.platform.kasregistry.KeyAccessServer.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + *
+   * Address of a KAS instance
+   * 
+ * + * string uri = 2 [json_name = "uri"]; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Address of a KAS instance
+   * 
+ * + * string uri = 2 [json_name = "uri"]; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 3; + private io.opentdf.platform.kasregistry.PublicKey publicKey_; + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + * @return Whether the publicKey field is set. + */ + @java.lang.Override + public boolean hasPublicKey() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.Metadata metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.Metadata getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPublicKey()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPublicKey()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.KeyAccessServer)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.KeyAccessServer other = (io.opentdf.platform.kasregistry.KeyAccessServer) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUri() + .equals(other.getUri())) return false; + if (hasPublicKey() != other.hasPublicKey()) return false; + if (hasPublicKey()) { + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (hasPublicKey()) { + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.KeyAccessServer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.KeyAccessServer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.KeyAccessServer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *Descriptor for a KAS
+   * 
+ * + * Protobuf type {@code kasregistry.KeyAccessServer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.KeyAccessServer) + io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.KeyAccessServer.class, io.opentdf.platform.kasregistry.KeyAccessServer.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.KeyAccessServer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPublicKeyFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + uri_ = ""; + publicKey_ = null; + if (publicKeyBuilder_ != null) { + publicKeyBuilder_.dispose(); + publicKeyBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer build() { + io.opentdf.platform.kasregistry.KeyAccessServer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer buildPartial() { + io.opentdf.platform.kasregistry.KeyAccessServer result = new io.opentdf.platform.kasregistry.KeyAccessServer(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.KeyAccessServer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.publicKey_ = publicKeyBuilder_ == null + ? publicKey_ + : publicKeyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.KeyAccessServer) { + return mergeFrom((io.opentdf.platform.kasregistry.KeyAccessServer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.KeyAccessServer other) { + if (other == io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPublicKey()) { + mergePublicKey(other.getPublicKey()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getPublicKeyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Address of a KAS instance
+     * 
+ * + * string uri = 2 [json_name = "uri"]; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Address of a KAS instance
+     * 
+ * + * string uri = 2 [json_name = "uri"]; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Address of a KAS instance
+     * 
+ * + * string uri = 2 [json_name = "uri"]; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Address of a KAS instance
+     * 
+ * + * string uri = 2 [json_name = "uri"]; + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Address of a KAS instance
+     * 
+ * + * string uri = 2 [json_name = "uri"]; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.opentdf.platform.kasregistry.PublicKey publicKey_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> publicKeyBuilder_; + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + * @return Whether the publicKey field is set. + */ + public boolean hasPublicKey() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { + if (publicKeyBuilder_ == null) { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } else { + return publicKeyBuilder_.getMessage(); + } + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + public Builder setPublicKey(io.opentdf.platform.kasregistry.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicKey_ = value; + } else { + publicKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + public Builder setPublicKey( + io.opentdf.platform.kasregistry.PublicKey.Builder builderForValue) { + if (publicKeyBuilder_ == null) { + publicKey_ = builderForValue.build(); + } else { + publicKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + public Builder mergePublicKey(io.opentdf.platform.kasregistry.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + publicKey_ != null && + publicKey_ != io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance()) { + getPublicKeyBuilder().mergeFrom(value); + } else { + publicKey_ = value; + } + } else { + publicKeyBuilder_.mergeFrom(value); + } + if (publicKey_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + public Builder clearPublicKey() { + bitField0_ = (bitField0_ & ~0x00000004); + publicKey_ = null; + if (publicKeyBuilder_ != null) { + publicKeyBuilder_.dispose(); + publicKeyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + public io.opentdf.platform.kasregistry.PublicKey.Builder getPublicKeyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPublicKeyFieldBuilder().getBuilder(); + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { + if (publicKeyBuilder_ != null) { + return publicKeyBuilder_.getMessageOrBuilder(); + } else { + return publicKey_ == null ? + io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> + getPublicKeyFieldBuilder() { + if (publicKeyBuilder_ == null) { + publicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder>( + getPublicKey(), + getParentForChildren(), + isClean()); + publicKey_ = null; + } + return publicKeyBuilder_; + } + + private io.opentdf.platform.common.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.KeyAccessServer) + } + + // @@protoc_insertion_point(class_scope:kasregistry.KeyAccessServer) + private static final io.opentdf.platform.kasregistry.KeyAccessServer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.KeyAccessServer(); + } + + public static io.opentdf.platform.kasregistry.KeyAccessServer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyAccessServer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerOrBuilder.java new file mode 100644 index 00000000..5dd46c60 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface KeyAccessServerOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.KeyAccessServer) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Address of a KAS instance
+   * 
+ * + * string uri = 2 [json_name = "uri"]; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Address of a KAS instance
+   * 
+ * + * string uri = 2 [json_name = "uri"]; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + * @return Whether the publicKey field is set. + */ + boolean hasPublicKey(); + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + io.opentdf.platform.kasregistry.PublicKey getPublicKey(); + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; + */ + io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder(); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryProto.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryProto.java new file mode 100644 index 00000000..d27284be --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryProto.java @@ -0,0 +1,249 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public final class KeyAccessServerRegistryProto { + private KeyAccessServerRegistryProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_KeyAccessServer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_KeyAccessServer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_PublicKey_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_PublicKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_GetKeyAccessServerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_GetKeyAccessServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_GetKeyAccessServerResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_GetKeyAccessServerResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_ListKeyAccessServersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_ListKeyAccessServersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_ListKeyAccessServersResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_ListKeyAccessServersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_CreateKeyAccessServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_CreateKeyAccessServerResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_UpdateKeyAccessServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_UpdateKeyAccessServerResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_DeleteKeyAccessServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_kasregistry_DeleteKeyAccessServerResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,kasregistry/key_access_server_registry" + + ".proto\022\013kasregistry\032\033buf/validate/valida" + + "te.proto\032\023common/common.proto\032\034google/ap" + + "i/annotations.proto\"\230\001\n\017KeyAccessServer\022" + + "\016\n\002id\030\001 \001(\tR\002id\022\020\n\003uri\030\002 \001(\tR\003uri\0225\n\npub" + + "lic_key\030\003 \001(\0132\026.kasregistry.PublicKeyR\tp" + + "ublicKey\022,\n\010metadata\030d \001(\0132\020.common.Meta" + + "dataR\010metadata\"\300\003\n\tPublicKey\022\214\003\n\006remote\030" + + "\001 \001(\tB\361\002\272H\355\002\272\001\351\002\n\nfqn_format\022\327\001FQN must " + + "start with a valid URL (e.g., \'https://d" + + "emo.com/\') followed by additional segmen" + + "ts. Each segment must start and end with" + + " an alphanumeric character, can contain " + + "hyphens, alphanumeric characters, and sl" + + "ashes.\032\200\001this.matches(\'^https://[a-zA-Z0" + + "-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?(\\\\" + + ".[a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z" + + "0-9])?)*(/.*)?$\')H\000R\006remote\022\026\n\005local\030\002 \001" + + "(\tH\000R\005localB\014\n\npublic_key\"3\n\031GetKeyAcces" + + "sServerRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"f" + + "\n\032GetKeyAccessServerResponse\022H\n\021key_acce" + + "ss_server\030\001 \001(\0132\034.kasregistry.KeyAccessS" + + "erverR\017keyAccessServer\"\035\n\033ListKeyAccessS" + + "erversRequest\"j\n\034ListKeyAccessServersRes" + + "ponse\022J\n\022key_access_servers\030\001 \003(\0132\034.kasr" + + "egistry.KeyAccessServerR\020keyAccessServer" + + "s\"\254\001\n\034CreateKeyAccessServerRequest\022\030\n\003ur" + + "i\030\001 \001(\tB\006\272H\003\310\001\001R\003uri\022=\n\npublic_key\030\002 \001(\013" + + "2\026.kasregistry.PublicKeyB\006\272H\003\310\001\001R\tpublic" + + "Key\0223\n\010metadata\030d \001(\0132\027.common.MetadataM" + + "utableR\010metadata\"i\n\035CreateKeyAccessServe" + + "rResponse\022H\n\021key_access_server\030\001 \001(\0132\034.k" + + "asregistry.KeyAccessServerR\017keyAccessSer" + + "ver\"\232\002\n\034UpdateKeyAccessServerRequest\022\026\n\002" + + "id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022\030\n\003uri\030\002 \001(\tB\006\272H\003\310\001" + + "\001R\003uri\022=\n\npublic_key\030\003 \001(\0132\026.kasregistry" + + ".PublicKeyB\006\272H\003\310\001\001R\tpublicKey\0223\n\010metadat" + + "a\030d \001(\0132\027.common.MetadataMutableR\010metada" + + "ta\022T\n\030metadata_update_behavior\030e \001(\0162\032.c" + + "ommon.MetadataUpdateEnumR\026metadataUpdate" + + "Behavior\"i\n\035UpdateKeyAccessServerRespons" + + "e\022H\n\021key_access_server\030\001 \001(\0132\034.kasregist" + + "ry.KeyAccessServerR\017keyAccessServer\"6\n\034D" + + "eleteKeyAccessServerRequest\022\026\n\002id\030\001 \001(\tB" + + "\006\272H\003\310\001\001R\002id\"i\n\035DeleteKeyAccessServerResp" + + "onse\022H\n\021key_access_server\030\001 \001(\0132\034.kasreg" + + "istry.KeyAccessServerR\017keyAccessServer2\357" + + "\005\n\036KeyAccessServerRegistryService\022\210\001\n\024Li" + + "stKeyAccessServers\022(.kasregistry.ListKey" + + "AccessServersRequest\032).kasregistry.ListK" + + "eyAccessServersResponse\"\033\202\323\344\223\002\025\022\023/key-ac" + + "cess-servers\022\207\001\n\022GetKeyAccessServer\022&.ka" + + "sregistry.GetKeyAccessServerRequest\032\'.ka" + + "sregistry.GetKeyAccessServerResponse\" \202\323" + + "\344\223\002\032\022\030/key-access-servers/{id}\022\216\001\n\025Creat" + + "eKeyAccessServer\022).kasregistry.CreateKey" + + "AccessServerRequest\032*.kasregistry.Create" + + "KeyAccessServerResponse\"\036\202\323\344\223\002\030\"\023/key-ac" + + "cess-servers:\001*\022\223\001\n\025UpdateKeyAccessServe" + + "r\022).kasregistry.UpdateKeyAccessServerReq" + + "uest\032*.kasregistry.UpdateKeyAccessServer" + + "Response\"#\202\323\344\223\002\035\032\030/key-access-servers/{i" + + "d}:\001*\022\220\001\n\025DeleteKeyAccessServer\022).kasreg" + + "istry.DeleteKeyAccessServerRequest\032*.kas" + + "registry.DeleteKeyAccessServerResponse\" " + + "\202\323\344\223\002\032*\030/key-access-servers/{id}B\213\001\n\037io." + + "opentdf.platform.kasregistryB\034KeyAccessS" + + "erverRegistryProtoP\001\242\002\003KXX\252\002\013Kasregistry" + + "\312\002\013Kasregistry\342\002\027Kasregistry\\GPBMetadata" + + "\352\002\013Kasregistryb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + build.buf.validate.ValidateProto.getDescriptor(), + io.opentdf.platform.common.CommonProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_kasregistry_KeyAccessServer_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_kasregistry_KeyAccessServer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_KeyAccessServer_descriptor, + new java.lang.String[] { "Id", "Uri", "PublicKey", "Metadata", }); + internal_static_kasregistry_PublicKey_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_kasregistry_PublicKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_PublicKey_descriptor, + new java.lang.String[] { "Remote", "Local", "PublicKey", }); + internal_static_kasregistry_GetKeyAccessServerRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_kasregistry_GetKeyAccessServerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_GetKeyAccessServerRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_kasregistry_GetKeyAccessServerResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_kasregistry_GetKeyAccessServerResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_GetKeyAccessServerResponse_descriptor, + new java.lang.String[] { "KeyAccessServer", }); + internal_static_kasregistry_ListKeyAccessServersRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_kasregistry_ListKeyAccessServersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_ListKeyAccessServersRequest_descriptor, + new java.lang.String[] { }); + internal_static_kasregistry_ListKeyAccessServersResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_kasregistry_ListKeyAccessServersResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_ListKeyAccessServersResponse_descriptor, + new java.lang.String[] { "KeyAccessServers", }); + internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_kasregistry_CreateKeyAccessServerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor, + new java.lang.String[] { "Uri", "PublicKey", "Metadata", }); + internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_kasregistry_CreateKeyAccessServerResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor, + new java.lang.String[] { "KeyAccessServer", }); + internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_kasregistry_UpdateKeyAccessServerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor, + new java.lang.String[] { "Id", "Uri", "PublicKey", "Metadata", "MetadataUpdateBehavior", }); + internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_kasregistry_UpdateKeyAccessServerResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor, + new java.lang.String[] { "KeyAccessServer", }); + internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_kasregistry_DeleteKeyAccessServerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_kasregistry_DeleteKeyAccessServerResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor, + new java.lang.String[] { "KeyAccessServer", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(build.buf.validate.ValidateProto.field); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + build.buf.validate.ValidateProto.getDescriptor(); + io.opentdf.platform.common.CommonProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryServiceGrpc.java new file mode 100644 index 00000000..e7e40ec2 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryServiceGrpc.java @@ -0,0 +1,589 @@ +package io.opentdf.platform.kasregistry; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.61.1)", + comments = "Source: kasregistry/key_access_server_registry.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class KeyAccessServerRegistryServiceGrpc { + + private KeyAccessServerRegistryServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "kasregistry.KeyAccessServerRegistryService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListKeyAccessServersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListKeyAccessServers", + requestType = io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.class, + responseType = io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListKeyAccessServersMethod() { + io.grpc.MethodDescriptor getListKeyAccessServersMethod; + if ((getListKeyAccessServersMethod = KeyAccessServerRegistryServiceGrpc.getListKeyAccessServersMethod) == null) { + synchronized (KeyAccessServerRegistryServiceGrpc.class) { + if ((getListKeyAccessServersMethod = KeyAccessServerRegistryServiceGrpc.getListKeyAccessServersMethod) == null) { + KeyAccessServerRegistryServiceGrpc.getListKeyAccessServersMethod = getListKeyAccessServersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListKeyAccessServers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.getDefaultInstance())) + .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("ListKeyAccessServers")) + .build(); + } + } + } + return getListKeyAccessServersMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetKeyAccessServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetKeyAccessServer", + requestType = io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.class, + responseType = io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetKeyAccessServerMethod() { + io.grpc.MethodDescriptor getGetKeyAccessServerMethod; + if ((getGetKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getGetKeyAccessServerMethod) == null) { + synchronized (KeyAccessServerRegistryServiceGrpc.class) { + if ((getGetKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getGetKeyAccessServerMethod) == null) { + KeyAccessServerRegistryServiceGrpc.getGetKeyAccessServerMethod = getGetKeyAccessServerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKeyAccessServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.getDefaultInstance())) + .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("GetKeyAccessServer")) + .build(); + } + } + } + return getGetKeyAccessServerMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateKeyAccessServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateKeyAccessServer", + requestType = io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.class, + responseType = io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateKeyAccessServerMethod() { + io.grpc.MethodDescriptor getCreateKeyAccessServerMethod; + if ((getCreateKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getCreateKeyAccessServerMethod) == null) { + synchronized (KeyAccessServerRegistryServiceGrpc.class) { + if ((getCreateKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getCreateKeyAccessServerMethod) == null) { + KeyAccessServerRegistryServiceGrpc.getCreateKeyAccessServerMethod = getCreateKeyAccessServerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateKeyAccessServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.getDefaultInstance())) + .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("CreateKeyAccessServer")) + .build(); + } + } + } + return getCreateKeyAccessServerMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateKeyAccessServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateKeyAccessServer", + requestType = io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.class, + responseType = io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateKeyAccessServerMethod() { + io.grpc.MethodDescriptor getUpdateKeyAccessServerMethod; + if ((getUpdateKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getUpdateKeyAccessServerMethod) == null) { + synchronized (KeyAccessServerRegistryServiceGrpc.class) { + if ((getUpdateKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getUpdateKeyAccessServerMethod) == null) { + KeyAccessServerRegistryServiceGrpc.getUpdateKeyAccessServerMethod = getUpdateKeyAccessServerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateKeyAccessServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.getDefaultInstance())) + .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("UpdateKeyAccessServer")) + .build(); + } + } + } + return getUpdateKeyAccessServerMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteKeyAccessServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteKeyAccessServer", + requestType = io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.class, + responseType = io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteKeyAccessServerMethod() { + io.grpc.MethodDescriptor getDeleteKeyAccessServerMethod; + if ((getDeleteKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getDeleteKeyAccessServerMethod) == null) { + synchronized (KeyAccessServerRegistryServiceGrpc.class) { + if ((getDeleteKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getDeleteKeyAccessServerMethod) == null) { + KeyAccessServerRegistryServiceGrpc.getDeleteKeyAccessServerMethod = getDeleteKeyAccessServerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteKeyAccessServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.getDefaultInstance())) + .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("DeleteKeyAccessServer")) + .build(); + } + } + } + return getDeleteKeyAccessServerMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static KeyAccessServerRegistryServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public KeyAccessServerRegistryServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new KeyAccessServerRegistryServiceStub(channel, callOptions); + } + }; + return KeyAccessServerRegistryServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static KeyAccessServerRegistryServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public KeyAccessServerRegistryServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new KeyAccessServerRegistryServiceBlockingStub(channel, callOptions); + } + }; + return KeyAccessServerRegistryServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static KeyAccessServerRegistryServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public KeyAccessServerRegistryServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new KeyAccessServerRegistryServiceFutureStub(channel, callOptions); + } + }; + return KeyAccessServerRegistryServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + */ + default void listKeyAccessServers(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListKeyAccessServersMethod(), responseObserver); + } + + /** + */ + default void getKeyAccessServer(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKeyAccessServerMethod(), responseObserver); + } + + /** + */ + default void createKeyAccessServer(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateKeyAccessServerMethod(), responseObserver); + } + + /** + */ + default void updateKeyAccessServer(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateKeyAccessServerMethod(), responseObserver); + } + + /** + */ + default void deleteKeyAccessServer(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKeyAccessServerMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service KeyAccessServerRegistryService. + */ + public static abstract class KeyAccessServerRegistryServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return KeyAccessServerRegistryServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service KeyAccessServerRegistryService. + */ + public static final class KeyAccessServerRegistryServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private KeyAccessServerRegistryServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected KeyAccessServerRegistryServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new KeyAccessServerRegistryServiceStub(channel, callOptions); + } + + /** + */ + public void listKeyAccessServers(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListKeyAccessServersMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getKeyAccessServer(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetKeyAccessServerMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void createKeyAccessServer(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateKeyAccessServerMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void updateKeyAccessServer(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateKeyAccessServerMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteKeyAccessServer(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteKeyAccessServerMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service KeyAccessServerRegistryService. + */ + public static final class KeyAccessServerRegistryServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private KeyAccessServerRegistryServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected KeyAccessServerRegistryServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new KeyAccessServerRegistryServiceBlockingStub(channel, callOptions); + } + + /** + */ + public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse listKeyAccessServers(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListKeyAccessServersMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse getKeyAccessServer(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetKeyAccessServerMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse createKeyAccessServer(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateKeyAccessServerMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse updateKeyAccessServer(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateKeyAccessServerMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse deleteKeyAccessServer(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteKeyAccessServerMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service KeyAccessServerRegistryService. + */ + public static final class KeyAccessServerRegistryServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private KeyAccessServerRegistryServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected KeyAccessServerRegistryServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new KeyAccessServerRegistryServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listKeyAccessServers( + io.opentdf.platform.kasregistry.ListKeyAccessServersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListKeyAccessServersMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getKeyAccessServer( + io.opentdf.platform.kasregistry.GetKeyAccessServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetKeyAccessServerMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createKeyAccessServer( + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateKeyAccessServerMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateKeyAccessServer( + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateKeyAccessServerMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteKeyAccessServer( + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteKeyAccessServerMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_KEY_ACCESS_SERVERS = 0; + private static final int METHODID_GET_KEY_ACCESS_SERVER = 1; + private static final int METHODID_CREATE_KEY_ACCESS_SERVER = 2; + private static final int METHODID_UPDATE_KEY_ACCESS_SERVER = 3; + private static final int METHODID_DELETE_KEY_ACCESS_SERVER = 4; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_KEY_ACCESS_SERVERS: + serviceImpl.listKeyAccessServers((io.opentdf.platform.kasregistry.ListKeyAccessServersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_KEY_ACCESS_SERVER: + serviceImpl.getKeyAccessServer((io.opentdf.platform.kasregistry.GetKeyAccessServerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_KEY_ACCESS_SERVER: + serviceImpl.createKeyAccessServer((io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_KEY_ACCESS_SERVER: + serviceImpl.updateKeyAccessServer((io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_KEY_ACCESS_SERVER: + serviceImpl.deleteKeyAccessServer((io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListKeyAccessServersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kasregistry.ListKeyAccessServersRequest, + io.opentdf.platform.kasregistry.ListKeyAccessServersResponse>( + service, METHODID_LIST_KEY_ACCESS_SERVERS))) + .addMethod( + getGetKeyAccessServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kasregistry.GetKeyAccessServerRequest, + io.opentdf.platform.kasregistry.GetKeyAccessServerResponse>( + service, METHODID_GET_KEY_ACCESS_SERVER))) + .addMethod( + getCreateKeyAccessServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest, + io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse>( + service, METHODID_CREATE_KEY_ACCESS_SERVER))) + .addMethod( + getUpdateKeyAccessServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest, + io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse>( + service, METHODID_UPDATE_KEY_ACCESS_SERVER))) + .addMethod( + getDeleteKeyAccessServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest, + io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse>( + service, METHODID_DELETE_KEY_ACCESS_SERVER))) + .build(); + } + + private static abstract class KeyAccessServerRegistryServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + KeyAccessServerRegistryServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("KeyAccessServerRegistryService"); + } + } + + private static final class KeyAccessServerRegistryServiceFileDescriptorSupplier + extends KeyAccessServerRegistryServiceBaseDescriptorSupplier { + KeyAccessServerRegistryServiceFileDescriptorSupplier() {} + } + + private static final class KeyAccessServerRegistryServiceMethodDescriptorSupplier + extends KeyAccessServerRegistryServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + KeyAccessServerRegistryServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (KeyAccessServerRegistryServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new KeyAccessServerRegistryServiceFileDescriptorSupplier()) + .addMethod(getListKeyAccessServersMethod()) + .addMethod(getGetKeyAccessServerMethod()) + .addMethod(getCreateKeyAccessServerMethod()) + .addMethod(getUpdateKeyAccessServerMethod()) + .addMethod(getDeleteKeyAccessServerMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequest.java new file mode 100644 index 00000000..0a65a55b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequest.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.ListKeyAccessServersRequest} + */ +public final class ListKeyAccessServersRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.ListKeyAccessServersRequest) + ListKeyAccessServersRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListKeyAccessServersRequest.newBuilder() to construct. + private ListKeyAccessServersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListKeyAccessServersRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListKeyAccessServersRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.class, io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.ListKeyAccessServersRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.ListKeyAccessServersRequest other = (io.opentdf.platform.kasregistry.ListKeyAccessServersRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.ListKeyAccessServersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.ListKeyAccessServersRequest) + io.opentdf.platform.kasregistry.ListKeyAccessServersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.class, io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.ListKeyAccessServersRequest getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.ListKeyAccessServersRequest build() { + io.opentdf.platform.kasregistry.ListKeyAccessServersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.ListKeyAccessServersRequest buildPartial() { + io.opentdf.platform.kasregistry.ListKeyAccessServersRequest result = new io.opentdf.platform.kasregistry.ListKeyAccessServersRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.ListKeyAccessServersRequest) { + return mergeFrom((io.opentdf.platform.kasregistry.ListKeyAccessServersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest other) { + if (other == io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.ListKeyAccessServersRequest) + } + + // @@protoc_insertion_point(class_scope:kasregistry.ListKeyAccessServersRequest) + private static final io.opentdf.platform.kasregistry.ListKeyAccessServersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.ListKeyAccessServersRequest(); + } + + public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListKeyAccessServersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.ListKeyAccessServersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequestOrBuilder.java new file mode 100644 index 00000000..d6ec8a89 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequestOrBuilder.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface ListKeyAccessServersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.ListKeyAccessServersRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponse.java new file mode 100644 index 00000000..dce90608 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.ListKeyAccessServersResponse} + */ +public final class ListKeyAccessServersResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.ListKeyAccessServersResponse) + ListKeyAccessServersResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListKeyAccessServersResponse.newBuilder() to construct. + private ListKeyAccessServersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListKeyAccessServersResponse() { + keyAccessServers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListKeyAccessServersResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.class, io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.Builder.class); + } + + public static final int KEY_ACCESS_SERVERS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List keyAccessServers_; + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + @java.lang.Override + public java.util.List getKeyAccessServersList() { + return keyAccessServers_; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + @java.lang.Override + public java.util.List + getKeyAccessServersOrBuilderList() { + return keyAccessServers_; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + @java.lang.Override + public int getKeyAccessServersCount() { + return keyAccessServers_.size(); + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServers(int index) { + return keyAccessServers_.get(index); + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServersOrBuilder( + int index) { + return keyAccessServers_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < keyAccessServers_.size(); i++) { + output.writeMessage(1, keyAccessServers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < keyAccessServers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, keyAccessServers_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.ListKeyAccessServersResponse)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.ListKeyAccessServersResponse other = (io.opentdf.platform.kasregistry.ListKeyAccessServersResponse) obj; + + if (!getKeyAccessServersList() + .equals(other.getKeyAccessServersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKeyAccessServersCount() > 0) { + hash = (37 * hash) + KEY_ACCESS_SERVERS_FIELD_NUMBER; + hash = (53 * hash) + getKeyAccessServersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.ListKeyAccessServersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.ListKeyAccessServersResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.ListKeyAccessServersResponse) + io.opentdf.platform.kasregistry.ListKeyAccessServersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.class, io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (keyAccessServersBuilder_ == null) { + keyAccessServers_ = java.util.Collections.emptyList(); + } else { + keyAccessServers_ = null; + keyAccessServersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse build() { + io.opentdf.platform.kasregistry.ListKeyAccessServersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse buildPartial() { + io.opentdf.platform.kasregistry.ListKeyAccessServersResponse result = new io.opentdf.platform.kasregistry.ListKeyAccessServersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.kasregistry.ListKeyAccessServersResponse result) { + if (keyAccessServersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + keyAccessServers_ = java.util.Collections.unmodifiableList(keyAccessServers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.keyAccessServers_ = keyAccessServers_; + } else { + result.keyAccessServers_ = keyAccessServersBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.kasregistry.ListKeyAccessServersResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.ListKeyAccessServersResponse) { + return mergeFrom((io.opentdf.platform.kasregistry.ListKeyAccessServersResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.ListKeyAccessServersResponse other) { + if (other == io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.getDefaultInstance()) return this; + if (keyAccessServersBuilder_ == null) { + if (!other.keyAccessServers_.isEmpty()) { + if (keyAccessServers_.isEmpty()) { + keyAccessServers_ = other.keyAccessServers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKeyAccessServersIsMutable(); + keyAccessServers_.addAll(other.keyAccessServers_); + } + onChanged(); + } + } else { + if (!other.keyAccessServers_.isEmpty()) { + if (keyAccessServersBuilder_.isEmpty()) { + keyAccessServersBuilder_.dispose(); + keyAccessServersBuilder_ = null; + keyAccessServers_ = other.keyAccessServers_; + bitField0_ = (bitField0_ & ~0x00000001); + keyAccessServersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getKeyAccessServersFieldBuilder() : null; + } else { + keyAccessServersBuilder_.addAllMessages(other.keyAccessServers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.kasregistry.KeyAccessServer m = + input.readMessage( + io.opentdf.platform.kasregistry.KeyAccessServer.parser(), + extensionRegistry); + if (keyAccessServersBuilder_ == null) { + ensureKeyAccessServersIsMutable(); + keyAccessServers_.add(m); + } else { + keyAccessServersBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List keyAccessServers_ = + java.util.Collections.emptyList(); + private void ensureKeyAccessServersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + keyAccessServers_ = new java.util.ArrayList(keyAccessServers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServersBuilder_; + + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public java.util.List getKeyAccessServersList() { + if (keyAccessServersBuilder_ == null) { + return java.util.Collections.unmodifiableList(keyAccessServers_); + } else { + return keyAccessServersBuilder_.getMessageList(); + } + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public int getKeyAccessServersCount() { + if (keyAccessServersBuilder_ == null) { + return keyAccessServers_.size(); + } else { + return keyAccessServersBuilder_.getCount(); + } + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServers(int index) { + if (keyAccessServersBuilder_ == null) { + return keyAccessServers_.get(index); + } else { + return keyAccessServersBuilder_.getMessage(index); + } + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder setKeyAccessServers( + int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeyAccessServersIsMutable(); + keyAccessServers_.set(index, value); + onChanged(); + } else { + keyAccessServersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder setKeyAccessServers( + int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (keyAccessServersBuilder_ == null) { + ensureKeyAccessServersIsMutable(); + keyAccessServers_.set(index, builderForValue.build()); + onChanged(); + } else { + keyAccessServersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder addKeyAccessServers(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeyAccessServersIsMutable(); + keyAccessServers_.add(value); + onChanged(); + } else { + keyAccessServersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder addKeyAccessServers( + int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeyAccessServersIsMutable(); + keyAccessServers_.add(index, value); + onChanged(); + } else { + keyAccessServersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder addKeyAccessServers( + io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (keyAccessServersBuilder_ == null) { + ensureKeyAccessServersIsMutable(); + keyAccessServers_.add(builderForValue.build()); + onChanged(); + } else { + keyAccessServersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder addKeyAccessServers( + int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (keyAccessServersBuilder_ == null) { + ensureKeyAccessServersIsMutable(); + keyAccessServers_.add(index, builderForValue.build()); + onChanged(); + } else { + keyAccessServersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder addAllKeyAccessServers( + java.lang.Iterable values) { + if (keyAccessServersBuilder_ == null) { + ensureKeyAccessServersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, keyAccessServers_); + onChanged(); + } else { + keyAccessServersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder clearKeyAccessServers() { + if (keyAccessServersBuilder_ == null) { + keyAccessServers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + keyAccessServersBuilder_.clear(); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public Builder removeKeyAccessServers(int index) { + if (keyAccessServersBuilder_ == null) { + ensureKeyAccessServersIsMutable(); + keyAccessServers_.remove(index); + onChanged(); + } else { + keyAccessServersBuilder_.remove(index); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServersBuilder( + int index) { + return getKeyAccessServersFieldBuilder().getBuilder(index); + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServersOrBuilder( + int index) { + if (keyAccessServersBuilder_ == null) { + return keyAccessServers_.get(index); } else { + return keyAccessServersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public java.util.List + getKeyAccessServersOrBuilderList() { + if (keyAccessServersBuilder_ != null) { + return keyAccessServersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(keyAccessServers_); + } + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addKeyAccessServersBuilder() { + return getKeyAccessServersFieldBuilder().addBuilder( + io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addKeyAccessServersBuilder( + int index) { + return getKeyAccessServersFieldBuilder().addBuilder( + index, io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); + } + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + public java.util.List + getKeyAccessServersBuilderList() { + return getKeyAccessServersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> + getKeyAccessServersFieldBuilder() { + if (keyAccessServersBuilder_ == null) { + keyAccessServersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( + keyAccessServers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + keyAccessServers_ = null; + } + return keyAccessServersBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.ListKeyAccessServersResponse) + } + + // @@protoc_insertion_point(class_scope:kasregistry.ListKeyAccessServersResponse) + private static final io.opentdf.platform.kasregistry.ListKeyAccessServersResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.ListKeyAccessServersResponse(); + } + + public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListKeyAccessServersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponseOrBuilder.java new file mode 100644 index 00000000..0cfcd759 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface ListKeyAccessServersResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.ListKeyAccessServersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + java.util.List + getKeyAccessServersList(); + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServers(int index); + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + int getKeyAccessServersCount(); + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + java.util.List + getKeyAccessServersOrBuilderList(); + /** + * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServersOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKey.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKey.java new file mode 100644 index 00000000..4775255d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKey.java @@ -0,0 +1,899 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.PublicKey} + */ +public final class PublicKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.PublicKey) + PublicKeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use PublicKey.newBuilder() to construct. + private PublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublicKey() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublicKey(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.PublicKey.class, io.opentdf.platform.kasregistry.PublicKey.Builder.class); + } + + private int publicKeyCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object publicKey_; + public enum PublicKeyCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REMOTE(1), + LOCAL(2), + PUBLICKEY_NOT_SET(0); + private final int value; + private PublicKeyCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PublicKeyCase valueOf(int value) { + return forNumber(value); + } + + public static PublicKeyCase forNumber(int value) { + switch (value) { + case 1: return REMOTE; + case 2: return LOCAL; + case 0: return PUBLICKEY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public PublicKeyCase + getPublicKeyCase() { + return PublicKeyCase.forNumber( + publicKeyCase_); + } + + public static final int REMOTE_FIELD_NUMBER = 1; + /** + *
+   * kas public key url - optional since can also be retrieved via public key
+   * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return Whether the remote field is set. + */ + public boolean hasRemote() { + return publicKeyCase_ == 1; + } + /** + *
+   * kas public key url - optional since can also be retrieved via public key
+   * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return The remote. + */ + public java.lang.String getRemote() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 1) { + ref = publicKey_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (publicKeyCase_ == 1) { + publicKey_ = s; + } + return s; + } + } + /** + *
+   * kas public key url - optional since can also be retrieved via public key
+   * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return The bytes for remote. + */ + public com.google.protobuf.ByteString + getRemoteBytes() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 1) { + ref = publicKey_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (publicKeyCase_ == 1) { + publicKey_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCAL_FIELD_NUMBER = 2; + /** + *
+   * public key - optional since can also be retrieved via url
+   * 
+ * + * string local = 2 [json_name = "local"]; + * @return Whether the local field is set. + */ + public boolean hasLocal() { + return publicKeyCase_ == 2; + } + /** + *
+   * public key - optional since can also be retrieved via url
+   * 
+ * + * string local = 2 [json_name = "local"]; + * @return The local. + */ + public java.lang.String getLocal() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 2) { + ref = publicKey_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (publicKeyCase_ == 2) { + publicKey_ = s; + } + return s; + } + } + /** + *
+   * public key - optional since can also be retrieved via url
+   * 
+ * + * string local = 2 [json_name = "local"]; + * @return The bytes for local. + */ + public com.google.protobuf.ByteString + getLocalBytes() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 2) { + ref = publicKey_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (publicKeyCase_ == 2) { + publicKey_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (publicKeyCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKey_); + } + if (publicKeyCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (publicKeyCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKey_); + } + if (publicKeyCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.PublicKey)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.PublicKey other = (io.opentdf.platform.kasregistry.PublicKey) obj; + + if (!getPublicKeyCase().equals(other.getPublicKeyCase())) return false; + switch (publicKeyCase_) { + case 1: + if (!getRemote() + .equals(other.getRemote())) return false; + break; + case 2: + if (!getLocal() + .equals(other.getLocal())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (publicKeyCase_) { + case 1: + hash = (37 * hash) + REMOTE_FIELD_NUMBER; + hash = (53 * hash) + getRemote().hashCode(); + break; + case 2: + hash = (37 * hash) + LOCAL_FIELD_NUMBER; + hash = (53 * hash) + getLocal().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.PublicKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.PublicKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.PublicKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.PublicKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.PublicKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.PublicKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.PublicKey) + io.opentdf.platform.kasregistry.PublicKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.PublicKey.class, io.opentdf.platform.kasregistry.PublicKey.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.PublicKey.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + publicKeyCase_ = 0; + publicKey_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKey getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKey build() { + io.opentdf.platform.kasregistry.PublicKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKey buildPartial() { + io.opentdf.platform.kasregistry.PublicKey result = new io.opentdf.platform.kasregistry.PublicKey(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.PublicKey result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(io.opentdf.platform.kasregistry.PublicKey result) { + result.publicKeyCase_ = publicKeyCase_; + result.publicKey_ = this.publicKey_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.PublicKey) { + return mergeFrom((io.opentdf.platform.kasregistry.PublicKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.PublicKey other) { + if (other == io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance()) return this; + switch (other.getPublicKeyCase()) { + case REMOTE: { + publicKeyCase_ = 1; + publicKey_ = other.publicKey_; + onChanged(); + break; + } + case LOCAL: { + publicKeyCase_ = 2; + publicKey_ = other.publicKey_; + onChanged(); + break; + } + case PUBLICKEY_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + publicKeyCase_ = 1; + publicKey_ = s; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + publicKeyCase_ = 2; + publicKey_ = s; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int publicKeyCase_ = 0; + private java.lang.Object publicKey_; + public PublicKeyCase + getPublicKeyCase() { + return PublicKeyCase.forNumber( + publicKeyCase_); + } + + public Builder clearPublicKey() { + publicKeyCase_ = 0; + publicKey_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * kas public key url - optional since can also be retrieved via public key
+     * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return Whether the remote field is set. + */ + @java.lang.Override + public boolean hasRemote() { + return publicKeyCase_ == 1; + } + /** + *
+     * kas public key url - optional since can also be retrieved via public key
+     * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return The remote. + */ + @java.lang.Override + public java.lang.String getRemote() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 1) { + ref = publicKey_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (publicKeyCase_ == 1) { + publicKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * kas public key url - optional since can also be retrieved via public key
+     * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return The bytes for remote. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemoteBytes() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 1) { + ref = publicKey_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (publicKeyCase_ == 1) { + publicKey_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * kas public key url - optional since can also be retrieved via public key
+     * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @param value The remote to set. + * @return This builder for chaining. + */ + public Builder setRemote( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + publicKeyCase_ = 1; + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+     * kas public key url - optional since can also be retrieved via public key
+     * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearRemote() { + if (publicKeyCase_ == 1) { + publicKeyCase_ = 0; + publicKey_ = null; + onChanged(); + } + return this; + } + /** + *
+     * kas public key url - optional since can also be retrieved via public key
+     * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @param value The bytes for remote to set. + * @return This builder for chaining. + */ + public Builder setRemoteBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + publicKeyCase_ = 1; + publicKey_ = value; + onChanged(); + return this; + } + + /** + *
+     * public key - optional since can also be retrieved via url
+     * 
+ * + * string local = 2 [json_name = "local"]; + * @return Whether the local field is set. + */ + @java.lang.Override + public boolean hasLocal() { + return publicKeyCase_ == 2; + } + /** + *
+     * public key - optional since can also be retrieved via url
+     * 
+ * + * string local = 2 [json_name = "local"]; + * @return The local. + */ + @java.lang.Override + public java.lang.String getLocal() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 2) { + ref = publicKey_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (publicKeyCase_ == 2) { + publicKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * public key - optional since can also be retrieved via url
+     * 
+ * + * string local = 2 [json_name = "local"]; + * @return The bytes for local. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocalBytes() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 2) { + ref = publicKey_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (publicKeyCase_ == 2) { + publicKey_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * public key - optional since can also be retrieved via url
+     * 
+ * + * string local = 2 [json_name = "local"]; + * @param value The local to set. + * @return This builder for chaining. + */ + public Builder setLocal( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + publicKeyCase_ = 2; + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+     * public key - optional since can also be retrieved via url
+     * 
+ * + * string local = 2 [json_name = "local"]; + * @return This builder for chaining. + */ + public Builder clearLocal() { + if (publicKeyCase_ == 2) { + publicKeyCase_ = 0; + publicKey_ = null; + onChanged(); + } + return this; + } + /** + *
+     * public key - optional since can also be retrieved via url
+     * 
+ * + * string local = 2 [json_name = "local"]; + * @param value The bytes for local to set. + * @return This builder for chaining. + */ + public Builder setLocalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + publicKeyCase_ = 2; + publicKey_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.PublicKey) + } + + // @@protoc_insertion_point(class_scope:kasregistry.PublicKey) + private static final io.opentdf.platform.kasregistry.PublicKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.PublicKey(); + } + + public static io.opentdf.platform.kasregistry.PublicKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublicKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKeyOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKeyOrBuilder.java new file mode 100644 index 00000000..547fa631 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKeyOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface PublicKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.PublicKey) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * kas public key url - optional since can also be retrieved via public key
+   * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return Whether the remote field is set. + */ + boolean hasRemote(); + /** + *
+   * kas public key url - optional since can also be retrieved via public key
+   * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return The remote. + */ + java.lang.String getRemote(); + /** + *
+   * kas public key url - optional since can also be retrieved via public key
+   * 
+ * + * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } + * @return The bytes for remote. + */ + com.google.protobuf.ByteString + getRemoteBytes(); + + /** + *
+   * public key - optional since can also be retrieved via url
+   * 
+ * + * string local = 2 [json_name = "local"]; + * @return Whether the local field is set. + */ + boolean hasLocal(); + /** + *
+   * public key - optional since can also be retrieved via url
+   * 
+ * + * string local = 2 [json_name = "local"]; + * @return The local. + */ + java.lang.String getLocal(); + /** + *
+   * public key - optional since can also be retrieved via url
+   * 
+ * + * string local = 2 [json_name = "local"]; + * @return The bytes for local. + */ + com.google.protobuf.ByteString + getLocalBytes(); + + io.opentdf.platform.kasregistry.PublicKey.PublicKeyCase getPublicKeyCase(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequest.java new file mode 100644 index 00000000..04117474 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequest.java @@ -0,0 +1,1226 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.UpdateKeyAccessServerRequest} + */ +public final class UpdateKeyAccessServerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.UpdateKeyAccessServerRequest) + UpdateKeyAccessServerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateKeyAccessServerRequest.newBuilder() to construct. + private UpdateKeyAccessServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateKeyAccessServerRequest() { + id_ = ""; + uri_ = ""; + metadataUpdateBehavior_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateKeyAccessServerRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 3; + private io.opentdf.platform.kasregistry.PublicKey publicKey_; + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return Whether the publicKey field is set. + */ + @java.lang.Override + public boolean hasPublicKey() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return The publicKey. + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPublicKey()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPublicKey()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(101, metadataUpdateBehavior_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest other = (io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUri() + .equals(other.getUri())) return false; + if (hasPublicKey() != other.hasPublicKey()) return false; + if (hasPublicKey()) { + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (hasPublicKey()) { + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.UpdateKeyAccessServerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.UpdateKeyAccessServerRequest) + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPublicKeyFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + uri_ = ""; + publicKey_ = null; + if (publicKeyBuilder_ != null) { + publicKeyBuilder_.dispose(); + publicKeyBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest build() { + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest buildPartial() { + io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest result = new io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.publicKey_ = publicKeyBuilder_ == null + ? publicKey_ + : publicKeyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest) { + return mergeFrom((io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest other) { + if (other == io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPublicKey()) { + mergePublicKey(other.getPublicKey()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getPublicKeyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 808 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.opentdf.platform.kasregistry.PublicKey publicKey_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> publicKeyBuilder_; + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return Whether the publicKey field is set. + */ + public boolean hasPublicKey() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return The publicKey. + */ + public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { + if (publicKeyBuilder_ == null) { + return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } else { + return publicKeyBuilder_.getMessage(); + } + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public Builder setPublicKey(io.opentdf.platform.kasregistry.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicKey_ = value; + } else { + publicKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public Builder setPublicKey( + io.opentdf.platform.kasregistry.PublicKey.Builder builderForValue) { + if (publicKeyBuilder_ == null) { + publicKey_ = builderForValue.build(); + } else { + publicKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public Builder mergePublicKey(io.opentdf.platform.kasregistry.PublicKey value) { + if (publicKeyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + publicKey_ != null && + publicKey_ != io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance()) { + getPublicKeyBuilder().mergeFrom(value); + } else { + publicKey_ = value; + } + } else { + publicKeyBuilder_.mergeFrom(value); + } + if (publicKey_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public Builder clearPublicKey() { + bitField0_ = (bitField0_ & ~0x00000004); + publicKey_ = null; + if (publicKeyBuilder_ != null) { + publicKeyBuilder_.dispose(); + publicKeyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.kasregistry.PublicKey.Builder getPublicKeyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPublicKeyFieldBuilder().getBuilder(); + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { + if (publicKeyBuilder_ != null) { + return publicKeyBuilder_.getMessageOrBuilder(); + } else { + return publicKey_ == null ? + io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; + } + } + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> + getPublicKeyFieldBuilder() { + if (publicKeyBuilder_ == null) { + publicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder>( + getPublicKey(), + getParentForChildren(), + isClean()); + publicKey_ = null; + } + return publicKeyBuilder_; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000010); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.UpdateKeyAccessServerRequest) + } + + // @@protoc_insertion_point(class_scope:kasregistry.UpdateKeyAccessServerRequest) + private static final io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest(); + } + + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateKeyAccessServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequestOrBuilder.java new file mode 100644 index 00000000..4b580450 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequestOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface UpdateKeyAccessServerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.UpdateKeyAccessServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The uri. + */ + java.lang.String getUri(); + /** + * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return Whether the publicKey field is set. + */ + boolean hasPublicKey(); + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + * @return The publicKey. + */ + io.opentdf.platform.kasregistry.PublicKey getPublicKey(); + /** + * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder(); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponse.java new file mode 100644 index 00000000..7b8e5153 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +/** + * Protobuf type {@code kasregistry.UpdateKeyAccessServerResponse} + */ +public final class UpdateKeyAccessServerResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:kasregistry.UpdateKeyAccessServerResponse) + UpdateKeyAccessServerResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateKeyAccessServerResponse.newBuilder() to construct. + private UpdateKeyAccessServerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateKeyAccessServerResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateKeyAccessServerResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.Builder.class); + } + + private int bitField0_; + public static final int KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + @java.lang.Override + public boolean hasKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse)) { + return super.equals(obj); + } + io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse other = (io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse) obj; + + if (hasKeyAccessServer() != other.hasKeyAccessServer()) return false; + if (hasKeyAccessServer()) { + if (!getKeyAccessServer() + .equals(other.getKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeyAccessServer()) { + hash = (37 * hash) + KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code kasregistry.UpdateKeyAccessServerResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:kasregistry.UpdateKeyAccessServerResponse) + io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.Builder.class); + } + + // Construct using io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyAccessServer_ = null; + if (keyAccessServerBuilder_ != null) { + keyAccessServerBuilder_.dispose(); + keyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse getDefaultInstanceForType() { + return io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse build() { + io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse buildPartial() { + io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse result = new io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyAccessServer_ = keyAccessServerBuilder_ == null + ? keyAccessServer_ + : keyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse) { + return mergeFrom((io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse other) { + if (other == io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.getDefaultInstance()) return this; + if (other.hasKeyAccessServer()) { + mergeKeyAccessServer(other.getKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServerBuilder_; + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + public boolean hasKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { + if (keyAccessServerBuilder_ == null) { + return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } else { + return keyAccessServerBuilder_.getMessage(); + } + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder setKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyAccessServer_ = value; + } else { + keyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder setKeyAccessServer( + io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (keyAccessServerBuilder_ == null) { + keyAccessServer_ = builderForValue.build(); + } else { + keyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder mergeKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (keyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + keyAccessServer_ != null && + keyAccessServer_ != io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) { + getKeyAccessServerBuilder().mergeFrom(value); + } else { + keyAccessServer_ = value; + } + } else { + keyAccessServerBuilder_.mergeFrom(value); + } + if (keyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public Builder clearKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + keyAccessServer_ = null; + if (keyAccessServerBuilder_ != null) { + keyAccessServerBuilder_.dispose(); + keyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { + if (keyAccessServerBuilder_ != null) { + return keyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return keyAccessServer_ == null ? + io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; + } + } + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> + getKeyAccessServerFieldBuilder() { + if (keyAccessServerBuilder_ == null) { + keyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( + getKeyAccessServer(), + getParentForChildren(), + isClean()); + keyAccessServer_ = null; + } + return keyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:kasregistry.UpdateKeyAccessServerResponse) + } + + // @@protoc_insertion_point(class_scope:kasregistry.UpdateKeyAccessServerResponse) + private static final io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse(); + } + + public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateKeyAccessServerResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponseOrBuilder.java new file mode 100644 index 00000000..fade5880 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: kasregistry/key_access_server_registry.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.kasregistry; + +public interface UpdateKeyAccessServerResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:kasregistry.UpdateKeyAccessServerResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return Whether the keyAccessServer field is set. + */ + boolean hasKeyAccessServer(); + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + * @return The keyAccessServer. + */ + io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer(); + /** + * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Action.java b/protocol/src/main/java/io/opentdf/platform/policy/Action.java new file mode 100644 index 00000000..1c06f794 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/Action.java @@ -0,0 +1,911 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ * An action an entity can take
+ * 
+ * + * Protobuf type {@code policy.Action} + */ +public final class Action extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.Action) + ActionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Action.newBuilder() to construct. + private Action(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Action() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Action(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Action.class, io.opentdf.platform.policy.Action.Builder.class); + } + + /** + *
+   * Standard actions supported by the platform
+   * 
+ * + * Protobuf enum {@code policy.Action.StandardAction} + */ + public enum StandardAction + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STANDARD_ACTION_UNSPECIFIED = 0; + */ + STANDARD_ACTION_UNSPECIFIED(0), + /** + * STANDARD_ACTION_DECRYPT = 1; + */ + STANDARD_ACTION_DECRYPT(1), + /** + * STANDARD_ACTION_TRANSMIT = 2; + */ + STANDARD_ACTION_TRANSMIT(2), + UNRECOGNIZED(-1), + ; + + /** + * STANDARD_ACTION_UNSPECIFIED = 0; + */ + public static final int STANDARD_ACTION_UNSPECIFIED_VALUE = 0; + /** + * STANDARD_ACTION_DECRYPT = 1; + */ + public static final int STANDARD_ACTION_DECRYPT_VALUE = 1; + /** + * STANDARD_ACTION_TRANSMIT = 2; + */ + public static final int STANDARD_ACTION_TRANSMIT_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StandardAction valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StandardAction forNumber(int value) { + switch (value) { + case 0: return STANDARD_ACTION_UNSPECIFIED; + case 1: return STANDARD_ACTION_DECRYPT; + case 2: return STANDARD_ACTION_TRANSMIT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + StandardAction> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StandardAction findValueByNumber(int number) { + return StandardAction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.opentdf.platform.policy.Action.getDescriptor().getEnumTypes().get(0); + } + + private static final StandardAction[] VALUES = values(); + + public static StandardAction valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StandardAction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:policy.Action.StandardAction) + } + + private int valueCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object value_; + public enum ValueCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STANDARD(1), + CUSTOM(2), + VALUE_NOT_SET(0); + private final int value; + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 1: return STANDARD; + case 2: return CUSTOM; + case 0: return VALUE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public static final int STANDARD_FIELD_NUMBER = 1; + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return Whether the standard field is set. + */ + public boolean hasStandard() { + return valueCase_ == 1; + } + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return The enum numeric value on the wire for standard. + */ + public int getStandardValue() { + if (valueCase_ == 1) { + return (java.lang.Integer) value_; + } + return 0; + } + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return The standard. + */ + public io.opentdf.platform.policy.Action.StandardAction getStandard() { + if (valueCase_ == 1) { + io.opentdf.platform.policy.Action.StandardAction result = io.opentdf.platform.policy.Action.StandardAction.forNumber( + (java.lang.Integer) value_); + return result == null ? io.opentdf.platform.policy.Action.StandardAction.UNRECOGNIZED : result; + } + return io.opentdf.platform.policy.Action.StandardAction.STANDARD_ACTION_UNSPECIFIED; + } + + public static final int CUSTOM_FIELD_NUMBER = 2; + /** + * string custom = 2 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + public boolean hasCustom() { + return valueCase_ == 2; + } + /** + * string custom = 2 [json_name = "custom"]; + * @return The custom. + */ + public java.lang.String getCustom() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } + } + /** + * string custom = 2 [json_name = "custom"]; + * @return The bytes for custom. + */ + public com.google.protobuf.ByteString + getCustomBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) value_)); + } + if (valueCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, ((java.lang.Integer) value_)); + } + if (valueCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.Action)) { + return super.equals(obj); + } + io.opentdf.platform.policy.Action other = (io.opentdf.platform.policy.Action) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 1: + if (getStandardValue() + != other.getStandardValue()) return false; + break; + case 2: + if (!getCustom() + .equals(other.getCustom())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 1: + hash = (37 * hash) + STANDARD_FIELD_NUMBER; + hash = (53 * hash) + getStandardValue(); + break; + case 2: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.Action parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Action parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Action parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Action parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Action parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Action parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Action parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Action parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.Action parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.Action parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.Action parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Action parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.Action prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An action an entity can take
+   * 
+ * + * Protobuf type {@code policy.Action} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.Action) + io.opentdf.platform.policy.ActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Action.class, io.opentdf.platform.policy.Action.Builder.class); + } + + // Construct using io.opentdf.platform.policy.Action.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.Action getDefaultInstanceForType() { + return io.opentdf.platform.policy.Action.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.Action build() { + io.opentdf.platform.policy.Action result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.Action buildPartial() { + io.opentdf.platform.policy.Action result = new io.opentdf.platform.policy.Action(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.Action result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(io.opentdf.platform.policy.Action result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.Action) { + return mergeFrom((io.opentdf.platform.policy.Action)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.Action other) { + if (other == io.opentdf.platform.policy.Action.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case STANDARD: { + setStandardValue(other.getStandardValue()); + break; + } + case CUSTOM: { + valueCase_ = 2; + value_ = other.value_; + onChanged(); + break; + } + case VALUE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + valueCase_ = 1; + value_ = rawValue; + break; + } // case 8 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 2; + value_ = s; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int valueCase_ = 0; + private java.lang.Object value_; + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return Whether the standard field is set. + */ + @java.lang.Override + public boolean hasStandard() { + return valueCase_ == 1; + } + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return The enum numeric value on the wire for standard. + */ + @java.lang.Override + public int getStandardValue() { + if (valueCase_ == 1) { + return ((java.lang.Integer) value_).intValue(); + } + return 0; + } + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @param value The enum numeric value on the wire for standard to set. + * @return This builder for chaining. + */ + public Builder setStandardValue(int value) { + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return The standard. + */ + @java.lang.Override + public io.opentdf.platform.policy.Action.StandardAction getStandard() { + if (valueCase_ == 1) { + io.opentdf.platform.policy.Action.StandardAction result = io.opentdf.platform.policy.Action.StandardAction.forNumber( + (java.lang.Integer) value_); + return result == null ? io.opentdf.platform.policy.Action.StandardAction.UNRECOGNIZED : result; + } + return io.opentdf.platform.policy.Action.StandardAction.STANDARD_ACTION_UNSPECIFIED; + } + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @param value The standard to set. + * @return This builder for chaining. + */ + public Builder setStandard(io.opentdf.platform.policy.Action.StandardAction value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 1; + value_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return This builder for chaining. + */ + public Builder clearStandard() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * string custom = 2 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return valueCase_ == 2; + } + /** + * string custom = 2 [json_name = "custom"]; + * @return The custom. + */ + @java.lang.Override + public java.lang.String getCustom() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 2) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string custom = 2 [json_name = "custom"]; + * @return The bytes for custom. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCustomBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 2) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 2) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string custom = 2 [json_name = "custom"]; + * @param value The custom to set. + * @return This builder for chaining. + */ + public Builder setCustom( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * string custom = 2 [json_name = "custom"]; + * @return This builder for chaining. + */ + public Builder clearCustom() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + * string custom = 2 [json_name = "custom"]; + * @param value The bytes for custom to set. + * @return This builder for chaining. + */ + public Builder setCustomBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.Action) + } + + // @@protoc_insertion_point(class_scope:policy.Action) + private static final io.opentdf.platform.policy.Action DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.Action(); + } + + public static io.opentdf.platform.policy.Action getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Action parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.Action getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ActionOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ActionOrBuilder.java new file mode 100644 index 00000000..83802d19 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ActionOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface ActionOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.Action) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return Whether the standard field is set. + */ + boolean hasStandard(); + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return The enum numeric value on the wire for standard. + */ + int getStandardValue(); + /** + * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; + * @return The standard. + */ + io.opentdf.platform.policy.Action.StandardAction getStandard(); + + /** + * string custom = 2 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + boolean hasCustom(); + /** + * string custom = 2 [json_name = "custom"]; + * @return The custom. + */ + java.lang.String getCustom(); + /** + * string custom = 2 [json_name = "custom"]; + * @return The bytes for custom. + */ + com.google.protobuf.ByteString + getCustomBytes(); + + io.opentdf.platform.policy.Action.ValueCase getValueCase(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Attribute.java b/protocol/src/main/java/io/opentdf/platform/policy/Attribute.java new file mode 100644 index 00000000..a540bf70 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/Attribute.java @@ -0,0 +1,2377 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + * Protobuf type {@code policy.Attribute} + */ +public final class Attribute extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.Attribute) + AttributeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Attribute.newBuilder() to construct. + private Attribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Attribute() { + id_ = ""; + name_ = ""; + rule_ = 0; + values_ = java.util.Collections.emptyList(); + grants_ = java.util.Collections.emptyList(); + fqn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Attribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Attribute.class, io.opentdf.platform.policy.Attribute.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMESPACE_FIELD_NUMBER = 2; + private io.opentdf.platform.policy.Namespace namespace_; + /** + *
+   * namespace of the attribute
+   * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + @java.lang.Override + public boolean hasNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * namespace of the attribute
+   * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + * @return The namespace. + */ + @java.lang.Override + public io.opentdf.platform.policy.Namespace getNamespace() { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + /** + *
+   * namespace of the attribute
+   * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + + public static final int NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   *attribute name
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   *attribute name
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_FIELD_NUMBER = 4; + private int rule_ = 0; + /** + *
+   * attribute rule enum
+   * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for rule. + */ + @java.lang.Override public int getRuleValue() { + return rule_; + } + /** + *
+   * attribute rule enum
+   * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The rule. + */ + @java.lang.Override public io.opentdf.platform.policy.AttributeRuleTypeEnum getRule() { + io.opentdf.platform.policy.AttributeRuleTypeEnum result = io.opentdf.platform.policy.AttributeRuleTypeEnum.forNumber(rule_); + return result == null ? io.opentdf.platform.policy.AttributeRuleTypeEnum.UNRECOGNIZED : result; + } + + public static final int VALUES_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List values_; + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getValues(int index) { + return values_.get(index); + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + public static final int GRANTS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private java.util.List grants_; + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + @java.lang.Override + public java.util.List getGrantsList() { + return grants_; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + @java.lang.Override + public java.util.List + getGrantsOrBuilderList() { + return grants_; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + @java.lang.Override + public int getGrantsCount() { + return grants_.size(); + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index) { + return grants_.get(index); + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( + int index) { + return grants_.get(index); + } + + public static final int FQN_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object fqn_ = ""; + /** + * string fqn = 7 [json_name = "fqn"]; + * @return The fqn. + */ + @java.lang.Override + public java.lang.String getFqn() { + java.lang.Object ref = fqn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqn_ = s; + return s; + } + } + /** + * string fqn = 7 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFqnBytes() { + java.lang.Object ref = fqn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIVE_FIELD_NUMBER = 8; + private com.google.protobuf.BoolValue active_; + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + * @return Whether the active field is set. + */ + @java.lang.Override + public boolean hasActive() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + * @return The active. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getActive() { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.Metadata metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.Metadata getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getNamespace()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (rule_ != io.opentdf.platform.policy.AttributeRuleTypeEnum.ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(4, rule_); + } + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(5, values_.get(i)); + } + for (int i = 0; i < grants_.size(); i++) { + output.writeMessage(6, grants_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, fqn_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getActive()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNamespace()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (rule_ != io.opentdf.platform.policy.AttributeRuleTypeEnum.ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, rule_); + } + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, values_.get(i)); + } + for (int i = 0; i < grants_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, grants_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, fqn_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getActive()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.Attribute)) { + return super.equals(obj); + } + io.opentdf.platform.policy.Attribute other = (io.opentdf.platform.policy.Attribute) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasNamespace() != other.hasNamespace()) return false; + if (hasNamespace()) { + if (!getNamespace() + .equals(other.getNamespace())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (rule_ != other.rule_) return false; + if (!getValuesList() + .equals(other.getValuesList())) return false; + if (!getGrantsList() + .equals(other.getGrantsList())) return false; + if (!getFqn() + .equals(other.getFqn())) return false; + if (hasActive() != other.hasActive()) return false; + if (hasActive()) { + if (!getActive() + .equals(other.getActive())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasNamespace()) { + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RULE_FIELD_NUMBER; + hash = (53 * hash) + rule_; + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + if (getGrantsCount() > 0) { + hash = (37 * hash) + GRANTS_FIELD_NUMBER; + hash = (53 * hash) + getGrantsList().hashCode(); + } + hash = (37 * hash) + FQN_FIELD_NUMBER; + hash = (53 * hash) + getFqn().hashCode(); + if (hasActive()) { + hash = (37 * hash) + ACTIVE_FIELD_NUMBER; + hash = (53 * hash) + getActive().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.Attribute parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Attribute parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Attribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Attribute parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Attribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Attribute parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Attribute parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Attribute parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.Attribute parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.Attribute parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.Attribute parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Attribute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.Attribute prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.Attribute} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.Attribute) + io.opentdf.platform.policy.AttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Attribute.class, io.opentdf.platform.policy.Attribute.Builder.class); + } + + // Construct using io.opentdf.platform.policy.Attribute.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNamespaceFieldBuilder(); + getValuesFieldBuilder(); + getGrantsFieldBuilder(); + getActiveFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + namespace_ = null; + if (namespaceBuilder_ != null) { + namespaceBuilder_.dispose(); + namespaceBuilder_ = null; + } + name_ = ""; + rule_ = 0; + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (grantsBuilder_ == null) { + grants_ = java.util.Collections.emptyList(); + } else { + grants_ = null; + grantsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + fqn_ = ""; + active_ = null; + if (activeBuilder_ != null) { + activeBuilder_.dispose(); + activeBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.Attribute getDefaultInstanceForType() { + return io.opentdf.platform.policy.Attribute.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.Attribute build() { + io.opentdf.platform.policy.Attribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.Attribute buildPartial() { + io.opentdf.platform.policy.Attribute result = new io.opentdf.platform.policy.Attribute(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.Attribute result) { + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + if (grantsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + grants_ = java.util.Collections.unmodifiableList(grants_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.grants_ = grants_; + } else { + result.grants_ = grantsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.Attribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.namespace_ = namespaceBuilder_ == null + ? namespace_ + : namespaceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rule_ = rule_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.fqn_ = fqn_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.active_ = activeBuilder_ == null + ? active_ + : activeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.Attribute) { + return mergeFrom((io.opentdf.platform.policy.Attribute)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.Attribute other) { + if (other == io.opentdf.platform.policy.Attribute.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasNamespace()) { + mergeNamespace(other.getNamespace()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.rule_ != 0) { + setRuleValue(other.getRuleValue()); + } + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000010); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + if (grantsBuilder_ == null) { + if (!other.grants_.isEmpty()) { + if (grants_.isEmpty()) { + grants_ = other.grants_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureGrantsIsMutable(); + grants_.addAll(other.grants_); + } + onChanged(); + } + } else { + if (!other.grants_.isEmpty()) { + if (grantsBuilder_.isEmpty()) { + grantsBuilder_.dispose(); + grantsBuilder_ = null; + grants_ = other.grants_; + bitField0_ = (bitField0_ & ~0x00000020); + grantsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGrantsFieldBuilder() : null; + } else { + grantsBuilder_.addAllMessages(other.grants_); + } + } + } + if (!other.getFqn().isEmpty()) { + fqn_ = other.fqn_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasActive()) { + mergeActive(other.getActive()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getNamespaceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + rule_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + io.opentdf.platform.policy.Value m = + input.readMessage( + io.opentdf.platform.policy.Value.parser(), + extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + io.opentdf.platform.kasregistry.KeyAccessServer m = + input.readMessage( + io.opentdf.platform.kasregistry.KeyAccessServer.parser(), + extensionRegistry); + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.add(m); + } else { + grantsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: { + fqn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getActiveFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.Namespace namespace_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespaceBuilder_; + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + public boolean hasNamespace() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + * @return The namespace. + */ + public io.opentdf.platform.policy.Namespace getNamespace() { + if (namespaceBuilder_ == null) { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } else { + return namespaceBuilder_.getMessage(); + } + } + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + public Builder setNamespace(io.opentdf.platform.policy.Namespace value) { + if (namespaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + namespace_ = value; + } else { + namespaceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + public Builder setNamespace( + io.opentdf.platform.policy.Namespace.Builder builderForValue) { + if (namespaceBuilder_ == null) { + namespace_ = builderForValue.build(); + } else { + namespaceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + public Builder mergeNamespace(io.opentdf.platform.policy.Namespace value) { + if (namespaceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + namespace_ != null && + namespace_ != io.opentdf.platform.policy.Namespace.getDefaultInstance()) { + getNamespaceBuilder().mergeFrom(value); + } else { + namespace_ = value; + } + } else { + namespaceBuilder_.mergeFrom(value); + } + if (namespace_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + public Builder clearNamespace() { + bitField0_ = (bitField0_ & ~0x00000002); + namespace_ = null; + if (namespaceBuilder_ != null) { + namespaceBuilder_.dispose(); + namespaceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + public io.opentdf.platform.policy.Namespace.Builder getNamespaceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNamespaceFieldBuilder().getBuilder(); + } + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { + if (namespaceBuilder_ != null) { + return namespaceBuilder_.getMessageOrBuilder(); + } else { + return namespace_ == null ? + io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + } + /** + *
+     * namespace of the attribute
+     * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> + getNamespaceFieldBuilder() { + if (namespaceBuilder_ == null) { + namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( + getNamespace(), + getParentForChildren(), + isClean()); + namespace_ = null; + } + return namespaceBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     *attribute name
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     *attribute name
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     *attribute name
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     *attribute name
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     *attribute name
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int rule_ = 0; + /** + *
+     * attribute rule enum
+     * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for rule. + */ + @java.lang.Override public int getRuleValue() { + return rule_; + } + /** + *
+     * attribute rule enum
+     * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @param value The enum numeric value on the wire for rule to set. + * @return This builder for chaining. + */ + public Builder setRuleValue(int value) { + rule_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * attribute rule enum
+     * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The rule. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeRuleTypeEnum getRule() { + io.opentdf.platform.policy.AttributeRuleTypeEnum result = io.opentdf.platform.policy.AttributeRuleTypeEnum.forNumber(rule_); + return result == null ? io.opentdf.platform.policy.AttributeRuleTypeEnum.UNRECOGNIZED : result; + } + /** + *
+     * attribute rule enum
+     * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @param value The rule to set. + * @return This builder for chaining. + */ + public Builder setRule(io.opentdf.platform.policy.AttributeRuleTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + rule_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * attribute rule enum
+     * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearRule() { + bitField0_ = (bitField0_ & ~0x00000008); + rule_ = 0; + onChanged(); + return this; + } + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valuesBuilder_; + + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public io.opentdf.platform.policy.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder setValues( + int index, io.opentdf.platform.policy.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder setValues( + int index, io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder addValues(io.opentdf.platform.policy.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder addValues( + int index, io.opentdf.platform.policy.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder addValues( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder addValues( + int index, io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public io.opentdf.platform.policy.Value.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public io.opentdf.platform.policy.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + io.opentdf.platform.policy.Value.getDefaultInstance()); + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public io.opentdf.platform.policy.Value.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Value.getDefaultInstance()); + } + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + values_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + + private java.util.List grants_ = + java.util.Collections.emptyList(); + private void ensureGrantsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + grants_ = new java.util.ArrayList(grants_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> grantsBuilder_; + + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public java.util.List getGrantsList() { + if (grantsBuilder_ == null) { + return java.util.Collections.unmodifiableList(grants_); + } else { + return grantsBuilder_.getMessageList(); + } + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public int getGrantsCount() { + if (grantsBuilder_ == null) { + return grants_.size(); + } else { + return grantsBuilder_.getCount(); + } + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index) { + if (grantsBuilder_ == null) { + return grants_.get(index); + } else { + return grantsBuilder_.getMessage(index); + } + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder setGrants( + int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (grantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGrantsIsMutable(); + grants_.set(index, value); + onChanged(); + } else { + grantsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder setGrants( + int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.set(index, builderForValue.build()); + onChanged(); + } else { + grantsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder addGrants(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (grantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGrantsIsMutable(); + grants_.add(value); + onChanged(); + } else { + grantsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder addGrants( + int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (grantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGrantsIsMutable(); + grants_.add(index, value); + onChanged(); + } else { + grantsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder addGrants( + io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.add(builderForValue.build()); + onChanged(); + } else { + grantsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder addGrants( + int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.add(index, builderForValue.build()); + onChanged(); + } else { + grantsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder addAllGrants( + java.lang.Iterable values) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, grants_); + onChanged(); + } else { + grantsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder clearGrants() { + if (grantsBuilder_ == null) { + grants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + grantsBuilder_.clear(); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public Builder removeGrants(int index) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.remove(index); + onChanged(); + } else { + grantsBuilder_.remove(index); + } + return this; + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getGrantsBuilder( + int index) { + return getGrantsFieldBuilder().getBuilder(index); + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( + int index) { + if (grantsBuilder_ == null) { + return grants_.get(index); } else { + return grantsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public java.util.List + getGrantsOrBuilderList() { + if (grantsBuilder_ != null) { + return grantsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(grants_); + } + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addGrantsBuilder() { + return getGrantsFieldBuilder().addBuilder( + io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addGrantsBuilder( + int index) { + return getGrantsFieldBuilder().addBuilder( + index, io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); + } + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + public java.util.List + getGrantsBuilderList() { + return getGrantsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> + getGrantsFieldBuilder() { + if (grantsBuilder_ == null) { + grantsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( + grants_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + grants_ = null; + } + return grantsBuilder_; + } + + private java.lang.Object fqn_ = ""; + /** + * string fqn = 7 [json_name = "fqn"]; + * @return The fqn. + */ + public java.lang.String getFqn() { + java.lang.Object ref = fqn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string fqn = 7 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + public com.google.protobuf.ByteString + getFqnBytes() { + java.lang.Object ref = fqn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string fqn = 7 [json_name = "fqn"]; + * @param value The fqn to set. + * @return This builder for chaining. + */ + public Builder setFqn( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fqn_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * string fqn = 7 [json_name = "fqn"]; + * @return This builder for chaining. + */ + public Builder clearFqn() { + fqn_ = getDefaultInstance().getFqn(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * string fqn = 7 [json_name = "fqn"]; + * @param value The bytes for fqn to set. + * @return This builder for chaining. + */ + public Builder setFqnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fqn_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue active_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> activeBuilder_; + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + * @return Whether the active field is set. + */ + public boolean hasActive() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + * @return The active. + */ + public com.google.protobuf.BoolValue getActive() { + if (activeBuilder_ == null) { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } else { + return activeBuilder_.getMessage(); + } + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + public Builder setActive(com.google.protobuf.BoolValue value) { + if (activeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + active_ = value; + } else { + activeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + public Builder setActive( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (activeBuilder_ == null) { + active_ = builderForValue.build(); + } else { + activeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + public Builder mergeActive(com.google.protobuf.BoolValue value) { + if (activeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + active_ != null && + active_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getActiveBuilder().mergeFrom(value); + } else { + active_ = value; + } + } else { + activeBuilder_.mergeFrom(value); + } + if (active_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + public Builder clearActive() { + bitField0_ = (bitField0_ & ~0x00000080); + active_ = null; + if (activeBuilder_ != null) { + activeBuilder_.dispose(); + activeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + public com.google.protobuf.BoolValue.Builder getActiveBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getActiveFieldBuilder().getBuilder(); + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { + if (activeBuilder_ != null) { + return activeBuilder_.getMessageOrBuilder(); + } else { + return active_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getActiveFieldBuilder() { + if (activeBuilder_ == null) { + activeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getActive(), + getParentForChildren(), + isClean()); + active_ = null; + } + return activeBuilder_; + } + + private io.opentdf.platform.common.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000100); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.Attribute) + } + + // @@protoc_insertion_point(class_scope:policy.Attribute) + private static final io.opentdf.platform.policy.Attribute DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.Attribute(); + } + + public static io.opentdf.platform.policy.Attribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Attribute parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.Attribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelector.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelector.java new file mode 100644 index 00000000..d35cba01 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelector.java @@ -0,0 +1,1871 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/selectors.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + * Protobuf type {@code policy.AttributeDefinitionSelector} + */ +public final class AttributeDefinitionSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeDefinitionSelector) + AttributeDefinitionSelectorOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttributeDefinitionSelector.newBuilder() to construct. + private AttributeDefinitionSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttributeDefinitionSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttributeDefinitionSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeDefinitionSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.Builder.class); + } + + public interface NamespaceSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeDefinitionSelector.NamespaceSelector) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code policy.AttributeDefinitionSelector.NamespaceSelector} + */ + public static final class NamespaceSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeDefinitionSelector.NamespaceSelector) + NamespaceSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use NamespaceSelector.newBuilder() to construct. + private NamespaceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NamespaceSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NamespaceSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector other = (io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeDefinitionSelector.NamespaceSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeDefinitionSelector.NamespaceSelector) + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector build() { + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector buildPartial() { + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector result = new io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector other) { + if (other == io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeDefinitionSelector.NamespaceSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeDefinitionSelector.NamespaceSelector) + private static final io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector(); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NamespaceSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ValueSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeDefinitionSelector.ValueSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + boolean getWithKeyAccessGrants(); + + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + boolean getWithSubjectMaps(); + + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + boolean getWithResourceMaps(); + } + /** + * Protobuf type {@code policy.AttributeDefinitionSelector.ValueSelector} + */ + public static final class ValueSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeDefinitionSelector.ValueSelector) + ValueSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValueSelector.newBuilder() to construct. + private ValueSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ValueSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ValueSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder.class); + } + + public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; + private boolean withKeyAccessGrants_ = false; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + + public static final int WITH_SUBJECT_MAPS_FIELD_NUMBER = 2; + private boolean withSubjectMaps_ = false; + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + @java.lang.Override + public boolean getWithSubjectMaps() { + return withSubjectMaps_; + } + + public static final int WITH_RESOURCE_MAPS_FIELD_NUMBER = 3; + private boolean withResourceMaps_ = false; + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + @java.lang.Override + public boolean getWithResourceMaps() { + return withResourceMaps_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (withKeyAccessGrants_ != false) { + output.writeBool(1, withKeyAccessGrants_); + } + if (withSubjectMaps_ != false) { + output.writeBool(2, withSubjectMaps_); + } + if (withResourceMaps_ != false) { + output.writeBool(3, withResourceMaps_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (withKeyAccessGrants_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, withKeyAccessGrants_); + } + if (withSubjectMaps_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, withSubjectMaps_); + } + if (withResourceMaps_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, withResourceMaps_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector other = (io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector) obj; + + if (getWithKeyAccessGrants() + != other.getWithKeyAccessGrants()) return false; + if (getWithSubjectMaps() + != other.getWithSubjectMaps()) return false; + if (getWithResourceMaps() + != other.getWithResourceMaps()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithKeyAccessGrants()); + hash = (37 * hash) + WITH_SUBJECT_MAPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithSubjectMaps()); + hash = (37 * hash) + WITH_RESOURCE_MAPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithResourceMaps()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeDefinitionSelector.ValueSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeDefinitionSelector.ValueSelector) + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + withKeyAccessGrants_ = false; + withSubjectMaps_ = false; + withResourceMaps_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector build() { + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector buildPartial() { + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector result = new io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.withKeyAccessGrants_ = withKeyAccessGrants_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withSubjectMaps_ = withSubjectMaps_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.withResourceMaps_ = withResourceMaps_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector other) { + if (other == io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance()) return this; + if (other.getWithKeyAccessGrants() != false) { + setWithKeyAccessGrants(other.getWithKeyAccessGrants()); + } + if (other.getWithSubjectMaps() != false) { + setWithSubjectMaps(other.getWithSubjectMaps()); + } + if (other.getWithResourceMaps() != false) { + setWithResourceMaps(other.getWithResourceMaps()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + withKeyAccessGrants_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + withSubjectMaps_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + withResourceMaps_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean withKeyAccessGrants_ ; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @param value The withKeyAccessGrants to set. + * @return This builder for chaining. + */ + public Builder setWithKeyAccessGrants(boolean value) { + + withKeyAccessGrants_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return This builder for chaining. + */ + public Builder clearWithKeyAccessGrants() { + bitField0_ = (bitField0_ & ~0x00000001); + withKeyAccessGrants_ = false; + onChanged(); + return this; + } + + private boolean withSubjectMaps_ ; + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + @java.lang.Override + public boolean getWithSubjectMaps() { + return withSubjectMaps_; + } + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @param value The withSubjectMaps to set. + * @return This builder for chaining. + */ + public Builder setWithSubjectMaps(boolean value) { + + withSubjectMaps_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return This builder for chaining. + */ + public Builder clearWithSubjectMaps() { + bitField0_ = (bitField0_ & ~0x00000002); + withSubjectMaps_ = false; + onChanged(); + return this; + } + + private boolean withResourceMaps_ ; + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + @java.lang.Override + public boolean getWithResourceMaps() { + return withResourceMaps_; + } + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @param value The withResourceMaps to set. + * @return This builder for chaining. + */ + public Builder setWithResourceMaps(boolean value) { + + withResourceMaps_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return This builder for chaining. + */ + public Builder clearWithResourceMaps() { + bitField0_ = (bitField0_ & ~0x00000004); + withResourceMaps_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeDefinitionSelector.ValueSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeDefinitionSelector.ValueSelector) + private static final io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector(); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValueSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; + private boolean withKeyAccessGrants_ = false; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + + public static final int WITH_NAMESPACE_FIELD_NUMBER = 10; + private io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector withNamespace_; + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return Whether the withNamespace field is set. + */ + @java.lang.Override + public boolean hasWithNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return The withNamespace. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getWithNamespace() { + return withNamespace_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder() { + return withNamespace_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; + } + + public static final int WITH_VALUES_FIELD_NUMBER = 11; + private io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector withValues_; + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + * @return Whether the withValues field is set. + */ + @java.lang.Override + public boolean hasWithValues() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + * @return The withValues. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getWithValues() { + return withValues_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance() : withValues_; + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder getWithValuesOrBuilder() { + return withValues_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance() : withValues_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (withKeyAccessGrants_ != false) { + output.writeBool(1, withKeyAccessGrants_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(10, getWithNamespace()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(11, getWithValues()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (withKeyAccessGrants_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, withKeyAccessGrants_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getWithNamespace()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getWithValues()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeDefinitionSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeDefinitionSelector other = (io.opentdf.platform.policy.AttributeDefinitionSelector) obj; + + if (getWithKeyAccessGrants() + != other.getWithKeyAccessGrants()) return false; + if (hasWithNamespace() != other.hasWithNamespace()) return false; + if (hasWithNamespace()) { + if (!getWithNamespace() + .equals(other.getWithNamespace())) return false; + } + if (hasWithValues() != other.hasWithValues()) return false; + if (hasWithValues()) { + if (!getWithValues() + .equals(other.getWithValues())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithKeyAccessGrants()); + if (hasWithNamespace()) { + hash = (37 * hash) + WITH_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getWithNamespace().hashCode(); + } + if (hasWithValues()) { + hash = (37 * hash) + WITH_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getWithValues().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeDefinitionSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeDefinitionSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeDefinitionSelector) + io.opentdf.platform.policy.AttributeDefinitionSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeDefinitionSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeDefinitionSelector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWithNamespaceFieldBuilder(); + getWithValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + withKeyAccessGrants_ = false; + withNamespace_ = null; + if (withNamespaceBuilder_ != null) { + withNamespaceBuilder_.dispose(); + withNamespaceBuilder_ = null; + } + withValues_ = null; + if (withValuesBuilder_ != null) { + withValuesBuilder_.dispose(); + withValuesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeDefinitionSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector build() { + io.opentdf.platform.policy.AttributeDefinitionSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector buildPartial() { + io.opentdf.platform.policy.AttributeDefinitionSelector result = new io.opentdf.platform.policy.AttributeDefinitionSelector(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.AttributeDefinitionSelector result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.withKeyAccessGrants_ = withKeyAccessGrants_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withNamespace_ = withNamespaceBuilder_ == null + ? withNamespace_ + : withNamespaceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.withValues_ = withValuesBuilder_ == null + ? withValues_ + : withValuesBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeDefinitionSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeDefinitionSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeDefinitionSelector other) { + if (other == io.opentdf.platform.policy.AttributeDefinitionSelector.getDefaultInstance()) return this; + if (other.getWithKeyAccessGrants() != false) { + setWithKeyAccessGrants(other.getWithKeyAccessGrants()); + } + if (other.hasWithNamespace()) { + mergeWithNamespace(other.getWithNamespace()); + } + if (other.hasWithValues()) { + mergeWithValues(other.getWithValues()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + withKeyAccessGrants_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 82: { + input.readMessage( + getWithNamespaceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 82 + case 90: { + input.readMessage( + getWithValuesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 90 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean withKeyAccessGrants_ ; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @param value The withKeyAccessGrants to set. + * @return This builder for chaining. + */ + public Builder setWithKeyAccessGrants(boolean value) { + + withKeyAccessGrants_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return This builder for chaining. + */ + public Builder clearWithKeyAccessGrants() { + bitField0_ = (bitField0_ & ~0x00000001); + withKeyAccessGrants_ = false; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector withNamespace_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder> withNamespaceBuilder_; + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return Whether the withNamespace field is set. + */ + public boolean hasWithNamespace() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return The withNamespace. + */ + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getWithNamespace() { + if (withNamespaceBuilder_ == null) { + return withNamespace_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; + } else { + return withNamespaceBuilder_.getMessage(); + } + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public Builder setWithNamespace(io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector value) { + if (withNamespaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + withNamespace_ = value; + } else { + withNamespaceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public Builder setWithNamespace( + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder builderForValue) { + if (withNamespaceBuilder_ == null) { + withNamespace_ = builderForValue.build(); + } else { + withNamespaceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public Builder mergeWithNamespace(io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector value) { + if (withNamespaceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + withNamespace_ != null && + withNamespace_ != io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance()) { + getWithNamespaceBuilder().mergeFrom(value); + } else { + withNamespace_ = value; + } + } else { + withNamespaceBuilder_.mergeFrom(value); + } + if (withNamespace_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public Builder clearWithNamespace() { + bitField0_ = (bitField0_ & ~0x00000002); + withNamespace_ = null; + if (withNamespaceBuilder_ != null) { + withNamespaceBuilder_.dispose(); + withNamespaceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder getWithNamespaceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWithNamespaceFieldBuilder().getBuilder(); + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder() { + if (withNamespaceBuilder_ != null) { + return withNamespaceBuilder_.getMessageOrBuilder(); + } else { + return withNamespace_ == null ? + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; + } + } + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder> + getWithNamespaceFieldBuilder() { + if (withNamespaceBuilder_ == null) { + withNamespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder>( + getWithNamespace(), + getParentForChildren(), + isClean()); + withNamespace_ = null; + } + return withNamespaceBuilder_; + } + + private io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector withValues_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder> withValuesBuilder_; + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + * @return Whether the withValues field is set. + */ + public boolean hasWithValues() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + * @return The withValues. + */ + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getWithValues() { + if (withValuesBuilder_ == null) { + return withValues_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance() : withValues_; + } else { + return withValuesBuilder_.getMessage(); + } + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + public Builder setWithValues(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector value) { + if (withValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + withValues_ = value; + } else { + withValuesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + public Builder setWithValues( + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder builderForValue) { + if (withValuesBuilder_ == null) { + withValues_ = builderForValue.build(); + } else { + withValuesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + public Builder mergeWithValues(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector value) { + if (withValuesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + withValues_ != null && + withValues_ != io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance()) { + getWithValuesBuilder().mergeFrom(value); + } else { + withValues_ = value; + } + } else { + withValuesBuilder_.mergeFrom(value); + } + if (withValues_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + public Builder clearWithValues() { + bitField0_ = (bitField0_ & ~0x00000004); + withValues_ = null; + if (withValuesBuilder_ != null) { + withValuesBuilder_.dispose(); + withValuesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder getWithValuesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getWithValuesFieldBuilder().getBuilder(); + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder getWithValuesOrBuilder() { + if (withValuesBuilder_ != null) { + return withValuesBuilder_.getMessageOrBuilder(); + } else { + return withValues_ == null ? + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance() : withValues_; + } + } + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder> + getWithValuesFieldBuilder() { + if (withValuesBuilder_ == null) { + withValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder>( + getWithValues(), + getParentForChildren(), + isClean()); + withValues_ = null; + } + return withValuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeDefinitionSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeDefinitionSelector) + private static final io.opentdf.platform.policy.AttributeDefinitionSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeDefinitionSelector(); + } + + public static io.opentdf.platform.policy.AttributeDefinitionSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeDefinitionSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeDefinitionSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelectorOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelectorOrBuilder.java new file mode 100644 index 00000000..6c9839be --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelectorOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/selectors.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface AttributeDefinitionSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeDefinitionSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + boolean getWithKeyAccessGrants(); + + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return Whether the withNamespace field is set. + */ + boolean hasWithNamespace(); + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return The withNamespace. + */ + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getWithNamespace(); + /** + * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder(); + + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + * @return Whether the withValues field is set. + */ + boolean hasWithValues(); + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + * @return The withValues. + */ + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getWithValues(); + /** + * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; + */ + io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder getWithValuesOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelector.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelector.java new file mode 100644 index 00000000..50315346 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelector.java @@ -0,0 +1,1907 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/selectors.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + * Protobuf type {@code policy.AttributeNamespaceSelector} + */ +public final class AttributeNamespaceSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeNamespaceSelector) + AttributeNamespaceSelectorOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttributeNamespaceSelector.newBuilder() to construct. + private AttributeNamespaceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttributeNamespaceSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttributeNamespaceSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeNamespaceSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.Builder.class); + } + + public interface AttributeSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeNamespaceSelector.AttributeSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + boolean getWithKeyAccessGrants(); + + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + * @return Whether the withValues field is set. + */ + boolean hasWithValues(); + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + * @return The withValues. + */ + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getWithValues(); + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder getWithValuesOrBuilder(); + } + /** + * Protobuf type {@code policy.AttributeNamespaceSelector.AttributeSelector} + */ + public static final class AttributeSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeNamespaceSelector.AttributeSelector) + AttributeSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttributeSelector.newBuilder() to construct. + private AttributeSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttributeSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttributeSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder.class); + } + + public interface ValueSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + boolean getWithKeyAccessGrants(); + + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + boolean getWithSubjectMaps(); + + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + boolean getWithResourceMaps(); + } + /** + * Protobuf type {@code policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector} + */ + public static final class ValueSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) + ValueSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValueSelector.newBuilder() to construct. + private ValueSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ValueSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ValueSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder.class); + } + + public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; + private boolean withKeyAccessGrants_ = false; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + + public static final int WITH_SUBJECT_MAPS_FIELD_NUMBER = 2; + private boolean withSubjectMaps_ = false; + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + @java.lang.Override + public boolean getWithSubjectMaps() { + return withSubjectMaps_; + } + + public static final int WITH_RESOURCE_MAPS_FIELD_NUMBER = 3; + private boolean withResourceMaps_ = false; + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + @java.lang.Override + public boolean getWithResourceMaps() { + return withResourceMaps_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (withKeyAccessGrants_ != false) { + output.writeBool(1, withKeyAccessGrants_); + } + if (withSubjectMaps_ != false) { + output.writeBool(2, withSubjectMaps_); + } + if (withResourceMaps_ != false) { + output.writeBool(3, withResourceMaps_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (withKeyAccessGrants_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, withKeyAccessGrants_); + } + if (withSubjectMaps_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, withSubjectMaps_); + } + if (withResourceMaps_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, withResourceMaps_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector other = (io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) obj; + + if (getWithKeyAccessGrants() + != other.getWithKeyAccessGrants()) return false; + if (getWithSubjectMaps() + != other.getWithSubjectMaps()) return false; + if (getWithResourceMaps() + != other.getWithResourceMaps()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithKeyAccessGrants()); + hash = (37 * hash) + WITH_SUBJECT_MAPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithSubjectMaps()); + hash = (37 * hash) + WITH_RESOURCE_MAPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithResourceMaps()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + withKeyAccessGrants_ = false; + withSubjectMaps_ = false; + withResourceMaps_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector build() { + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector buildPartial() { + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector result = new io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.withKeyAccessGrants_ = withKeyAccessGrants_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withSubjectMaps_ = withSubjectMaps_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.withResourceMaps_ = withResourceMaps_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector other) { + if (other == io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance()) return this; + if (other.getWithKeyAccessGrants() != false) { + setWithKeyAccessGrants(other.getWithKeyAccessGrants()); + } + if (other.getWithSubjectMaps() != false) { + setWithSubjectMaps(other.getWithSubjectMaps()); + } + if (other.getWithResourceMaps() != false) { + setWithResourceMaps(other.getWithResourceMaps()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + withKeyAccessGrants_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + withSubjectMaps_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + withResourceMaps_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean withKeyAccessGrants_ ; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @param value The withKeyAccessGrants to set. + * @return This builder for chaining. + */ + public Builder setWithKeyAccessGrants(boolean value) { + + withKeyAccessGrants_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return This builder for chaining. + */ + public Builder clearWithKeyAccessGrants() { + bitField0_ = (bitField0_ & ~0x00000001); + withKeyAccessGrants_ = false; + onChanged(); + return this; + } + + private boolean withSubjectMaps_ ; + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + @java.lang.Override + public boolean getWithSubjectMaps() { + return withSubjectMaps_; + } + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @param value The withSubjectMaps to set. + * @return This builder for chaining. + */ + public Builder setWithSubjectMaps(boolean value) { + + withSubjectMaps_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return This builder for chaining. + */ + public Builder clearWithSubjectMaps() { + bitField0_ = (bitField0_ & ~0x00000002); + withSubjectMaps_ = false; + onChanged(); + return this; + } + + private boolean withResourceMaps_ ; + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + @java.lang.Override + public boolean getWithResourceMaps() { + return withResourceMaps_; + } + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @param value The withResourceMaps to set. + * @return This builder for chaining. + */ + public Builder setWithResourceMaps(boolean value) { + + withResourceMaps_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return This builder for chaining. + */ + public Builder clearWithResourceMaps() { + bitField0_ = (bitField0_ & ~0x00000004); + withResourceMaps_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) + private static final io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector(); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValueSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; + private boolean withKeyAccessGrants_ = false; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + + public static final int WITH_VALUES_FIELD_NUMBER = 10; + private io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector withValues_; + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + * @return Whether the withValues field is set. + */ + @java.lang.Override + public boolean hasWithValues() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + * @return The withValues. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getWithValues() { + return withValues_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance() : withValues_; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder getWithValuesOrBuilder() { + return withValues_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance() : withValues_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (withKeyAccessGrants_ != false) { + output.writeBool(1, withKeyAccessGrants_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(10, getWithValues()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (withKeyAccessGrants_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, withKeyAccessGrants_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getWithValues()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector other = (io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector) obj; + + if (getWithKeyAccessGrants() + != other.getWithKeyAccessGrants()) return false; + if (hasWithValues() != other.hasWithValues()) return false; + if (hasWithValues()) { + if (!getWithValues() + .equals(other.getWithValues())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithKeyAccessGrants()); + if (hasWithValues()) { + hash = (37 * hash) + WITH_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getWithValues().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeNamespaceSelector.AttributeSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeNamespaceSelector.AttributeSelector) + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWithValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + withKeyAccessGrants_ = false; + withValues_ = null; + if (withValuesBuilder_ != null) { + withValuesBuilder_.dispose(); + withValuesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector build() { + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector buildPartial() { + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector result = new io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.withKeyAccessGrants_ = withKeyAccessGrants_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withValues_ = withValuesBuilder_ == null + ? withValues_ + : withValuesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector other) { + if (other == io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance()) return this; + if (other.getWithKeyAccessGrants() != false) { + setWithKeyAccessGrants(other.getWithKeyAccessGrants()); + } + if (other.hasWithValues()) { + mergeWithValues(other.getWithValues()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + withKeyAccessGrants_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 82: { + input.readMessage( + getWithValuesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean withKeyAccessGrants_ ; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @param value The withKeyAccessGrants to set. + * @return This builder for chaining. + */ + public Builder setWithKeyAccessGrants(boolean value) { + + withKeyAccessGrants_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return This builder for chaining. + */ + public Builder clearWithKeyAccessGrants() { + bitField0_ = (bitField0_ & ~0x00000001); + withKeyAccessGrants_ = false; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector withValues_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder> withValuesBuilder_; + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + * @return Whether the withValues field is set. + */ + public boolean hasWithValues() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + * @return The withValues. + */ + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getWithValues() { + if (withValuesBuilder_ == null) { + return withValues_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance() : withValues_; + } else { + return withValuesBuilder_.getMessage(); + } + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + public Builder setWithValues(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector value) { + if (withValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + withValues_ = value; + } else { + withValuesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + public Builder setWithValues( + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder builderForValue) { + if (withValuesBuilder_ == null) { + withValues_ = builderForValue.build(); + } else { + withValuesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + public Builder mergeWithValues(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector value) { + if (withValuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + withValues_ != null && + withValues_ != io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance()) { + getWithValuesBuilder().mergeFrom(value); + } else { + withValues_ = value; + } + } else { + withValuesBuilder_.mergeFrom(value); + } + if (withValues_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + public Builder clearWithValues() { + bitField0_ = (bitField0_ & ~0x00000002); + withValues_ = null; + if (withValuesBuilder_ != null) { + withValuesBuilder_.dispose(); + withValuesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder getWithValuesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWithValuesFieldBuilder().getBuilder(); + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder getWithValuesOrBuilder() { + if (withValuesBuilder_ != null) { + return withValuesBuilder_.getMessageOrBuilder(); + } else { + return withValues_ == null ? + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance() : withValues_; + } + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder> + getWithValuesFieldBuilder() { + if (withValuesBuilder_ == null) { + withValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder>( + getWithValues(), + getParentForChildren(), + isClean()); + withValues_ = null; + } + return withValuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeNamespaceSelector.AttributeSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeNamespaceSelector.AttributeSelector) + private static final io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector(); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int WITH_ATTRIBUTES_FIELD_NUMBER = 10; + private io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector withAttributes_; + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + * @return Whether the withAttributes field is set. + */ + @java.lang.Override + public boolean hasWithAttributes() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + * @return The withAttributes. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getWithAttributes() { + return withAttributes_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance() : withAttributes_; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder getWithAttributesOrBuilder() { + return withAttributes_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance() : withAttributes_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(10, getWithAttributes()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getWithAttributes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeNamespaceSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeNamespaceSelector other = (io.opentdf.platform.policy.AttributeNamespaceSelector) obj; + + if (hasWithAttributes() != other.hasWithAttributes()) return false; + if (hasWithAttributes()) { + if (!getWithAttributes() + .equals(other.getWithAttributes())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasWithAttributes()) { + hash = (37 * hash) + WITH_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getWithAttributes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeNamespaceSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeNamespaceSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeNamespaceSelector) + io.opentdf.platform.policy.AttributeNamespaceSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeNamespaceSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeNamespaceSelector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWithAttributesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + withAttributes_ = null; + if (withAttributesBuilder_ != null) { + withAttributesBuilder_.dispose(); + withAttributesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeNamespaceSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector build() { + io.opentdf.platform.policy.AttributeNamespaceSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector buildPartial() { + io.opentdf.platform.policy.AttributeNamespaceSelector result = new io.opentdf.platform.policy.AttributeNamespaceSelector(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.AttributeNamespaceSelector result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.withAttributes_ = withAttributesBuilder_ == null + ? withAttributes_ + : withAttributesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeNamespaceSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeNamespaceSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeNamespaceSelector other) { + if (other == io.opentdf.platform.policy.AttributeNamespaceSelector.getDefaultInstance()) return this; + if (other.hasWithAttributes()) { + mergeWithAttributes(other.getWithAttributes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 82: { + input.readMessage( + getWithAttributesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector withAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder> withAttributesBuilder_; + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + * @return Whether the withAttributes field is set. + */ + public boolean hasWithAttributes() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + * @return The withAttributes. + */ + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getWithAttributes() { + if (withAttributesBuilder_ == null) { + return withAttributes_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance() : withAttributes_; + } else { + return withAttributesBuilder_.getMessage(); + } + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + public Builder setWithAttributes(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector value) { + if (withAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + withAttributes_ = value; + } else { + withAttributesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + public Builder setWithAttributes( + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder builderForValue) { + if (withAttributesBuilder_ == null) { + withAttributes_ = builderForValue.build(); + } else { + withAttributesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + public Builder mergeWithAttributes(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector value) { + if (withAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + withAttributes_ != null && + withAttributes_ != io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance()) { + getWithAttributesBuilder().mergeFrom(value); + } else { + withAttributes_ = value; + } + } else { + withAttributesBuilder_.mergeFrom(value); + } + if (withAttributes_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + public Builder clearWithAttributes() { + bitField0_ = (bitField0_ & ~0x00000001); + withAttributes_ = null; + if (withAttributesBuilder_ != null) { + withAttributesBuilder_.dispose(); + withAttributesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder getWithAttributesBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getWithAttributesFieldBuilder().getBuilder(); + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder getWithAttributesOrBuilder() { + if (withAttributesBuilder_ != null) { + return withAttributesBuilder_.getMessageOrBuilder(); + } else { + return withAttributes_ == null ? + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance() : withAttributes_; + } + } + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder> + getWithAttributesFieldBuilder() { + if (withAttributesBuilder_ == null) { + withAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder>( + getWithAttributes(), + getParentForChildren(), + isClean()); + withAttributes_ = null; + } + return withAttributesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeNamespaceSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeNamespaceSelector) + private static final io.opentdf.platform.policy.AttributeNamespaceSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeNamespaceSelector(); + } + + public static io.opentdf.platform.policy.AttributeNamespaceSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeNamespaceSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeNamespaceSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelectorOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelectorOrBuilder.java new file mode 100644 index 00000000..b6415c0f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelectorOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/selectors.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface AttributeNamespaceSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeNamespaceSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + * @return Whether the withAttributes field is set. + */ + boolean hasWithAttributes(); + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + * @return The withAttributes. + */ + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getWithAttributes(); + /** + * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; + */ + io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder getWithAttributesOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeOrBuilder.java new file mode 100644 index 00000000..11eb3572 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/AttributeOrBuilder.java @@ -0,0 +1,202 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface AttributeOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.Attribute) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * namespace of the attribute
+   * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + boolean hasNamespace(); + /** + *
+   * namespace of the attribute
+   * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + * @return The namespace. + */ + io.opentdf.platform.policy.Namespace getNamespace(); + /** + *
+   * namespace of the attribute
+   * 
+ * + * .policy.Namespace namespace = 2 [json_name = "namespace"]; + */ + io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder(); + + /** + *
+   *attribute name
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   *attribute name
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * attribute rule enum
+   * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for rule. + */ + int getRuleValue(); + /** + *
+   * attribute rule enum
+   * 
+ * + * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The rule. + */ + io.opentdf.platform.policy.AttributeRuleTypeEnum getRule(); + + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + java.util.List + getValuesList(); + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + io.opentdf.platform.policy.Value getValues(int index); + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + int getValuesCount(); + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + java.util.List + getValuesOrBuilderList(); + /** + * repeated .policy.Value values = 5 [json_name = "values"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( + int index); + + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + java.util.List + getGrantsList(); + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index); + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + int getGrantsCount(); + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + java.util.List + getGrantsOrBuilderList(); + /** + * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( + int index); + + /** + * string fqn = 7 [json_name = "fqn"]; + * @return The fqn. + */ + java.lang.String getFqn(); + /** + * string fqn = 7 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + com.google.protobuf.ByteString + getFqnBytes(); + + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + * @return Whether the active field is set. + */ + boolean hasActive(); + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + * @return The active. + */ + com.google.protobuf.BoolValue getActive(); + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 8 [json_name = "active"]; + */ + com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder(); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeRuleTypeEnum.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeRuleTypeEnum.java new file mode 100644 index 00000000..51df5a9a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/AttributeRuleTypeEnum.java @@ -0,0 +1,136 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package
+ * 
+ * + * Protobuf enum {@code policy.AttributeRuleTypeEnum} + */ +public enum AttributeRuleTypeEnum + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; + */ + ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED(0), + /** + * ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; + */ + ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF(1), + /** + * ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; + */ + ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF(2), + /** + * ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; + */ + ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY(3), + UNRECOGNIZED(-1), + ; + + /** + * ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; + */ + public static final int ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED_VALUE = 0; + /** + * ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; + */ + public static final int ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF_VALUE = 1; + /** + * ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; + */ + public static final int ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF_VALUE = 2; + /** + * ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; + */ + public static final int ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttributeRuleTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttributeRuleTypeEnum forNumber(int value) { + switch (value) { + case 0: return ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED; + case 1: return ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF; + case 2: return ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF; + case 3: return ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AttributeRuleTypeEnum> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttributeRuleTypeEnum findValueByNumber(int number) { + return AttributeRuleTypeEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.getDescriptor().getEnumTypes().get(0); + } + + private static final AttributeRuleTypeEnum[] VALUES = values(); + + public static AttributeRuleTypeEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttributeRuleTypeEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:policy.AttributeRuleTypeEnum) +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelector.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelector.java new file mode 100644 index 00000000..ab6c5683 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelector.java @@ -0,0 +1,1882 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/selectors.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + * Protobuf type {@code policy.AttributeValueSelector} + */ +public final class AttributeValueSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeValueSelector) + AttributeValueSelectorOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttributeValueSelector.newBuilder() to construct. + private AttributeValueSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttributeValueSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttributeValueSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeValueSelector.class, io.opentdf.platform.policy.AttributeValueSelector.Builder.class); + } + + public interface AttributeSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeValueSelector.AttributeSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + boolean getWithKeyAccessGrants(); + + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return Whether the withNamespace field is set. + */ + boolean hasWithNamespace(); + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return The withNamespace. + */ + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getWithNamespace(); + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder(); + } + /** + * Protobuf type {@code policy.AttributeValueSelector.AttributeSelector} + */ + public static final class AttributeSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeValueSelector.AttributeSelector) + AttributeSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttributeSelector.newBuilder() to construct. + private AttributeSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttributeSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttributeSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.class, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder.class); + } + + public interface NamespaceSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code policy.AttributeValueSelector.AttributeSelector.NamespaceSelector} + */ + public static final class NamespaceSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) + NamespaceSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use NamespaceSelector.newBuilder() to construct. + private NamespaceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NamespaceSelector() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NamespaceSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.class, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector other = (io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeValueSelector.AttributeSelector.NamespaceSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.class, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector build() { + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector buildPartial() { + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector result = new io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector other) { + if (other == io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) + private static final io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector(); + } + + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NamespaceSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; + private boolean withKeyAccessGrants_ = false; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + + public static final int WITH_NAMESPACE_FIELD_NUMBER = 10; + private io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector withNamespace_; + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return Whether the withNamespace field is set. + */ + @java.lang.Override + public boolean hasWithNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return The withNamespace. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getWithNamespace() { + return withNamespace_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder() { + return withNamespace_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (withKeyAccessGrants_ != false) { + output.writeBool(1, withKeyAccessGrants_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(10, getWithNamespace()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (withKeyAccessGrants_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, withKeyAccessGrants_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getWithNamespace()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector other = (io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector) obj; + + if (getWithKeyAccessGrants() + != other.getWithKeyAccessGrants()) return false; + if (hasWithNamespace() != other.hasWithNamespace()) return false; + if (hasWithNamespace()) { + if (!getWithNamespace() + .equals(other.getWithNamespace())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithKeyAccessGrants()); + if (hasWithNamespace()) { + hash = (37 * hash) + WITH_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getWithNamespace().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeValueSelector.AttributeSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeValueSelector.AttributeSelector) + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.class, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWithNamespaceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + withKeyAccessGrants_ = false; + withNamespace_ = null; + if (withNamespaceBuilder_ != null) { + withNamespaceBuilder_.dispose(); + withNamespaceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector build() { + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector buildPartial() { + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector result = new io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.withKeyAccessGrants_ = withKeyAccessGrants_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withNamespace_ = withNamespaceBuilder_ == null + ? withNamespace_ + : withNamespaceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector other) { + if (other == io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance()) return this; + if (other.getWithKeyAccessGrants() != false) { + setWithKeyAccessGrants(other.getWithKeyAccessGrants()); + } + if (other.hasWithNamespace()) { + mergeWithNamespace(other.getWithNamespace()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + withKeyAccessGrants_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 82: { + input.readMessage( + getWithNamespaceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean withKeyAccessGrants_ ; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @param value The withKeyAccessGrants to set. + * @return This builder for chaining. + */ + public Builder setWithKeyAccessGrants(boolean value) { + + withKeyAccessGrants_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return This builder for chaining. + */ + public Builder clearWithKeyAccessGrants() { + bitField0_ = (bitField0_ & ~0x00000001); + withKeyAccessGrants_ = false; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector withNamespace_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder> withNamespaceBuilder_; + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return Whether the withNamespace field is set. + */ + public boolean hasWithNamespace() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + * @return The withNamespace. + */ + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getWithNamespace() { + if (withNamespaceBuilder_ == null) { + return withNamespace_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; + } else { + return withNamespaceBuilder_.getMessage(); + } + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public Builder setWithNamespace(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector value) { + if (withNamespaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + withNamespace_ = value; + } else { + withNamespaceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public Builder setWithNamespace( + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder builderForValue) { + if (withNamespaceBuilder_ == null) { + withNamespace_ = builderForValue.build(); + } else { + withNamespaceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public Builder mergeWithNamespace(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector value) { + if (withNamespaceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + withNamespace_ != null && + withNamespace_ != io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance()) { + getWithNamespaceBuilder().mergeFrom(value); + } else { + withNamespace_ = value; + } + } else { + withNamespaceBuilder_.mergeFrom(value); + } + if (withNamespace_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public Builder clearWithNamespace() { + bitField0_ = (bitField0_ & ~0x00000002); + withNamespace_ = null; + if (withNamespaceBuilder_ != null) { + withNamespaceBuilder_.dispose(); + withNamespaceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder getWithNamespaceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWithNamespaceFieldBuilder().getBuilder(); + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder() { + if (withNamespaceBuilder_ != null) { + return withNamespaceBuilder_.getMessageOrBuilder(); + } else { + return withNamespace_ == null ? + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; + } + } + /** + * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder> + getWithNamespaceFieldBuilder() { + if (withNamespaceBuilder_ == null) { + withNamespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder>( + getWithNamespace(), + getParentForChildren(), + isClean()); + withNamespace_ = null; + } + return withNamespaceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeValueSelector.AttributeSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeValueSelector.AttributeSelector) + private static final io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector(); + } + + public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; + private boolean withKeyAccessGrants_ = false; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + + public static final int WITH_SUBJECT_MAPS_FIELD_NUMBER = 2; + private boolean withSubjectMaps_ = false; + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + @java.lang.Override + public boolean getWithSubjectMaps() { + return withSubjectMaps_; + } + + public static final int WITH_RESOURCE_MAPS_FIELD_NUMBER = 3; + private boolean withResourceMaps_ = false; + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + @java.lang.Override + public boolean getWithResourceMaps() { + return withResourceMaps_; + } + + public static final int WITH_ATTRIBUTE_FIELD_NUMBER = 10; + private io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector withAttribute_; + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + * @return Whether the withAttribute field is set. + */ + @java.lang.Override + public boolean hasWithAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + * @return The withAttribute. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getWithAttribute() { + return withAttribute_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance() : withAttribute_; + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder getWithAttributeOrBuilder() { + return withAttribute_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance() : withAttribute_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (withKeyAccessGrants_ != false) { + output.writeBool(1, withKeyAccessGrants_); + } + if (withSubjectMaps_ != false) { + output.writeBool(2, withSubjectMaps_); + } + if (withResourceMaps_ != false) { + output.writeBool(3, withResourceMaps_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(10, getWithAttribute()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (withKeyAccessGrants_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, withKeyAccessGrants_); + } + if (withSubjectMaps_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, withSubjectMaps_); + } + if (withResourceMaps_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, withResourceMaps_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getWithAttribute()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.AttributeValueSelector)) { + return super.equals(obj); + } + io.opentdf.platform.policy.AttributeValueSelector other = (io.opentdf.platform.policy.AttributeValueSelector) obj; + + if (getWithKeyAccessGrants() + != other.getWithKeyAccessGrants()) return false; + if (getWithSubjectMaps() + != other.getWithSubjectMaps()) return false; + if (getWithResourceMaps() + != other.getWithResourceMaps()) return false; + if (hasWithAttribute() != other.hasWithAttribute()) return false; + if (hasWithAttribute()) { + if (!getWithAttribute() + .equals(other.getWithAttribute())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithKeyAccessGrants()); + hash = (37 * hash) + WITH_SUBJECT_MAPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithSubjectMaps()); + hash = (37 * hash) + WITH_RESOURCE_MAPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithResourceMaps()); + if (hasWithAttribute()) { + hash = (37 * hash) + WITH_ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getWithAttribute().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.AttributeValueSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.AttributeValueSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.AttributeValueSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.AttributeValueSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.AttributeValueSelector) + io.opentdf.platform.policy.AttributeValueSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.AttributeValueSelector.class, io.opentdf.platform.policy.AttributeValueSelector.Builder.class); + } + + // Construct using io.opentdf.platform.policy.AttributeValueSelector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWithAttributeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + withKeyAccessGrants_ = false; + withSubjectMaps_ = false; + withResourceMaps_ = false; + withAttribute_ = null; + if (withAttributeBuilder_ != null) { + withAttributeBuilder_.dispose(); + withAttributeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector getDefaultInstanceForType() { + return io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector build() { + io.opentdf.platform.policy.AttributeValueSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector buildPartial() { + io.opentdf.platform.policy.AttributeValueSelector result = new io.opentdf.platform.policy.AttributeValueSelector(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.AttributeValueSelector result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.withKeyAccessGrants_ = withKeyAccessGrants_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withSubjectMaps_ = withSubjectMaps_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.withResourceMaps_ = withResourceMaps_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.withAttribute_ = withAttributeBuilder_ == null + ? withAttribute_ + : withAttributeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.AttributeValueSelector) { + return mergeFrom((io.opentdf.platform.policy.AttributeValueSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.AttributeValueSelector other) { + if (other == io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance()) return this; + if (other.getWithKeyAccessGrants() != false) { + setWithKeyAccessGrants(other.getWithKeyAccessGrants()); + } + if (other.getWithSubjectMaps() != false) { + setWithSubjectMaps(other.getWithSubjectMaps()); + } + if (other.getWithResourceMaps() != false) { + setWithResourceMaps(other.getWithResourceMaps()); + } + if (other.hasWithAttribute()) { + mergeWithAttribute(other.getWithAttribute()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + withKeyAccessGrants_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + withSubjectMaps_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + withResourceMaps_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 82: { + input.readMessage( + getWithAttributeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean withKeyAccessGrants_ ; + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + @java.lang.Override + public boolean getWithKeyAccessGrants() { + return withKeyAccessGrants_; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @param value The withKeyAccessGrants to set. + * @return This builder for chaining. + */ + public Builder setWithKeyAccessGrants(boolean value) { + + withKeyAccessGrants_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return This builder for chaining. + */ + public Builder clearWithKeyAccessGrants() { + bitField0_ = (bitField0_ & ~0x00000001); + withKeyAccessGrants_ = false; + onChanged(); + return this; + } + + private boolean withSubjectMaps_ ; + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + @java.lang.Override + public boolean getWithSubjectMaps() { + return withSubjectMaps_; + } + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @param value The withSubjectMaps to set. + * @return This builder for chaining. + */ + public Builder setWithSubjectMaps(boolean value) { + + withSubjectMaps_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return This builder for chaining. + */ + public Builder clearWithSubjectMaps() { + bitField0_ = (bitField0_ & ~0x00000002); + withSubjectMaps_ = false; + onChanged(); + return this; + } + + private boolean withResourceMaps_ ; + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + @java.lang.Override + public boolean getWithResourceMaps() { + return withResourceMaps_; + } + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @param value The withResourceMaps to set. + * @return This builder for chaining. + */ + public Builder setWithResourceMaps(boolean value) { + + withResourceMaps_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return This builder for chaining. + */ + public Builder clearWithResourceMaps() { + bitField0_ = (bitField0_ & ~0x00000004); + withResourceMaps_ = false; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector withAttribute_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder> withAttributeBuilder_; + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + * @return Whether the withAttribute field is set. + */ + public boolean hasWithAttribute() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + * @return The withAttribute. + */ + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getWithAttribute() { + if (withAttributeBuilder_ == null) { + return withAttribute_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance() : withAttribute_; + } else { + return withAttributeBuilder_.getMessage(); + } + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + public Builder setWithAttribute(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector value) { + if (withAttributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + withAttribute_ = value; + } else { + withAttributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + public Builder setWithAttribute( + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder builderForValue) { + if (withAttributeBuilder_ == null) { + withAttribute_ = builderForValue.build(); + } else { + withAttributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + public Builder mergeWithAttribute(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector value) { + if (withAttributeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + withAttribute_ != null && + withAttribute_ != io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance()) { + getWithAttributeBuilder().mergeFrom(value); + } else { + withAttribute_ = value; + } + } else { + withAttributeBuilder_.mergeFrom(value); + } + if (withAttribute_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + public Builder clearWithAttribute() { + bitField0_ = (bitField0_ & ~0x00000008); + withAttribute_ = null; + if (withAttributeBuilder_ != null) { + withAttributeBuilder_.dispose(); + withAttributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder getWithAttributeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getWithAttributeFieldBuilder().getBuilder(); + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder getWithAttributeOrBuilder() { + if (withAttributeBuilder_ != null) { + return withAttributeBuilder_.getMessageOrBuilder(); + } else { + return withAttribute_ == null ? + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance() : withAttribute_; + } + } + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder> + getWithAttributeFieldBuilder() { + if (withAttributeBuilder_ == null) { + withAttributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder>( + getWithAttribute(), + getParentForChildren(), + isClean()); + withAttribute_ = null; + } + return withAttributeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.AttributeValueSelector) + } + + // @@protoc_insertion_point(class_scope:policy.AttributeValueSelector) + private static final io.opentdf.platform.policy.AttributeValueSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeValueSelector(); + } + + public static io.opentdf.platform.policy.AttributeValueSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeValueSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelectorOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelectorOrBuilder.java new file mode 100644 index 00000000..d530a217 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelectorOrBuilder.java @@ -0,0 +1,43 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/selectors.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface AttributeValueSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.AttributeValueSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; + * @return The withKeyAccessGrants. + */ + boolean getWithKeyAccessGrants(); + + /** + * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; + * @return The withSubjectMaps. + */ + boolean getWithSubjectMaps(); + + /** + * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; + * @return The withResourceMaps. + */ + boolean getWithResourceMaps(); + + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + * @return Whether the withAttribute field is set. + */ + boolean hasWithAttribute(); + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + * @return The withAttribute. + */ + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getWithAttribute(); + /** + * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; + */ + io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder getWithAttributeOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Condition.java b/protocol/src/main/java/io/opentdf/platform/policy/Condition.java new file mode 100644 index 00000000..52253e37 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/Condition.java @@ -0,0 +1,971 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ **
+ *A Condition defines a rule of <subject external field name> <operator> <subject external values>
+ *
+ *Example:  Subjects with field "division" and a value of "Accounting" or "Marketing":
+ *{
+ *"subject_external_field": "division",
+ *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN",
+ *"subject_external_values" : ["Accounting", "Marketing"]
+ *}
+ *
+ *Example: Subjects that are not part of the Fantastic Four:
+ *{
+ *"subject_external_field": "superhero_name",
+ *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN",
+ *"subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"]
+ *}
+ * 
+ * + * Protobuf type {@code policy.Condition} + */ +public final class Condition extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.Condition) + ConditionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Condition.newBuilder() to construct. + private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Condition() { + subjectExternalField_ = ""; + operator_ = 0; + subjectExternalValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Condition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Condition.class, io.opentdf.platform.policy.Condition.Builder.class); + } + + public static final int SUBJECT_EXTERNAL_FIELD_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectExternalField_ = ""; + /** + *
+   * externally known field name (such as from idP/LDAP)
+   * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The subjectExternalField. + */ + @java.lang.Override + public java.lang.String getSubjectExternalField() { + java.lang.Object ref = subjectExternalField_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectExternalField_ = s; + return s; + } + } + /** + *
+   * externally known field name (such as from idP/LDAP)
+   * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The bytes for subjectExternalField. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectExternalFieldBytes() { + java.lang.Object ref = subjectExternalField_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectExternalField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATOR_FIELD_NUMBER = 2; + private int operator_ = 0; + /** + *
+   * the evaluation operator of relation
+   * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+   * the evaluation operator of relation
+   * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @return The operator. + */ + @java.lang.Override public io.opentdf.platform.policy.SubjectMappingOperatorEnum getOperator() { + io.opentdf.platform.policy.SubjectMappingOperatorEnum result = io.opentdf.platform.policy.SubjectMappingOperatorEnum.forNumber(operator_); + return result == null ? io.opentdf.platform.policy.SubjectMappingOperatorEnum.UNRECOGNIZED : result; + } + + public static final int SUBJECT_EXTERNAL_VALUES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList subjectExternalValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * list of comparison values for the subject_external_field, evaluated by the operator
+   * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return A list containing the subjectExternalValues. + */ + public com.google.protobuf.ProtocolStringList + getSubjectExternalValuesList() { + return subjectExternalValues_; + } + /** + *
+   * list of comparison values for the subject_external_field, evaluated by the operator
+   * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return The count of subjectExternalValues. + */ + public int getSubjectExternalValuesCount() { + return subjectExternalValues_.size(); + } + /** + *
+   * list of comparison values for the subject_external_field, evaluated by the operator
+   * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param index The index of the element to return. + * @return The subjectExternalValues at the given index. + */ + public java.lang.String getSubjectExternalValues(int index) { + return subjectExternalValues_.get(index); + } + /** + *
+   * list of comparison values for the subject_external_field, evaluated by the operator
+   * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param index The index of the value to return. + * @return The bytes of the subjectExternalValues at the given index. + */ + public com.google.protobuf.ByteString + getSubjectExternalValuesBytes(int index) { + return subjectExternalValues_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectExternalField_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectExternalField_); + } + if (operator_ != io.opentdf.platform.policy.SubjectMappingOperatorEnum.SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(2, operator_); + } + for (int i = 0; i < subjectExternalValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subjectExternalValues_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectExternalField_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectExternalField_); + } + if (operator_ != io.opentdf.platform.policy.SubjectMappingOperatorEnum.SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, operator_); + } + { + int dataSize = 0; + for (int i = 0; i < subjectExternalValues_.size(); i++) { + dataSize += computeStringSizeNoTag(subjectExternalValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getSubjectExternalValuesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.Condition)) { + return super.equals(obj); + } + io.opentdf.platform.policy.Condition other = (io.opentdf.platform.policy.Condition) obj; + + if (!getSubjectExternalField() + .equals(other.getSubjectExternalField())) return false; + if (operator_ != other.operator_) return false; + if (!getSubjectExternalValuesList() + .equals(other.getSubjectExternalValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUBJECT_EXTERNAL_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getSubjectExternalField().hashCode(); + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + operator_; + if (getSubjectExternalValuesCount() > 0) { + hash = (37 * hash) + SUBJECT_EXTERNAL_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getSubjectExternalValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.Condition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Condition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Condition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Condition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Condition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Condition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Condition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Condition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.Condition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.Condition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.Condition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Condition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.Condition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   **
+   *A Condition defines a rule of <subject external field name> <operator> <subject external values>
+   *
+   *Example:  Subjects with field "division" and a value of "Accounting" or "Marketing":
+   *{
+   *"subject_external_field": "division",
+   *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN",
+   *"subject_external_values" : ["Accounting", "Marketing"]
+   *}
+   *
+   *Example: Subjects that are not part of the Fantastic Four:
+   *{
+   *"subject_external_field": "superhero_name",
+   *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN",
+   *"subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"]
+   *}
+   * 
+ * + * Protobuf type {@code policy.Condition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.Condition) + io.opentdf.platform.policy.ConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Condition.class, io.opentdf.platform.policy.Condition.Builder.class); + } + + // Construct using io.opentdf.platform.policy.Condition.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectExternalField_ = ""; + operator_ = 0; + subjectExternalValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.Condition getDefaultInstanceForType() { + return io.opentdf.platform.policy.Condition.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.Condition build() { + io.opentdf.platform.policy.Condition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.Condition buildPartial() { + io.opentdf.platform.policy.Condition result = new io.opentdf.platform.policy.Condition(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.Condition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectExternalField_ = subjectExternalField_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operator_ = operator_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + subjectExternalValues_.makeImmutable(); + result.subjectExternalValues_ = subjectExternalValues_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.Condition) { + return mergeFrom((io.opentdf.platform.policy.Condition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.Condition other) { + if (other == io.opentdf.platform.policy.Condition.getDefaultInstance()) return this; + if (!other.getSubjectExternalField().isEmpty()) { + subjectExternalField_ = other.subjectExternalField_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.operator_ != 0) { + setOperatorValue(other.getOperatorValue()); + } + if (!other.subjectExternalValues_.isEmpty()) { + if (subjectExternalValues_.isEmpty()) { + subjectExternalValues_ = other.subjectExternalValues_; + bitField0_ |= 0x00000004; + } else { + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.addAll(other.subjectExternalValues_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + subjectExternalField_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + operator_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object subjectExternalField_ = ""; + /** + *
+     * externally known field name (such as from idP/LDAP)
+     * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The subjectExternalField. + */ + public java.lang.String getSubjectExternalField() { + java.lang.Object ref = subjectExternalField_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectExternalField_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * externally known field name (such as from idP/LDAP)
+     * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The bytes for subjectExternalField. + */ + public com.google.protobuf.ByteString + getSubjectExternalFieldBytes() { + java.lang.Object ref = subjectExternalField_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectExternalField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * externally known field name (such as from idP/LDAP)
+     * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @param value The subjectExternalField to set. + * @return This builder for chaining. + */ + public Builder setSubjectExternalField( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectExternalField_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * externally known field name (such as from idP/LDAP)
+     * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return This builder for chaining. + */ + public Builder clearSubjectExternalField() { + subjectExternalField_ = getDefaultInstance().getSubjectExternalField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * externally known field name (such as from idP/LDAP)
+     * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @param value The bytes for subjectExternalField to set. + * @return This builder for chaining. + */ + public Builder setSubjectExternalFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectExternalField_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int operator_ = 0; + /** + *
+     * the evaluation operator of relation
+     * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+     * the evaluation operator of relation
+     * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @param value The enum numeric value on the wire for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorValue(int value) { + operator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * the evaluation operator of relation
+     * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @return The operator. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOperatorEnum getOperator() { + io.opentdf.platform.policy.SubjectMappingOperatorEnum result = io.opentdf.platform.policy.SubjectMappingOperatorEnum.forNumber(operator_); + return result == null ? io.opentdf.platform.policy.SubjectMappingOperatorEnum.UNRECOGNIZED : result; + } + /** + *
+     * the evaluation operator of relation
+     * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(io.opentdf.platform.policy.SubjectMappingOperatorEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + operator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * the evaluation operator of relation
+     * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000002); + operator_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList subjectExternalValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureSubjectExternalValuesIsMutable() { + if (!subjectExternalValues_.isModifiable()) { + subjectExternalValues_ = new com.google.protobuf.LazyStringArrayList(subjectExternalValues_); + } + bitField0_ |= 0x00000004; + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return A list containing the subjectExternalValues. + */ + public com.google.protobuf.ProtocolStringList + getSubjectExternalValuesList() { + subjectExternalValues_.makeImmutable(); + return subjectExternalValues_; + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return The count of subjectExternalValues. + */ + public int getSubjectExternalValuesCount() { + return subjectExternalValues_.size(); + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param index The index of the element to return. + * @return The subjectExternalValues at the given index. + */ + public java.lang.String getSubjectExternalValues(int index) { + return subjectExternalValues_.get(index); + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param index The index of the value to return. + * @return The bytes of the subjectExternalValues at the given index. + */ + public com.google.protobuf.ByteString + getSubjectExternalValuesBytes(int index) { + return subjectExternalValues_.getByteString(index); + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param index The index to set the value at. + * @param value The subjectExternalValues to set. + * @return This builder for chaining. + */ + public Builder setSubjectExternalValues( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param value The subjectExternalValues to add. + * @return This builder for chaining. + */ + public Builder addSubjectExternalValues( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param values The subjectExternalValues to add. + * @return This builder for chaining. + */ + public Builder addAllSubjectExternalValues( + java.lang.Iterable values) { + ensureSubjectExternalValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectExternalValues_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return This builder for chaining. + */ + public Builder clearSubjectExternalValues() { + subjectExternalValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004);; + onChanged(); + return this; + } + /** + *
+     * list of comparison values for the subject_external_field, evaluated by the operator
+     * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param value The bytes of the subjectExternalValues to add. + * @return This builder for chaining. + */ + public Builder addSubjectExternalValuesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.Condition) + } + + // @@protoc_insertion_point(class_scope:policy.Condition) + private static final io.opentdf.platform.policy.Condition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.Condition(); + } + + public static io.opentdf.platform.policy.Condition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Condition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.Condition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ConditionBooleanTypeEnum.java b/protocol/src/main/java/io/opentdf/platform/policy/ConditionBooleanTypeEnum.java new file mode 100644 index 00000000..05bc8c3c --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ConditionBooleanTypeEnum.java @@ -0,0 +1,127 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package
+ * 
+ * + * Protobuf enum {@code policy.ConditionBooleanTypeEnum} + */ +public enum ConditionBooleanTypeEnum + implements com.google.protobuf.ProtocolMessageEnum { + /** + * CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0; + */ + CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED(0), + /** + * CONDITION_BOOLEAN_TYPE_ENUM_AND = 1; + */ + CONDITION_BOOLEAN_TYPE_ENUM_AND(1), + /** + * CONDITION_BOOLEAN_TYPE_ENUM_OR = 2; + */ + CONDITION_BOOLEAN_TYPE_ENUM_OR(2), + UNRECOGNIZED(-1), + ; + + /** + * CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0; + */ + public static final int CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED_VALUE = 0; + /** + * CONDITION_BOOLEAN_TYPE_ENUM_AND = 1; + */ + public static final int CONDITION_BOOLEAN_TYPE_ENUM_AND_VALUE = 1; + /** + * CONDITION_BOOLEAN_TYPE_ENUM_OR = 2; + */ + public static final int CONDITION_BOOLEAN_TYPE_ENUM_OR_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConditionBooleanTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConditionBooleanTypeEnum forNumber(int value) { + switch (value) { + case 0: return CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED; + case 1: return CONDITION_BOOLEAN_TYPE_ENUM_AND; + case 2: return CONDITION_BOOLEAN_TYPE_ENUM_OR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ConditionBooleanTypeEnum> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConditionBooleanTypeEnum findValueByNumber(int number) { + return ConditionBooleanTypeEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.getDescriptor().getEnumTypes().get(2); + } + + private static final ConditionBooleanTypeEnum[] VALUES = values(); + + public static ConditionBooleanTypeEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConditionBooleanTypeEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:policy.ConditionBooleanTypeEnum) +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroup.java b/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroup.java new file mode 100644 index 00000000..22510d3b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroup.java @@ -0,0 +1,890 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ * A collection of Conditions evaluated by the boolean_operator provided
+ * 
+ * + * Protobuf type {@code policy.ConditionGroup} + */ +public final class ConditionGroup extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.ConditionGroup) + ConditionGroupOrBuilder { +private static final long serialVersionUID = 0L; + // Use ConditionGroup.newBuilder() to construct. + private ConditionGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConditionGroup() { + conditions_ = java.util.Collections.emptyList(); + booleanOperator_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConditionGroup(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.ConditionGroup.class, io.opentdf.platform.policy.ConditionGroup.Builder.class); + } + + public static final int CONDITIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List conditions_; + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getConditionsList() { + return conditions_; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getConditionsOrBuilderList() { + return conditions_; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getConditionsCount() { + return conditions_.size(); + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.Condition getConditions(int index) { + return conditions_.get(index); + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.ConditionOrBuilder getConditionsOrBuilder( + int index) { + return conditions_.get(index); + } + + public static final int BOOLEAN_OPERATOR_FIELD_NUMBER = 2; + private int booleanOperator_ = 0; + /** + *
+   * the boolean evaluation type across the conditions
+   * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for booleanOperator. + */ + @java.lang.Override public int getBooleanOperatorValue() { + return booleanOperator_; + } + /** + *
+   * the boolean evaluation type across the conditions
+   * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The booleanOperator. + */ + @java.lang.Override public io.opentdf.platform.policy.ConditionBooleanTypeEnum getBooleanOperator() { + io.opentdf.platform.policy.ConditionBooleanTypeEnum result = io.opentdf.platform.policy.ConditionBooleanTypeEnum.forNumber(booleanOperator_); + return result == null ? io.opentdf.platform.policy.ConditionBooleanTypeEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < conditions_.size(); i++) { + output.writeMessage(1, conditions_.get(i)); + } + if (booleanOperator_ != io.opentdf.platform.policy.ConditionBooleanTypeEnum.CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(2, booleanOperator_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < conditions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, conditions_.get(i)); + } + if (booleanOperator_ != io.opentdf.platform.policy.ConditionBooleanTypeEnum.CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, booleanOperator_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.ConditionGroup)) { + return super.equals(obj); + } + io.opentdf.platform.policy.ConditionGroup other = (io.opentdf.platform.policy.ConditionGroup) obj; + + if (!getConditionsList() + .equals(other.getConditionsList())) return false; + if (booleanOperator_ != other.booleanOperator_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConditionsCount() > 0) { + hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getConditionsList().hashCode(); + } + hash = (37 * hash) + BOOLEAN_OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + booleanOperator_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.ConditionGroup parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.ConditionGroup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.ConditionGroup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.ConditionGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.ConditionGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A collection of Conditions evaluated by the boolean_operator provided
+   * 
+ * + * Protobuf type {@code policy.ConditionGroup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.ConditionGroup) + io.opentdf.platform.policy.ConditionGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.ConditionGroup.class, io.opentdf.platform.policy.ConditionGroup.Builder.class); + } + + // Construct using io.opentdf.platform.policy.ConditionGroup.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conditionsBuilder_ == null) { + conditions_ = java.util.Collections.emptyList(); + } else { + conditions_ = null; + conditionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + booleanOperator_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.ConditionGroup getDefaultInstanceForType() { + return io.opentdf.platform.policy.ConditionGroup.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.ConditionGroup build() { + io.opentdf.platform.policy.ConditionGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.ConditionGroup buildPartial() { + io.opentdf.platform.policy.ConditionGroup result = new io.opentdf.platform.policy.ConditionGroup(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.ConditionGroup result) { + if (conditionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditions_ = java.util.Collections.unmodifiableList(conditions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditions_ = conditions_; + } else { + result.conditions_ = conditionsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.ConditionGroup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.booleanOperator_ = booleanOperator_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.ConditionGroup) { + return mergeFrom((io.opentdf.platform.policy.ConditionGroup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.ConditionGroup other) { + if (other == io.opentdf.platform.policy.ConditionGroup.getDefaultInstance()) return this; + if (conditionsBuilder_ == null) { + if (!other.conditions_.isEmpty()) { + if (conditions_.isEmpty()) { + conditions_ = other.conditions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionsIsMutable(); + conditions_.addAll(other.conditions_); + } + onChanged(); + } + } else { + if (!other.conditions_.isEmpty()) { + if (conditionsBuilder_.isEmpty()) { + conditionsBuilder_.dispose(); + conditionsBuilder_ = null; + conditions_ = other.conditions_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConditionsFieldBuilder() : null; + } else { + conditionsBuilder_.addAllMessages(other.conditions_); + } + } + } + if (other.booleanOperator_ != 0) { + setBooleanOperatorValue(other.getBooleanOperatorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.Condition m = + input.readMessage( + io.opentdf.platform.policy.Condition.parser(), + extensionRegistry); + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(m); + } else { + conditionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: { + booleanOperator_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List conditions_ = + java.util.Collections.emptyList(); + private void ensureConditionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditions_ = new java.util.ArrayList(conditions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Condition, io.opentdf.platform.policy.Condition.Builder, io.opentdf.platform.policy.ConditionOrBuilder> conditionsBuilder_; + + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public java.util.List getConditionsList() { + if (conditionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditions_); + } else { + return conditionsBuilder_.getMessageList(); + } + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public int getConditionsCount() { + if (conditionsBuilder_ == null) { + return conditions_.size(); + } else { + return conditionsBuilder_.getCount(); + } + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Condition getConditions(int index) { + if (conditionsBuilder_ == null) { + return conditions_.get(index); + } else { + return conditionsBuilder_.getMessage(index); + } + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder setConditions( + int index, io.opentdf.platform.policy.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.set(index, value); + onChanged(); + } else { + conditionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder setConditions( + int index, io.opentdf.platform.policy.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder addConditions(io.opentdf.platform.policy.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.add(value); + onChanged(); + } else { + conditionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder addConditions( + int index, io.opentdf.platform.policy.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.add(index, value); + onChanged(); + } else { + conditionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder addConditions( + io.opentdf.platform.policy.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder addConditions( + int index, io.opentdf.platform.policy.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder addAllConditions( + java.lang.Iterable values) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, conditions_); + onChanged(); + } else { + conditionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder clearConditions() { + if (conditionsBuilder_ == null) { + conditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionsBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public Builder removeConditions(int index) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.remove(index); + onChanged(); + } else { + conditionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Condition.Builder getConditionsBuilder( + int index) { + return getConditionsFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.ConditionOrBuilder getConditionsOrBuilder( + int index) { + if (conditionsBuilder_ == null) { + return conditions_.get(index); } else { + return conditionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public java.util.List + getConditionsOrBuilderList() { + if (conditionsBuilder_ != null) { + return conditionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditions_); + } + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Condition.Builder addConditionsBuilder() { + return getConditionsFieldBuilder().addBuilder( + io.opentdf.platform.policy.Condition.getDefaultInstance()); + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Condition.Builder addConditionsBuilder( + int index) { + return getConditionsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Condition.getDefaultInstance()); + } + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + public java.util.List + getConditionsBuilderList() { + return getConditionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Condition, io.opentdf.platform.policy.Condition.Builder, io.opentdf.platform.policy.ConditionOrBuilder> + getConditionsFieldBuilder() { + if (conditionsBuilder_ == null) { + conditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Condition, io.opentdf.platform.policy.Condition.Builder, io.opentdf.platform.policy.ConditionOrBuilder>( + conditions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conditions_ = null; + } + return conditionsBuilder_; + } + + private int booleanOperator_ = 0; + /** + *
+     * the boolean evaluation type across the conditions
+     * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for booleanOperator. + */ + @java.lang.Override public int getBooleanOperatorValue() { + return booleanOperator_; + } + /** + *
+     * the boolean evaluation type across the conditions
+     * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @param value The enum numeric value on the wire for booleanOperator to set. + * @return This builder for chaining. + */ + public Builder setBooleanOperatorValue(int value) { + booleanOperator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * the boolean evaluation type across the conditions
+     * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The booleanOperator. + */ + @java.lang.Override + public io.opentdf.platform.policy.ConditionBooleanTypeEnum getBooleanOperator() { + io.opentdf.platform.policy.ConditionBooleanTypeEnum result = io.opentdf.platform.policy.ConditionBooleanTypeEnum.forNumber(booleanOperator_); + return result == null ? io.opentdf.platform.policy.ConditionBooleanTypeEnum.UNRECOGNIZED : result; + } + /** + *
+     * the boolean evaluation type across the conditions
+     * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @param value The booleanOperator to set. + * @return This builder for chaining. + */ + public Builder setBooleanOperator(io.opentdf.platform.policy.ConditionBooleanTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + booleanOperator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * the boolean evaluation type across the conditions
+     * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearBooleanOperator() { + bitField0_ = (bitField0_ & ~0x00000002); + booleanOperator_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.ConditionGroup) + } + + // @@protoc_insertion_point(class_scope:policy.ConditionGroup) + private static final io.opentdf.platform.policy.ConditionGroup DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.ConditionGroup(); + } + + public static io.opentdf.platform.policy.ConditionGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.ConditionGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroupOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroupOrBuilder.java new file mode 100644 index 00000000..97dd8fbe --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroupOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface ConditionGroupOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.ConditionGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + java.util.List + getConditionsList(); + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.Condition getConditions(int index); + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + int getConditionsCount(); + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + java.util.List + getConditionsOrBuilderList(); + /** + * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.ConditionOrBuilder getConditionsOrBuilder( + int index); + + /** + *
+   * the boolean evaluation type across the conditions
+   * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for booleanOperator. + */ + int getBooleanOperatorValue(); + /** + *
+   * the boolean evaluation type across the conditions
+   * 
+ * + * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The booleanOperator. + */ + io.opentdf.platform.policy.ConditionBooleanTypeEnum getBooleanOperator(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ConditionOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ConditionOrBuilder.java new file mode 100644 index 00000000..1a5d6930 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ConditionOrBuilder.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface ConditionOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.Condition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * externally known field name (such as from idP/LDAP)
+   * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The subjectExternalField. + */ + java.lang.String getSubjectExternalField(); + /** + *
+   * externally known field name (such as from idP/LDAP)
+   * 
+ * + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The bytes for subjectExternalField. + */ + com.google.protobuf.ByteString + getSubjectExternalFieldBytes(); + + /** + *
+   * the evaluation operator of relation
+   * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for operator. + */ + int getOperatorValue(); + /** + *
+   * the evaluation operator of relation
+   * 
+ * + * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } + * @return The operator. + */ + io.opentdf.platform.policy.SubjectMappingOperatorEnum getOperator(); + + /** + *
+   * list of comparison values for the subject_external_field, evaluated by the operator
+   * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return A list containing the subjectExternalValues. + */ + java.util.List + getSubjectExternalValuesList(); + /** + *
+   * list of comparison values for the subject_external_field, evaluated by the operator
+   * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return The count of subjectExternalValues. + */ + int getSubjectExternalValuesCount(); + /** + *
+   * list of comparison values for the subject_external_field, evaluated by the operator
+   * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param index The index of the element to return. + * @return The subjectExternalValues at the given index. + */ + java.lang.String getSubjectExternalValues(int index); + /** + *
+   * list of comparison values for the subject_external_field, evaluated by the operator
+   * 
+ * + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param index The index of the value to return. + * @return The bytes of the subjectExternalValues at the given index. + */ + com.google.protobuf.ByteString + getSubjectExternalValuesBytes(int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Namespace.java b/protocol/src/main/java/io/opentdf/platform/policy/Namespace.java new file mode 100644 index 00000000..0521586c --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/Namespace.java @@ -0,0 +1,1296 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + * Protobuf type {@code policy.Namespace} + */ +public final class Namespace extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.Namespace) + NamespaceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Namespace.newBuilder() to construct. + private Namespace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Namespace() { + id_ = ""; + name_ = ""; + fqn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Namespace(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Namespace.class, io.opentdf.platform.policy.Namespace.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * generated uuid in database
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * generated uuid in database
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+   * 
+ * + * string name = 2 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+   * 
+ * + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FQN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object fqn_ = ""; + /** + * string fqn = 3 [json_name = "fqn"]; + * @return The fqn. + */ + @java.lang.Override + public java.lang.String getFqn() { + java.lang.Object ref = fqn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqn_ = s; + return s; + } + } + /** + * string fqn = 3 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFqnBytes() { + java.lang.Object ref = fqn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIVE_FIELD_NUMBER = 4; + private com.google.protobuf.BoolValue active_; + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + * @return Whether the active field is set. + */ + @java.lang.Override + public boolean hasActive() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + * @return The active. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getActive() { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + + public static final int METADATA_FIELD_NUMBER = 5; + private io.opentdf.platform.common.Metadata metadata_; + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.Metadata getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fqn_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getActive()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, fqn_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getActive()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.Namespace)) { + return super.equals(obj); + } + io.opentdf.platform.policy.Namespace other = (io.opentdf.platform.policy.Namespace) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getFqn() + .equals(other.getFqn())) return false; + if (hasActive() != other.hasActive()) return false; + if (hasActive()) { + if (!getActive() + .equals(other.getActive())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FQN_FIELD_NUMBER; + hash = (53 * hash) + getFqn().hashCode(); + if (hasActive()) { + hash = (37 * hash) + ACTIVE_FIELD_NUMBER; + hash = (53 * hash) + getActive().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.Namespace parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Namespace parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Namespace parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Namespace parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Namespace parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Namespace parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Namespace parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Namespace parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.Namespace parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.Namespace parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.Namespace parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Namespace parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.Namespace prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.Namespace} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.Namespace) + io.opentdf.platform.policy.NamespaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Namespace.class, io.opentdf.platform.policy.Namespace.Builder.class); + } + + // Construct using io.opentdf.platform.policy.Namespace.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getActiveFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + name_ = ""; + fqn_ = ""; + active_ = null; + if (activeBuilder_ != null) { + activeBuilder_.dispose(); + activeBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.Namespace getDefaultInstanceForType() { + return io.opentdf.platform.policy.Namespace.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.Namespace build() { + io.opentdf.platform.policy.Namespace result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.Namespace buildPartial() { + io.opentdf.platform.policy.Namespace result = new io.opentdf.platform.policy.Namespace(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.Namespace result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fqn_ = fqn_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.active_ = activeBuilder_ == null + ? active_ + : activeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.Namespace) { + return mergeFrom((io.opentdf.platform.policy.Namespace)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.Namespace other) { + if (other == io.opentdf.platform.policy.Namespace.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFqn().isEmpty()) { + fqn_ = other.fqn_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasActive()) { + mergeActive(other.getActive()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + fqn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getActiveFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+     * 
+ * + * string name = 2 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+     * 
+ * + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+     * 
+ * + * string name = 2 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+     * 
+ * + * string name = 2 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+     * 
+ * + * string name = 2 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object fqn_ = ""; + /** + * string fqn = 3 [json_name = "fqn"]; + * @return The fqn. + */ + public java.lang.String getFqn() { + java.lang.Object ref = fqn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string fqn = 3 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + public com.google.protobuf.ByteString + getFqnBytes() { + java.lang.Object ref = fqn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string fqn = 3 [json_name = "fqn"]; + * @param value The fqn to set. + * @return This builder for chaining. + */ + public Builder setFqn( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fqn_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string fqn = 3 [json_name = "fqn"]; + * @return This builder for chaining. + */ + public Builder clearFqn() { + fqn_ = getDefaultInstance().getFqn(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string fqn = 3 [json_name = "fqn"]; + * @param value The bytes for fqn to set. + * @return This builder for chaining. + */ + public Builder setFqnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fqn_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue active_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> activeBuilder_; + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + * @return Whether the active field is set. + */ + public boolean hasActive() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + * @return The active. + */ + public com.google.protobuf.BoolValue getActive() { + if (activeBuilder_ == null) { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } else { + return activeBuilder_.getMessage(); + } + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + public Builder setActive(com.google.protobuf.BoolValue value) { + if (activeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + active_ = value; + } else { + activeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + public Builder setActive( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (activeBuilder_ == null) { + active_ = builderForValue.build(); + } else { + activeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + public Builder mergeActive(com.google.protobuf.BoolValue value) { + if (activeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + active_ != null && + active_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getActiveBuilder().mergeFrom(value); + } else { + active_ = value; + } + } else { + activeBuilder_.mergeFrom(value); + } + if (active_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + public Builder clearActive() { + bitField0_ = (bitField0_ & ~0x00000008); + active_ = null; + if (activeBuilder_ != null) { + activeBuilder_.dispose(); + activeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + public com.google.protobuf.BoolValue.Builder getActiveBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getActiveFieldBuilder().getBuilder(); + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { + if (activeBuilder_ != null) { + return activeBuilder_.getMessageOrBuilder(); + } else { + return active_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getActiveFieldBuilder() { + if (activeBuilder_ == null) { + activeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getActive(), + getParentForChildren(), + isClean()); + active_ = null; + } + return activeBuilder_; + } + + private io.opentdf.platform.common.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + } + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.Namespace) + } + + // @@protoc_insertion_point(class_scope:policy.Namespace) + private static final io.opentdf.platform.policy.Namespace DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.Namespace(); + } + + public static io.opentdf.platform.policy.Namespace getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Namespace parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.Namespace getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/NamespaceOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/NamespaceOrBuilder.java new file mode 100644 index 00000000..bbee0b34 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/NamespaceOrBuilder.java @@ -0,0 +1,104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface NamespaceOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.Namespace) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * generated uuid in database
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * generated uuid in database
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+   * 
+ * + * string name = 2 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * used to partition Attribute Definitions, support by namespace AuthN and enable federation
+   * 
+ * + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * string fqn = 3 [json_name = "fqn"]; + * @return The fqn. + */ + java.lang.String getFqn(); + /** + * string fqn = 3 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + com.google.protobuf.ByteString + getFqnBytes(); + + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + * @return Whether the active field is set. + */ + boolean hasActive(); + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + * @return The active. + */ + com.google.protobuf.BoolValue getActive(); + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 4 [json_name = "active"]; + */ + com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder(); + + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + * .common.Metadata metadata = 5 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ObjectsProto.java b/protocol/src/main/java/io/opentdf/platform/policy/ObjectsProto.java new file mode 100644 index 00000000..ea90d865 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ObjectsProto.java @@ -0,0 +1,245 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public final class ObjectsProto { + private ObjectsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_Namespace_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_Namespace_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_Attribute_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_Attribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_Value_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_Value_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_Action_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_Action_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_SubjectMapping_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_SubjectMapping_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_Condition_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_Condition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_ConditionGroup_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_ConditionGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_SubjectSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_SubjectSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_SubjectConditionSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_SubjectConditionSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_SubjectProperty_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_SubjectProperty_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_ResourceMapping_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_ResourceMapping_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024policy/objects.proto\022\006policy\032\033buf/vali" + + "date/validate.proto\032\023common/common.proto" + + "\032\036google/protobuf/wrappers.proto\032,kasreg" + + "istry/key_access_server_registry.proto\"\243" + + "\001\n\tNamespace\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004name\030\002 \001" + + "(\tR\004name\022\020\n\003fqn\030\003 \001(\tR\003fqn\0222\n\006active\030\004 \001" + + "(\0132\032.google.protobuf.BoolValueR\006active\022," + + "\n\010metadata\030\005 \001(\0132\020.common.MetadataR\010meta" + + "data\"\361\002\n\tAttribute\022\016\n\002id\030\001 \001(\tR\002id\022/\n\tna" + + "mespace\030\002 \001(\0132\021.policy.NamespaceR\tnamesp" + + "ace\022\022\n\004name\030\003 \001(\tR\004name\022>\n\004rule\030\004 \001(\0162\035." + + "policy.AttributeRuleTypeEnumB\013\272H\010\202\001\002\020\001\310\001" + + "\001R\004rule\022%\n\006values\030\005 \003(\0132\r.policy.ValueR\006" + + "values\0224\n\006grants\030\006 \003(\0132\034.kasregistry.Key" + + "AccessServerR\006grants\022\020\n\003fqn\030\007 \001(\tR\003fqn\0222" + + "\n\006active\030\010 \001(\0132\032.google.protobuf.BoolVal" + + "ueR\006active\022,\n\010metadata\030d \001(\0132\020.common.Me" + + "tadataR\010metadata\"\364\002\n\005Value\022\016\n\002id\030\001 \001(\tR\002" + + "id\022/\n\tattribute\030\002 \001(\0132\021.policy.Attribute" + + "R\tattribute\022\024\n\005value\030\003 \001(\tR\005value\022\'\n\007mem" + + "bers\030\004 \003(\0132\r.policy.ValueR\007members\0224\n\006gr" + + "ants\030\005 \003(\0132\034.kasregistry.KeyAccessServer" + + "R\006grants\022\020\n\003fqn\030\006 \001(\tR\003fqn\0222\n\006active\030\007 \001" + + "(\0132\032.google.protobuf.BoolValueR\006active\022A" + + "\n\020subject_mappings\030\010 \003(\0132\026.policy.Subjec" + + "tMappingR\017subjectMappings\022,\n\010metadata\030d " + + "\001(\0132\020.common.MetadataR\010metadata\"\326\001\n\006Acti" + + "on\022;\n\010standard\030\001 \001(\0162\035.policy.Action.Sta" + + "ndardActionH\000R\010standard\022\030\n\006custom\030\002 \001(\tH" + + "\000R\006custom\"l\n\016StandardAction\022\037\n\033STANDARD_" + + "ACTION_UNSPECIFIED\020\000\022\033\n\027STANDARD_ACTION_" + + "DECRYPT\020\001\022\034\n\030STANDARD_ACTION_TRANSMIT\020\002B" + + "\007\n\005value\"\201\002\n\016SubjectMapping\022\016\n\002id\030\001 \001(\tR" + + "\002id\0226\n\017attribute_value\030\002 \001(\0132\r.policy.Va" + + "lueR\016attributeValue\022O\n\025subject_condition" + + "_set\030\003 \001(\0132\033.policy.SubjectConditionSetR" + + "\023subjectConditionSet\022(\n\007actions\030\004 \003(\0132\016." + + "policy.ActionR\007actions\022,\n\010metadata\030d \001(\013" + + "2\020.common.MetadataR\010metadata\"\306\001\n\tConditi" + + "on\0224\n\026subject_external_field\030\001 \001(\tR\024subj" + + "ectExternalField\022K\n\010operator\030\002 \001(\0162\".pol" + + "icy.SubjectMappingOperatorEnumB\013\272H\010\202\001\002\020\001" + + "\310\001\001R\010operator\0226\n\027subject_external_values" + + "\030\003 \003(\tR\025subjectExternalValues\"\247\001\n\016Condit" + + "ionGroup\022;\n\nconditions\030\001 \003(\0132\021.policy.Co" + + "nditionB\010\272H\005\222\001\002\010\001R\nconditions\022X\n\020boolean" + + "_operator\030\002 \001(\0162 .policy.ConditionBoolea" + + "nTypeEnumB\013\272H\010\202\001\002\020\001\310\001\001R\017booleanOperator\"" + + "Y\n\nSubjectSet\022K\n\020condition_groups\030\001 \003(\0132" + + "\026.policy.ConditionGroupB\010\272H\005\222\001\002\010\001R\017condi" + + "tionGroups\"\224\001\n\023SubjectConditionSet\022\016\n\002id" + + "\030\001 \001(\tR\002id\022?\n\014subject_sets\030\003 \003(\0132\022.polic" + + "y.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\022,\n\010m" + + "etadata\030d \001(\0132\020.common.MetadataR\010metadat" + + "a\"o\n\017SubjectProperty\022-\n\016external_field\030\001" + + " \001(\tB\006\272H\003\310\001\001R\rexternalField\022-\n\016external_" + + "value\030\002 \001(\tB\006\272H\003\310\001\001R\rexternalValue\"\245\001\n\017R" + + "esourceMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010metada" + + "ta\030\002 \001(\0132\020.common.MetadataR\010metadata\022>\n\017" + + "attribute_value\030\003 \001(\0132\r.policy.ValueB\006\272H" + + "\003\310\001\001R\016attributeValue\022\024\n\005terms\030\004 \003(\tR\005ter" + + "ms*\263\001\n\025AttributeRuleTypeEnum\022(\n$ATTRIBUT" + + "E_RULE_TYPE_ENUM_UNSPECIFIED\020\000\022#\n\037ATTRIB" + + "UTE_RULE_TYPE_ENUM_ALL_OF\020\001\022#\n\037ATTRIBUTE" + + "_RULE_TYPE_ENUM_ANY_OF\020\002\022&\n\"ATTRIBUTE_RU" + + "LE_TYPE_ENUM_HIERARCHY\020\003*\233\001\n\032SubjectMapp" + + "ingOperatorEnum\022-\n)SUBJECT_MAPPING_OPERA" + + "TOR_ENUM_UNSPECIFIED\020\000\022$\n SUBJECT_MAPPIN" + + "G_OPERATOR_ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_" + + "OPERATOR_ENUM_NOT_IN\020\002*\220\001\n\030ConditionBool" + + "eanTypeEnum\022+\n\'CONDITION_BOOLEAN_TYPE_EN" + + "UM_UNSPECIFIED\020\000\022#\n\037CONDITION_BOOLEAN_TY" + + "PE_ENUM_AND\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_" + + "ENUM_OR\020\002Bb\n\032io.opentdf.platform.policyB" + + "\014ObjectsProtoP\001\242\002\003PXX\252\002\006Policy\312\002\006Policy\342" + + "\002\022Policy\\GPBMetadata\352\002\006Policyb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + build.buf.validate.ValidateProto.getDescriptor(), + io.opentdf.platform.common.CommonProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.getDescriptor(), + }); + internal_static_policy_Namespace_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_policy_Namespace_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_Namespace_descriptor, + new java.lang.String[] { "Id", "Name", "Fqn", "Active", "Metadata", }); + internal_static_policy_Attribute_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_policy_Attribute_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_Attribute_descriptor, + new java.lang.String[] { "Id", "Namespace", "Name", "Rule", "Values", "Grants", "Fqn", "Active", "Metadata", }); + internal_static_policy_Value_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_policy_Value_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_Value_descriptor, + new java.lang.String[] { "Id", "Attribute", "Value", "Members", "Grants", "Fqn", "Active", "SubjectMappings", "Metadata", }); + internal_static_policy_Action_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_policy_Action_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_Action_descriptor, + new java.lang.String[] { "Standard", "Custom", "Value", }); + internal_static_policy_SubjectMapping_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_policy_SubjectMapping_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_SubjectMapping_descriptor, + new java.lang.String[] { "Id", "AttributeValue", "SubjectConditionSet", "Actions", "Metadata", }); + internal_static_policy_Condition_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_policy_Condition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_Condition_descriptor, + new java.lang.String[] { "SubjectExternalField", "Operator", "SubjectExternalValues", }); + internal_static_policy_ConditionGroup_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_policy_ConditionGroup_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_ConditionGroup_descriptor, + new java.lang.String[] { "Conditions", "BooleanOperator", }); + internal_static_policy_SubjectSet_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_policy_SubjectSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_SubjectSet_descriptor, + new java.lang.String[] { "ConditionGroups", }); + internal_static_policy_SubjectConditionSet_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_policy_SubjectConditionSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_SubjectConditionSet_descriptor, + new java.lang.String[] { "Id", "SubjectSets", "Metadata", }); + internal_static_policy_SubjectProperty_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_policy_SubjectProperty_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_SubjectProperty_descriptor, + new java.lang.String[] { "ExternalField", "ExternalValue", }); + internal_static_policy_ResourceMapping_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_policy_ResourceMapping_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_ResourceMapping_descriptor, + new java.lang.String[] { "Id", "Metadata", "AttributeValue", "Terms", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(build.buf.validate.ValidateProto.field); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + build.buf.validate.ValidateProto.getDescriptor(); + io.opentdf.platform.common.CommonProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ResourceMapping.java b/protocol/src/main/java/io/opentdf/platform/policy/ResourceMapping.java new file mode 100644 index 00000000..24f0abfb --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ResourceMapping.java @@ -0,0 +1,1119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ *
+ *Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values
+ * 
+ * + * Protobuf type {@code policy.ResourceMapping} + */ +public final class ResourceMapping extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.ResourceMapping) + ResourceMappingOrBuilder { +private static final long serialVersionUID = 0L; + // Use ResourceMapping.newBuilder() to construct. + private ResourceMapping(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourceMapping() { + id_ = ""; + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourceMapping(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.ResourceMapping.class, io.opentdf.platform.policy.ResourceMapping.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 2; + private io.opentdf.platform.common.Metadata metadata_; + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.Metadata getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + + public static final int ATTRIBUTE_VALUE_FIELD_NUMBER = 3; + private io.opentdf.platform.policy.Value attributeValue_; + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + * @return Whether the attributeValue field is set. + */ + @java.lang.Override + public boolean hasAttributeValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + * @return The attributeValue. + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getAttributeValue() { + return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder() { + return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; + } + + public static final int TERMS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string terms = 4 [json_name = "terms"]; + * @return A list containing the terms. + */ + public com.google.protobuf.ProtocolStringList + getTermsList() { + return terms_; + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @return The count of terms. + */ + public int getTermsCount() { + return terms_.size(); + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param index The index of the element to return. + * @return The terms at the given index. + */ + public java.lang.String getTerms(int index) { + return terms_.get(index); + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + public com.google.protobuf.ByteString + getTermsBytes(int index) { + return terms_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMetadata()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getAttributeValue()); + } + for (int i = 0; i < terms_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, terms_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMetadata()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAttributeValue()); + } + { + int dataSize = 0; + for (int i = 0; i < terms_.size(); i++) { + dataSize += computeStringSizeNoTag(terms_.getRaw(i)); + } + size += dataSize; + size += 1 * getTermsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.ResourceMapping)) { + return super.equals(obj); + } + io.opentdf.platform.policy.ResourceMapping other = (io.opentdf.platform.policy.ResourceMapping) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (hasAttributeValue() != other.hasAttributeValue()) return false; + if (hasAttributeValue()) { + if (!getAttributeValue() + .equals(other.getAttributeValue())) return false; + } + if (!getTermsList() + .equals(other.getTermsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (hasAttributeValue()) { + hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValue().hashCode(); + } + if (getTermsCount() > 0) { + hash = (37 * hash) + TERMS_FIELD_NUMBER; + hash = (53 * hash) + getTermsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.ResourceMapping parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.ResourceMapping parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.ResourceMapping parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.ResourceMapping parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.ResourceMapping prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values
+   * 
+ * + * Protobuf type {@code policy.ResourceMapping} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.ResourceMapping) + io.opentdf.platform.policy.ResourceMappingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.ResourceMapping.class, io.opentdf.platform.policy.ResourceMapping.Builder.class); + } + + // Construct using io.opentdf.platform.policy.ResourceMapping.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + getAttributeValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + attributeValue_ = null; + if (attributeValueBuilder_ != null) { + attributeValueBuilder_.dispose(); + attributeValueBuilder_ = null; + } + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping getDefaultInstanceForType() { + return io.opentdf.platform.policy.ResourceMapping.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping build() { + io.opentdf.platform.policy.ResourceMapping result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping buildPartial() { + io.opentdf.platform.policy.ResourceMapping result = new io.opentdf.platform.policy.ResourceMapping(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.ResourceMapping result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.attributeValue_ = attributeValueBuilder_ == null + ? attributeValue_ + : attributeValueBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + terms_.makeImmutable(); + result.terms_ = terms_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.ResourceMapping) { + return mergeFrom((io.opentdf.platform.policy.ResourceMapping)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.ResourceMapping other) { + if (other == io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.hasAttributeValue()) { + mergeAttributeValue(other.getAttributeValue()); + } + if (!other.terms_.isEmpty()) { + if (terms_.isEmpty()) { + terms_ = other.terms_; + bitField0_ |= 0x00000008; + } else { + ensureTermsIsMutable(); + terms_.addAll(other.terms_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getAttributeValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTermsIsMutable(); + terms_.add(s); + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.common.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + } + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private io.opentdf.platform.policy.Value attributeValue_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> attributeValueBuilder_; + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + * @return Whether the attributeValue field is set. + */ + public boolean hasAttributeValue() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + * @return The attributeValue. + */ + public io.opentdf.platform.policy.Value getAttributeValue() { + if (attributeValueBuilder_ == null) { + return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; + } else { + return attributeValueBuilder_.getMessage(); + } + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + public Builder setAttributeValue(io.opentdf.platform.policy.Value value) { + if (attributeValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attributeValue_ = value; + } else { + attributeValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + public Builder setAttributeValue( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (attributeValueBuilder_ == null) { + attributeValue_ = builderForValue.build(); + } else { + attributeValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + public Builder mergeAttributeValue(io.opentdf.platform.policy.Value value) { + if (attributeValueBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + attributeValue_ != null && + attributeValue_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { + getAttributeValueBuilder().mergeFrom(value); + } else { + attributeValue_ = value; + } + } else { + attributeValueBuilder_.mergeFrom(value); + } + if (attributeValue_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + public Builder clearAttributeValue() { + bitField0_ = (bitField0_ & ~0x00000004); + attributeValue_ = null; + if (attributeValueBuilder_ != null) { + attributeValueBuilder_.dispose(); + attributeValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Value.Builder getAttributeValueBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAttributeValueFieldBuilder().getBuilder(); + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder() { + if (attributeValueBuilder_ != null) { + return attributeValueBuilder_.getMessageOrBuilder(); + } else { + return attributeValue_ == null ? + io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; + } + } + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getAttributeValueFieldBuilder() { + if (attributeValueBuilder_ == null) { + attributeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + getAttributeValue(), + getParentForChildren(), + isClean()); + attributeValue_ = null; + } + return attributeValueBuilder_; + } + + private com.google.protobuf.LazyStringArrayList terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureTermsIsMutable() { + if (!terms_.isModifiable()) { + terms_ = new com.google.protobuf.LazyStringArrayList(terms_); + } + bitField0_ |= 0x00000008; + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @return A list containing the terms. + */ + public com.google.protobuf.ProtocolStringList + getTermsList() { + terms_.makeImmutable(); + return terms_; + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @return The count of terms. + */ + public int getTermsCount() { + return terms_.size(); + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param index The index of the element to return. + * @return The terms at the given index. + */ + public java.lang.String getTerms(int index) { + return terms_.get(index); + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + public com.google.protobuf.ByteString + getTermsBytes(int index) { + return terms_.getByteString(index); + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param index The index to set the value at. + * @param value The terms to set. + * @return This builder for chaining. + */ + public Builder setTerms( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTermsIsMutable(); + terms_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param value The terms to add. + * @return This builder for chaining. + */ + public Builder addTerms( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTermsIsMutable(); + terms_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param values The terms to add. + * @return This builder for chaining. + */ + public Builder addAllTerms( + java.lang.Iterable values) { + ensureTermsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, terms_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @return This builder for chaining. + */ + public Builder clearTerms() { + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008);; + onChanged(); + return this; + } + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param value The bytes of the terms to add. + * @return This builder for chaining. + */ + public Builder addTermsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureTermsIsMutable(); + terms_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.ResourceMapping) + } + + // @@protoc_insertion_point(class_scope:policy.ResourceMapping) + private static final io.opentdf.platform.policy.ResourceMapping DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.ResourceMapping(); + } + + public static io.opentdf.platform.policy.ResourceMapping getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceMapping parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ResourceMappingOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ResourceMappingOrBuilder.java new file mode 100644 index 00000000..a694033a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ResourceMappingOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface ResourceMappingOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.ResourceMapping) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + * .common.Metadata metadata = 2 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); + + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + * @return Whether the attributeValue field is set. + */ + boolean hasAttributeValue(); + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + * @return The attributeValue. + */ + io.opentdf.platform.policy.Value getAttributeValue(); + /** + * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder(); + + /** + * repeated string terms = 4 [json_name = "terms"]; + * @return A list containing the terms. + */ + java.util.List + getTermsList(); + /** + * repeated string terms = 4 [json_name = "terms"]; + * @return The count of terms. + */ + int getTermsCount(); + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param index The index of the element to return. + * @return The terms at the given index. + */ + java.lang.String getTerms(int index); + /** + * repeated string terms = 4 [json_name = "terms"]; + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + com.google.protobuf.ByteString + getTermsBytes(int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SelectorsProto.java b/protocol/src/main/java/io/opentdf/platform/policy/SelectorsProto.java new file mode 100644 index 00000000..9a741556 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SelectorsProto.java @@ -0,0 +1,172 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/selectors.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public final class SelectorsProto { + private SelectorsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeNamespaceSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeNamespaceSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeDefinitionSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeDefinitionSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeDefinitionSelector_ValueSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeValueSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeValueSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeValueSelector_AttributeSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026policy/selectors.proto\022\006policy\"\314\003\n\032Att" + + "ributeNamespaceSelector\022]\n\017with_attribut" + + "es\030\n \001(\01324.policy.AttributeNamespaceSele" + + "ctor.AttributeSelectorR\016withAttributes\032\316" + + "\002\n\021AttributeSelector\0223\n\026with_key_access_" + + "grants\030\001 \001(\010R\023withKeyAccessGrants\022c\n\013wit" + + "h_values\030\n \001(\0132B.policy.AttributeNamespa" + + "ceSelector.AttributeSelector.ValueSelect" + + "orR\nwithValues\032\236\001\n\rValueSelector\0223\n\026with" + + "_key_access_grants\030\001 \001(\010R\023withKeyAccessG" + + "rants\022*\n\021with_subject_maps\030\002 \001(\010R\017withSu" + + "bjectMaps\022,\n\022with_resource_maps\030\003 \001(\010R\020w" + + "ithResourceMaps\"\272\003\n\033AttributeDefinitionS" + + "elector\0223\n\026with_key_access_grants\030\001 \001(\010R" + + "\023withKeyAccessGrants\022\\\n\016with_namespace\030\n" + + " \001(\01325.policy.AttributeDefinitionSelecto" + + "r.NamespaceSelectorR\rwithNamespace\022R\n\013wi" + + "th_values\030\013 \001(\01321.policy.AttributeDefini" + + "tionSelector.ValueSelectorR\nwithValues\032\023" + + "\n\021NamespaceSelector\032\236\001\n\rValueSelector\0223\n" + + "\026with_key_access_grants\030\001 \001(\010R\023withKeyAc" + + "cessGrants\022*\n\021with_subject_maps\030\002 \001(\010R\017w" + + "ithSubjectMaps\022,\n\022with_resource_maps\030\003 \001" + + "(\010R\020withResourceMaps\"\313\003\n\026AttributeValueS" + + "elector\0223\n\026with_key_access_grants\030\001 \001(\010R" + + "\023withKeyAccessGrants\022*\n\021with_subject_map" + + "s\030\002 \001(\010R\017withSubjectMaps\022,\n\022with_resourc" + + "e_maps\030\003 \001(\010R\020withResourceMaps\022W\n\016with_a" + + "ttribute\030\n \001(\01320.policy.AttributeValueSe" + + "lector.AttributeSelectorR\rwithAttribute\032" + + "\310\001\n\021AttributeSelector\0223\n\026with_key_access" + + "_grants\030\001 \001(\010R\023withKeyAccessGrants\022i\n\016wi" + + "th_namespace\030\n \001(\0132B.policy.AttributeVal" + + "ueSelector.AttributeSelector.NamespaceSe" + + "lectorR\rwithNamespace\032\023\n\021NamespaceSelect" + + "orBd\n\032io.opentdf.platform.policyB\016Select" + + "orsProtoP\001\242\002\003PXX\252\002\006Policy\312\002\006Policy\342\002\022Pol" + + "icy\\GPBMetadata\352\002\006Policyb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_policy_AttributeNamespaceSelector_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_policy_AttributeNamespaceSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeNamespaceSelector_descriptor, + new java.lang.String[] { "WithAttributes", }); + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor = + internal_static_policy_AttributeNamespaceSelector_descriptor.getNestedTypes().get(0); + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor, + new java.lang.String[] { "WithKeyAccessGrants", "WithValues", }); + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor = + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor.getNestedTypes().get(0); + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor, + new java.lang.String[] { "WithKeyAccessGrants", "WithSubjectMaps", "WithResourceMaps", }); + internal_static_policy_AttributeDefinitionSelector_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_policy_AttributeDefinitionSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeDefinitionSelector_descriptor, + new java.lang.String[] { "WithKeyAccessGrants", "WithNamespace", "WithValues", }); + internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor = + internal_static_policy_AttributeDefinitionSelector_descriptor.getNestedTypes().get(0); + internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor, + new java.lang.String[] { }); + internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor = + internal_static_policy_AttributeDefinitionSelector_descriptor.getNestedTypes().get(1); + internal_static_policy_AttributeDefinitionSelector_ValueSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor, + new java.lang.String[] { "WithKeyAccessGrants", "WithSubjectMaps", "WithResourceMaps", }); + internal_static_policy_AttributeValueSelector_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_policy_AttributeValueSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeValueSelector_descriptor, + new java.lang.String[] { "WithKeyAccessGrants", "WithSubjectMaps", "WithResourceMaps", "WithAttribute", }); + internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor = + internal_static_policy_AttributeValueSelector_descriptor.getNestedTypes().get(0); + internal_static_policy_AttributeValueSelector_AttributeSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor, + new java.lang.String[] { "WithKeyAccessGrants", "WithNamespace", }); + internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor = + internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor.getNestedTypes().get(0); + internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSet.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSet.java new file mode 100644 index 00000000..2f0150b4 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSet.java @@ -0,0 +1,1104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ *
+ *A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet
+ *are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple
+ *Subject Mappings / Attribute Values and is an independent unit.
+ * 
+ * + * Protobuf type {@code policy.SubjectConditionSet} + */ +public final class SubjectConditionSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.SubjectConditionSet) + SubjectConditionSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectConditionSet.newBuilder() to construct. + private SubjectConditionSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectConditionSet() { + id_ = ""; + subjectSets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectConditionSet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.SubjectConditionSet.class, io.opentdf.platform.policy.SubjectConditionSet.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_SETS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List subjectSets_; + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getSubjectSetsList() { + return subjectSets_; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getSubjectSetsOrBuilderList() { + return subjectSets_; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getSubjectSetsCount() { + return subjectSets_.size(); + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { + return subjectSets_.get(index); + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + return subjectSets_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.Metadata metadata_; + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.Metadata getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + for (int i = 0; i < subjectSets_.size(); i++) { + output.writeMessage(3, subjectSets_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + for (int i = 0; i < subjectSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subjectSets_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.SubjectConditionSet)) { + return super.equals(obj); + } + io.opentdf.platform.policy.SubjectConditionSet other = (io.opentdf.platform.policy.SubjectConditionSet) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getSubjectSetsList() + .equals(other.getSubjectSetsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getSubjectSetsCount() > 0) { + hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectSetsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.SubjectConditionSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.SubjectConditionSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.SubjectConditionSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet
+   *are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple
+   *Subject Mappings / Attribute Values and is an independent unit.
+   * 
+ * + * Protobuf type {@code policy.SubjectConditionSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.SubjectConditionSet) + io.opentdf.platform.policy.SubjectConditionSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.SubjectConditionSet.class, io.opentdf.platform.policy.SubjectConditionSet.Builder.class); + } + + // Construct using io.opentdf.platform.policy.SubjectConditionSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectSetsFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + } else { + subjectSets_ = null; + subjectSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet getDefaultInstanceForType() { + return io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet build() { + io.opentdf.platform.policy.SubjectConditionSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet buildPartial() { + io.opentdf.platform.policy.SubjectConditionSet result = new io.opentdf.platform.policy.SubjectConditionSet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.SubjectConditionSet result) { + if (subjectSetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.subjectSets_ = subjectSets_; + } else { + result.subjectSets_ = subjectSetsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.SubjectConditionSet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.SubjectConditionSet) { + return mergeFrom((io.opentdf.platform.policy.SubjectConditionSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.SubjectConditionSet other) { + if (other == io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (subjectSetsBuilder_ == null) { + if (!other.subjectSets_.isEmpty()) { + if (subjectSets_.isEmpty()) { + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSubjectSetsIsMutable(); + subjectSets_.addAll(other.subjectSets_); + } + onChanged(); + } + } else { + if (!other.subjectSets_.isEmpty()) { + if (subjectSetsBuilder_.isEmpty()) { + subjectSetsBuilder_.dispose(); + subjectSetsBuilder_ = null; + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000002); + subjectSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectSetsFieldBuilder() : null; + } else { + subjectSetsBuilder_.addAllMessages(other.subjectSets_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: { + io.opentdf.platform.policy.SubjectSet m = + input.readMessage( + io.opentdf.platform.policy.SubjectSet.parser(), + extensionRegistry); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(m); + } else { + subjectSetsBuilder_.addMessage(m); + } + break; + } // case 26 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List subjectSets_ = + java.util.Collections.emptyList(); + private void ensureSubjectSetsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + subjectSets_ = new java.util.ArrayList(subjectSets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> subjectSetsBuilder_; + + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List getSubjectSetsList() { + if (subjectSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectSets_); + } else { + return subjectSetsBuilder_.getMessageList(); + } + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public int getSubjectSetsCount() { + if (subjectSetsBuilder_ == null) { + return subjectSets_.size(); + } else { + return subjectSetsBuilder_.getCount(); + } + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); + } else { + return subjectSetsBuilder_.getMessage(index); + } + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder setSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, value); + onChanged(); + } else { + subjectSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder setSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addSubjectSets(io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.add(value); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, value); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addSubjectSets( + io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addAllSubjectSets( + java.lang.Iterable values) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectSets_); + onChanged(); + } else { + subjectSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder clearSubjectSets() { + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + subjectSetsBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder removeSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.remove(index); + onChanged(); + } else { + subjectSetsBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSet.Builder getSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); } else { + return subjectSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List + getSubjectSetsOrBuilderList() { + if (subjectSetsBuilder_ != null) { + return subjectSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectSets_); + } + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder() { + return getSubjectSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); + } + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List + getSubjectSetsBuilderList() { + return getSubjectSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> + getSubjectSetsFieldBuilder() { + if (subjectSetsBuilder_ == null) { + subjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder>( + subjectSets_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + subjectSets_ = null; + } + return subjectSetsBuilder_; + } + + private io.opentdf.platform.common.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.SubjectConditionSet) + } + + // @@protoc_insertion_point(class_scope:policy.SubjectConditionSet) + private static final io.opentdf.platform.policy.SubjectConditionSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.SubjectConditionSet(); + } + + public static io.opentdf.platform.policy.SubjectConditionSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectConditionSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSetOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSetOrBuilder.java new file mode 100644 index 00000000..440224b5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSetOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface SubjectConditionSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.SubjectConditionSet) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getSubjectSetsList(); + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.SubjectSet getSubjectSets(int index); + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + int getSubjectSetsCount(); + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getSubjectSetsOrBuilderList(); + /** + * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index); + + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMapping.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMapping.java new file mode 100644 index 00000000..d8d0c94f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMapping.java @@ -0,0 +1,1676 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ *
+ *Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination
+ *
+ *Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one
+ *with permitted actions TRANSMIT and DECRYPT
+ *{
+ *"id": "someid",
+ *"attribute_value": {example_one_attribute_value...},
+ *"subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...},
+ *"actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}]
+ *}
+ * 
+ * + * Protobuf type {@code policy.SubjectMapping} + */ +public final class SubjectMapping extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.SubjectMapping) + SubjectMappingOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectMapping.newBuilder() to construct. + private SubjectMapping(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectMapping() { + id_ = ""; + actions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectMapping(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.SubjectMapping.class, io.opentdf.platform.policy.SubjectMapping.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_VALUE_FIELD_NUMBER = 2; + private io.opentdf.platform.policy.Value attributeValue_; + /** + *
+   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+   * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + * @return Whether the attributeValue field is set. + */ + @java.lang.Override + public boolean hasAttributeValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+   * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + * @return The attributeValue. + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getAttributeValue() { + return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; + } + /** + *
+   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+   * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder() { + return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; + } + + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 3; + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + /** + *
+   * the reusable SubjectConditionSet mapped to the given Attribute Value
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * the reusable SubjectConditionSet mapped to the given Attribute Value
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + *
+   * the reusable SubjectConditionSet mapped to the given Attribute Value
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + public static final int ACTIONS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List actions_; + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.Action getActions(int index) { + return actions_.get(index); + } + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.Metadata metadata_; + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.Metadata getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAttributeValue()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getSubjectConditionSet()); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(4, actions_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAttributeValue()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getSubjectConditionSet()); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, actions_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.SubjectMapping)) { + return super.equals(obj); + } + io.opentdf.platform.policy.SubjectMapping other = (io.opentdf.platform.policy.SubjectMapping) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasAttributeValue() != other.hasAttributeValue()) return false; + if (hasAttributeValue()) { + if (!getAttributeValue() + .equals(other.getAttributeValue())) return false; + } + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } + if (!getActionsList() + .equals(other.getActionsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasAttributeValue()) { + hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValue().hashCode(); + } + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.SubjectMapping parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.SubjectMapping parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.SubjectMapping parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.SubjectMapping parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.SubjectMapping prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination
+   *
+   *Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one
+   *with permitted actions TRANSMIT and DECRYPT
+   *{
+   *"id": "someid",
+   *"attribute_value": {example_one_attribute_value...},
+   *"subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...},
+   *"actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}]
+   *}
+   * 
+ * + * Protobuf type {@code policy.SubjectMapping} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.SubjectMapping) + io.opentdf.platform.policy.SubjectMappingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.SubjectMapping.class, io.opentdf.platform.policy.SubjectMapping.Builder.class); + } + + // Construct using io.opentdf.platform.policy.SubjectMapping.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeValueFieldBuilder(); + getSubjectConditionSetFieldBuilder(); + getActionsFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + attributeValue_ = null; + if (attributeValueBuilder_ != null) { + attributeValueBuilder_.dispose(); + attributeValueBuilder_ = null; + } + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getDefaultInstanceForType() { + return io.opentdf.platform.policy.SubjectMapping.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping build() { + io.opentdf.platform.policy.SubjectMapping result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping buildPartial() { + io.opentdf.platform.policy.SubjectMapping result = new io.opentdf.platform.policy.SubjectMapping(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.SubjectMapping result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.SubjectMapping result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributeValue_ = attributeValueBuilder_ == null + ? attributeValue_ + : attributeValueBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.SubjectMapping) { + return mergeFrom((io.opentdf.platform.policy.SubjectMapping)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.SubjectMapping other) { + if (other == io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAttributeValue()) { + mergeAttributeValue(other.getAttributeValue()); + } + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000008); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionsFieldBuilder() : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getAttributeValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.opentdf.platform.policy.Action m = + input.readMessage( + io.opentdf.platform.policy.Action.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 34 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.Value attributeValue_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> attributeValueBuilder_; + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + * @return Whether the attributeValue field is set. + */ + public boolean hasAttributeValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + * @return The attributeValue. + */ + public io.opentdf.platform.policy.Value getAttributeValue() { + if (attributeValueBuilder_ == null) { + return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; + } else { + return attributeValueBuilder_.getMessage(); + } + } + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + public Builder setAttributeValue(io.opentdf.platform.policy.Value value) { + if (attributeValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attributeValue_ = value; + } else { + attributeValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + public Builder setAttributeValue( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (attributeValueBuilder_ == null) { + attributeValue_ = builderForValue.build(); + } else { + attributeValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + public Builder mergeAttributeValue(io.opentdf.platform.policy.Value value) { + if (attributeValueBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + attributeValue_ != null && + attributeValue_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { + getAttributeValueBuilder().mergeFrom(value); + } else { + attributeValue_ = value; + } + } else { + attributeValueBuilder_.mergeFrom(value); + } + if (attributeValue_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + public Builder clearAttributeValue() { + bitField0_ = (bitField0_ & ~0x00000002); + attributeValue_ = null; + if (attributeValueBuilder_ != null) { + attributeValueBuilder_.dispose(); + attributeValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + public io.opentdf.platform.policy.Value.Builder getAttributeValueBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAttributeValueFieldBuilder().getBuilder(); + } + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder() { + if (attributeValueBuilder_ != null) { + return attributeValueBuilder_.getMessageOrBuilder(); + } else { + return attributeValue_ == null ? + io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; + } + } + /** + *
+     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+     * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getAttributeValueFieldBuilder() { + if (attributeValueBuilder_ == null) { + attributeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + getAttributeValue(), + getParentForChildren(), + isClean()); + attributeValue_ = null; + } + return attributeValueBuilder_; + } + + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000004); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + *
+     * the reusable SubjectConditionSet mapped to the given Attribute Value
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionsBuilder_; + + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder setActions( + int index, io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder setActions( + int index, io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder addActions(io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder addActions( + int index, io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder addActions( + io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder addActions( + int index, io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder getActionsBuilder( + int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( + io.opentdf.platform.policy.Action.getDefaultInstance()); + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder addActionsBuilder( + int index) { + return getActionsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Action.getDefaultInstance()); + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( + actions_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + private io.opentdf.platform.common.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.SubjectMapping) + } + + // @@protoc_insertion_point(class_scope:policy.SubjectMapping) + private static final io.opentdf.platform.policy.SubjectMapping DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.SubjectMapping(); + } + + public static io.opentdf.platform.policy.SubjectMapping getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectMapping parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOperatorEnum.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOperatorEnum.java new file mode 100644 index 00000000..201eab38 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOperatorEnum.java @@ -0,0 +1,127 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package
+ * 
+ * + * Protobuf enum {@code policy.SubjectMappingOperatorEnum} + */ +public enum SubjectMappingOperatorEnum + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0; + */ + SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED(0), + /** + * SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1; + */ + SUBJECT_MAPPING_OPERATOR_ENUM_IN(1), + /** + * SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2; + */ + SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN(2), + UNRECOGNIZED(-1), + ; + + /** + * SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0; + */ + public static final int SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED_VALUE = 0; + /** + * SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1; + */ + public static final int SUBJECT_MAPPING_OPERATOR_ENUM_IN_VALUE = 1; + /** + * SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2; + */ + public static final int SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SubjectMappingOperatorEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SubjectMappingOperatorEnum forNumber(int value) { + switch (value) { + case 0: return SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED; + case 1: return SUBJECT_MAPPING_OPERATOR_ENUM_IN; + case 2: return SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SubjectMappingOperatorEnum> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SubjectMappingOperatorEnum findValueByNumber(int number) { + return SubjectMappingOperatorEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.getDescriptor().getEnumTypes().get(1); + } + + private static final SubjectMappingOperatorEnum[] VALUES = values(); + + public static SubjectMappingOperatorEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SubjectMappingOperatorEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:policy.SubjectMappingOperatorEnum) +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOrBuilder.java new file mode 100644 index 00000000..8c500afb --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface SubjectMappingOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.SubjectMapping) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+   * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + * @return Whether the attributeValue field is set. + */ + boolean hasAttributeValue(); + /** + *
+   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+   * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + * @return The attributeValue. + */ + io.opentdf.platform.policy.Value getAttributeValue(); + /** + *
+   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
+   * 
+ * + * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder(); + + /** + *
+   * the reusable SubjectConditionSet mapped to the given Attribute Value
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + *
+   * the reusable SubjectConditionSet mapped to the given Attribute Value
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); + /** + *
+   * the reusable SubjectConditionSet mapped to the given Attribute Value
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); + + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + java.util.List + getActionsList(); + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + io.opentdf.platform.policy.Action getActions(int index); + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + int getActionsCount(); + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + java.util.List + getActionsOrBuilderList(); + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 4 [json_name = "actions"]; + */ + io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index); + + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectProperty.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectProperty.java new file mode 100644 index 00000000..96769a22 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectProperty.java @@ -0,0 +1,692 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ *
+ *A property of a Subject/Entity as a field->value pair.  This would mirror external user attributes retrieved
+ *from an authoritative source such as an IDP (Identity Provider) or User Store.  Examples include such ADFS/LDAP, OKTA, etc.
+ *For now, a valid property must contain both field & value. 
+ * 
+ * + * Protobuf type {@code policy.SubjectProperty} + */ +public final class SubjectProperty extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.SubjectProperty) + SubjectPropertyOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectProperty.newBuilder() to construct. + private SubjectProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectProperty() { + externalField_ = ""; + externalValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectProperty(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.SubjectProperty.class, io.opentdf.platform.policy.SubjectProperty.Builder.class); + } + + public static final int EXTERNAL_FIELD_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object externalField_ = ""; + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. + */ + @java.lang.Override + public java.lang.String getExternalField() { + java.lang.Object ref = externalField_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalField_ = s; + return s; + } + } + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExternalFieldBytes() { + java.lang.Object ref = externalField_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_VALUE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object externalValue_ = ""; + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. + */ + @java.lang.Override + public java.lang.String getExternalValue() { + java.lang.Object ref = externalValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalValue_ = s; + return s; + } + } + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExternalValueBytes() { + java.lang.Object ref = externalValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalField_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, externalField_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalValue_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalField_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, externalField_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, externalValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.SubjectProperty)) { + return super.equals(obj); + } + io.opentdf.platform.policy.SubjectProperty other = (io.opentdf.platform.policy.SubjectProperty) obj; + + if (!getExternalField() + .equals(other.getExternalField())) return false; + if (!getExternalValue() + .equals(other.getExternalValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXTERNAL_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getExternalField().hashCode(); + hash = (37 * hash) + EXTERNAL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getExternalValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.SubjectProperty parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.SubjectProperty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.SubjectProperty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.SubjectProperty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.SubjectProperty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *A property of a Subject/Entity as a field->value pair.  This would mirror external user attributes retrieved
+   *from an authoritative source such as an IDP (Identity Provider) or User Store.  Examples include such ADFS/LDAP, OKTA, etc.
+   *For now, a valid property must contain both field & value. 
+   * 
+ * + * Protobuf type {@code policy.SubjectProperty} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.SubjectProperty) + io.opentdf.platform.policy.SubjectPropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.SubjectProperty.class, io.opentdf.platform.policy.SubjectProperty.Builder.class); + } + + // Construct using io.opentdf.platform.policy.SubjectProperty.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + externalField_ = ""; + externalValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectProperty getDefaultInstanceForType() { + return io.opentdf.platform.policy.SubjectProperty.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectProperty build() { + io.opentdf.platform.policy.SubjectProperty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectProperty buildPartial() { + io.opentdf.platform.policy.SubjectProperty result = new io.opentdf.platform.policy.SubjectProperty(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.SubjectProperty result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.externalField_ = externalField_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.externalValue_ = externalValue_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.SubjectProperty) { + return mergeFrom((io.opentdf.platform.policy.SubjectProperty)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.SubjectProperty other) { + if (other == io.opentdf.platform.policy.SubjectProperty.getDefaultInstance()) return this; + if (!other.getExternalField().isEmpty()) { + externalField_ = other.externalField_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getExternalValue().isEmpty()) { + externalValue_ = other.externalValue_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + externalField_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + externalValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object externalField_ = ""; + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. + */ + public java.lang.String getExternalField() { + java.lang.Object ref = externalField_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalField_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. + */ + public com.google.protobuf.ByteString + getExternalFieldBytes() { + java.lang.Object ref = externalField_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @param value The externalField to set. + * @return This builder for chaining. + */ + public Builder setExternalField( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + externalField_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearExternalField() { + externalField_ = getDefaultInstance().getExternalField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @param value The bytes for externalField to set. + * @return This builder for chaining. + */ + public Builder setExternalFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + externalField_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object externalValue_ = ""; + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. + */ + public java.lang.String getExternalValue() { + java.lang.Object ref = externalValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. + */ + public com.google.protobuf.ByteString + getExternalValueBytes() { + java.lang.Object ref = externalValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @param value The externalValue to set. + * @return This builder for chaining. + */ + public Builder setExternalValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + externalValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearExternalValue() { + externalValue_ = getDefaultInstance().getExternalValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @param value The bytes for externalValue to set. + * @return This builder for chaining. + */ + public Builder setExternalValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + externalValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.SubjectProperty) + } + + // @@protoc_insertion_point(class_scope:policy.SubjectProperty) + private static final io.opentdf.platform.policy.SubjectProperty DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.SubjectProperty(); + } + + public static io.opentdf.platform.policy.SubjectProperty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectProperty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectProperty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectPropertyOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectPropertyOrBuilder.java new file mode 100644 index 00000000..69b9597b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectPropertyOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface SubjectPropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.SubjectProperty) + com.google.protobuf.MessageOrBuilder { + + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. + */ + java.lang.String getExternalField(); + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. + */ + com.google.protobuf.ByteString + getExternalFieldBytes(); + + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. + */ + java.lang.String getExternalValue(); + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. + */ + com.google.protobuf.ByteString + getExternalValueBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectSet.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectSet.java new file mode 100644 index 00000000..1123b8a9 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectSet.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + *
+ * A collection of Condition Groups
+ * 
+ * + * Protobuf type {@code policy.SubjectSet} + */ +public final class SubjectSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.SubjectSet) + SubjectSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectSet.newBuilder() to construct. + private SubjectSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectSet() { + conditionGroups_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectSet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.SubjectSet.class, io.opentdf.platform.policy.SubjectSet.Builder.class); + } + + public static final int CONDITION_GROUPS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List conditionGroups_; + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getConditionGroupsList() { + return conditionGroups_; + } + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getConditionGroupsOrBuilderList() { + return conditionGroups_; + } + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getConditionGroupsCount() { + return conditionGroups_.size(); + } + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.ConditionGroup getConditionGroups(int index) { + return conditionGroups_.get(index); + } + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.ConditionGroupOrBuilder getConditionGroupsOrBuilder( + int index) { + return conditionGroups_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < conditionGroups_.size(); i++) { + output.writeMessage(1, conditionGroups_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < conditionGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, conditionGroups_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.SubjectSet)) { + return super.equals(obj); + } + io.opentdf.platform.policy.SubjectSet other = (io.opentdf.platform.policy.SubjectSet) obj; + + if (!getConditionGroupsList() + .equals(other.getConditionGroupsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConditionGroupsCount() > 0) { + hash = (37 * hash) + CONDITION_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getConditionGroupsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.SubjectSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.SubjectSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.SubjectSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.SubjectSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.SubjectSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A collection of Condition Groups
+   * 
+ * + * Protobuf type {@code policy.SubjectSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.SubjectSet) + io.opentdf.platform.policy.SubjectSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.SubjectSet.class, io.opentdf.platform.policy.SubjectSet.Builder.class); + } + + // Construct using io.opentdf.platform.policy.SubjectSet.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conditionGroupsBuilder_ == null) { + conditionGroups_ = java.util.Collections.emptyList(); + } else { + conditionGroups_ = null; + conditionGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectSet getDefaultInstanceForType() { + return io.opentdf.platform.policy.SubjectSet.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectSet build() { + io.opentdf.platform.policy.SubjectSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectSet buildPartial() { + io.opentdf.platform.policy.SubjectSet result = new io.opentdf.platform.policy.SubjectSet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.SubjectSet result) { + if (conditionGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditionGroups_ = java.util.Collections.unmodifiableList(conditionGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditionGroups_ = conditionGroups_; + } else { + result.conditionGroups_ = conditionGroupsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.SubjectSet result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.SubjectSet) { + return mergeFrom((io.opentdf.platform.policy.SubjectSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.SubjectSet other) { + if (other == io.opentdf.platform.policy.SubjectSet.getDefaultInstance()) return this; + if (conditionGroupsBuilder_ == null) { + if (!other.conditionGroups_.isEmpty()) { + if (conditionGroups_.isEmpty()) { + conditionGroups_ = other.conditionGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionGroupsIsMutable(); + conditionGroups_.addAll(other.conditionGroups_); + } + onChanged(); + } + } else { + if (!other.conditionGroups_.isEmpty()) { + if (conditionGroupsBuilder_.isEmpty()) { + conditionGroupsBuilder_.dispose(); + conditionGroupsBuilder_ = null; + conditionGroups_ = other.conditionGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConditionGroupsFieldBuilder() : null; + } else { + conditionGroupsBuilder_.addAllMessages(other.conditionGroups_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.ConditionGroup m = + input.readMessage( + io.opentdf.platform.policy.ConditionGroup.parser(), + extensionRegistry); + if (conditionGroupsBuilder_ == null) { + ensureConditionGroupsIsMutable(); + conditionGroups_.add(m); + } else { + conditionGroupsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List conditionGroups_ = + java.util.Collections.emptyList(); + private void ensureConditionGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditionGroups_ = new java.util.ArrayList(conditionGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.ConditionGroup, io.opentdf.platform.policy.ConditionGroup.Builder, io.opentdf.platform.policy.ConditionGroupOrBuilder> conditionGroupsBuilder_; + + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public java.util.List getConditionGroupsList() { + if (conditionGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditionGroups_); + } else { + return conditionGroupsBuilder_.getMessageList(); + } + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public int getConditionGroupsCount() { + if (conditionGroupsBuilder_ == null) { + return conditionGroups_.size(); + } else { + return conditionGroupsBuilder_.getCount(); + } + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.ConditionGroup getConditionGroups(int index) { + if (conditionGroupsBuilder_ == null) { + return conditionGroups_.get(index); + } else { + return conditionGroupsBuilder_.getMessage(index); + } + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder setConditionGroups( + int index, io.opentdf.platform.policy.ConditionGroup value) { + if (conditionGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionGroupsIsMutable(); + conditionGroups_.set(index, value); + onChanged(); + } else { + conditionGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder setConditionGroups( + int index, io.opentdf.platform.policy.ConditionGroup.Builder builderForValue) { + if (conditionGroupsBuilder_ == null) { + ensureConditionGroupsIsMutable(); + conditionGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder addConditionGroups(io.opentdf.platform.policy.ConditionGroup value) { + if (conditionGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionGroupsIsMutable(); + conditionGroups_.add(value); + onChanged(); + } else { + conditionGroupsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder addConditionGroups( + int index, io.opentdf.platform.policy.ConditionGroup value) { + if (conditionGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionGroupsIsMutable(); + conditionGroups_.add(index, value); + onChanged(); + } else { + conditionGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder addConditionGroups( + io.opentdf.platform.policy.ConditionGroup.Builder builderForValue) { + if (conditionGroupsBuilder_ == null) { + ensureConditionGroupsIsMutable(); + conditionGroups_.add(builderForValue.build()); + onChanged(); + } else { + conditionGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder addConditionGroups( + int index, io.opentdf.platform.policy.ConditionGroup.Builder builderForValue) { + if (conditionGroupsBuilder_ == null) { + ensureConditionGroupsIsMutable(); + conditionGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder addAllConditionGroups( + java.lang.Iterable values) { + if (conditionGroupsBuilder_ == null) { + ensureConditionGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, conditionGroups_); + onChanged(); + } else { + conditionGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder clearConditionGroups() { + if (conditionGroupsBuilder_ == null) { + conditionGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionGroupsBuilder_.clear(); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public Builder removeConditionGroups(int index) { + if (conditionGroupsBuilder_ == null) { + ensureConditionGroupsIsMutable(); + conditionGroups_.remove(index); + onChanged(); + } else { + conditionGroupsBuilder_.remove(index); + } + return this; + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.ConditionGroup.Builder getConditionGroupsBuilder( + int index) { + return getConditionGroupsFieldBuilder().getBuilder(index); + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.ConditionGroupOrBuilder getConditionGroupsOrBuilder( + int index) { + if (conditionGroupsBuilder_ == null) { + return conditionGroups_.get(index); } else { + return conditionGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public java.util.List + getConditionGroupsOrBuilderList() { + if (conditionGroupsBuilder_ != null) { + return conditionGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditionGroups_); + } + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.ConditionGroup.Builder addConditionGroupsBuilder() { + return getConditionGroupsFieldBuilder().addBuilder( + io.opentdf.platform.policy.ConditionGroup.getDefaultInstance()); + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.ConditionGroup.Builder addConditionGroupsBuilder( + int index) { + return getConditionGroupsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.ConditionGroup.getDefaultInstance()); + } + /** + *
+     * multiple Condition Groups are evaluated with AND logic
+     * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + public java.util.List + getConditionGroupsBuilderList() { + return getConditionGroupsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.ConditionGroup, io.opentdf.platform.policy.ConditionGroup.Builder, io.opentdf.platform.policy.ConditionGroupOrBuilder> + getConditionGroupsFieldBuilder() { + if (conditionGroupsBuilder_ == null) { + conditionGroupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.ConditionGroup, io.opentdf.platform.policy.ConditionGroup.Builder, io.opentdf.platform.policy.ConditionGroupOrBuilder>( + conditionGroups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conditionGroups_ = null; + } + return conditionGroupsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.SubjectSet) + } + + // @@protoc_insertion_point(class_scope:policy.SubjectSet) + private static final io.opentdf.platform.policy.SubjectSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.SubjectSet(); + } + + public static io.opentdf.platform.policy.SubjectSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.SubjectSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectSetOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectSetOrBuilder.java new file mode 100644 index 00000000..9e1a1d6b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/SubjectSetOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface SubjectSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.SubjectSet) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + java.util.List + getConditionGroupsList(); + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.ConditionGroup getConditionGroups(int index); + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + int getConditionGroupsCount(); + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + java.util.List + getConditionGroupsOrBuilderList(); + /** + *
+   * multiple Condition Groups are evaluated with AND logic
+   * 
+ * + * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.ConditionGroupOrBuilder getConditionGroupsOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Value.java b/protocol/src/main/java/io/opentdf/platform/policy/Value.java new file mode 100644 index 00000000..752bb064 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/Value.java @@ -0,0 +1,2834 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +/** + * Protobuf type {@code policy.Value} + */ +public final class Value extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.Value) + ValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. + private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Value() { + id_ = ""; + value_ = ""; + members_ = java.util.Collections.emptyList(); + grants_ = java.util.Collections.emptyList(); + fqn_ = ""; + subjectMappings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Value(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Value.class, io.opentdf.platform.policy.Value.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * generated uuid in database
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * generated uuid in database
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_FIELD_NUMBER = 2; + private io.opentdf.platform.policy.Attribute attribute_; + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + @java.lang.Override + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + * @return The attribute. + */ + @java.lang.Override + public io.opentdf.platform.policy.Attribute getAttribute() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + + public static final int VALUE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * string value = 3 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBERS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List members_; + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + @java.lang.Override + public java.util.List getMembersList() { + return members_; + } + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + @java.lang.Override + public java.util.List + getMembersOrBuilderList() { + return members_; + } + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + @java.lang.Override + public int getMembersCount() { + return members_.size(); + } + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getMembers(int index) { + return members_.get(index); + } + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getMembersOrBuilder( + int index) { + return members_.get(index); + } + + public static final int GRANTS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List grants_; + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + @java.lang.Override + public java.util.List getGrantsList() { + return grants_; + } + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + @java.lang.Override + public java.util.List + getGrantsOrBuilderList() { + return grants_; + } + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + @java.lang.Override + public int getGrantsCount() { + return grants_.size(); + } + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index) { + return grants_.get(index); + } + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + @java.lang.Override + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( + int index) { + return grants_.get(index); + } + + public static final int FQN_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object fqn_ = ""; + /** + * string fqn = 6 [json_name = "fqn"]; + * @return The fqn. + */ + @java.lang.Override + public java.lang.String getFqn() { + java.lang.Object ref = fqn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqn_ = s; + return s; + } + } + /** + * string fqn = 6 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFqnBytes() { + java.lang.Object ref = fqn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIVE_FIELD_NUMBER = 7; + private com.google.protobuf.BoolValue active_; + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + * @return Whether the active field is set. + */ + @java.lang.Override + public boolean hasActive() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + * @return The active. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getActive() { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + + public static final int SUBJECT_MAPPINGS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List subjectMappings_; + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public java.util.List getSubjectMappingsList() { + return subjectMappings_; + } + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public java.util.List + getSubjectMappingsOrBuilderList() { + return subjectMappings_; + } + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public int getSubjectMappingsCount() { + return subjectMappings_.size(); + } + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { + return subjectMappings_.get(index); + } + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index) { + return subjectMappings_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.Metadata metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.Metadata getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAttribute()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_); + } + for (int i = 0; i < members_.size(); i++) { + output.writeMessage(4, members_.get(i)); + } + for (int i = 0; i < grants_.size(); i++) { + output.writeMessage(5, grants_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, fqn_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getActive()); + } + for (int i = 0; i < subjectMappings_.size(); i++) { + output.writeMessage(8, subjectMappings_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAttribute()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_); + } + for (int i = 0; i < members_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, members_.get(i)); + } + for (int i = 0; i < grants_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, grants_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, fqn_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getActive()); + } + for (int i = 0; i < subjectMappings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, subjectMappings_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.Value)) { + return super.equals(obj); + } + io.opentdf.platform.policy.Value other = (io.opentdf.platform.policy.Value) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasAttribute() != other.hasAttribute()) return false; + if (hasAttribute()) { + if (!getAttribute() + .equals(other.getAttribute())) return false; + } + if (!getValue() + .equals(other.getValue())) return false; + if (!getMembersList() + .equals(other.getMembersList())) return false; + if (!getGrantsList() + .equals(other.getGrantsList())) return false; + if (!getFqn() + .equals(other.getFqn())) return false; + if (hasActive() != other.hasActive()) return false; + if (hasActive()) { + if (!getActive() + .equals(other.getActive())) return false; + } + if (!getSubjectMappingsList() + .equals(other.getSubjectMappingsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasAttribute()) { + hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getAttribute().hashCode(); + } + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + if (getMembersCount() > 0) { + hash = (37 * hash) + MEMBERS_FIELD_NUMBER; + hash = (53 * hash) + getMembersList().hashCode(); + } + if (getGrantsCount() > 0) { + hash = (37 * hash) + GRANTS_FIELD_NUMBER; + hash = (53 * hash) + getGrantsList().hashCode(); + } + hash = (37 * hash) + FQN_FIELD_NUMBER; + hash = (53 * hash) + getFqn().hashCode(); + if (hasActive()) { + hash = (37 * hash) + ACTIVE_FIELD_NUMBER; + hash = (53 * hash) + getActive().hashCode(); + } + if (getSubjectMappingsCount() > 0) { + hash = (37 * hash) + SUBJECT_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMappingsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.Value parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Value parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Value parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.Value parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Value parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.Value parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.Value parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.Value parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.Value prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.Value} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.Value) + io.opentdf.platform.policy.ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.Value.class, io.opentdf.platform.policy.Value.Builder.class); + } + + // Construct using io.opentdf.platform.policy.Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeFieldBuilder(); + getMembersFieldBuilder(); + getGrantsFieldBuilder(); + getActiveFieldBuilder(); + getSubjectMappingsFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + value_ = ""; + if (membersBuilder_ == null) { + members_ = java.util.Collections.emptyList(); + } else { + members_ = null; + membersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (grantsBuilder_ == null) { + grants_ = java.util.Collections.emptyList(); + } else { + grants_ = null; + grantsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + fqn_ = ""; + active_ = null; + if (activeBuilder_ != null) { + activeBuilder_.dispose(); + activeBuilder_ = null; + } + if (subjectMappingsBuilder_ == null) { + subjectMappings_ = java.util.Collections.emptyList(); + } else { + subjectMappings_ = null; + subjectMappingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.Value getDefaultInstanceForType() { + return io.opentdf.platform.policy.Value.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.Value build() { + io.opentdf.platform.policy.Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.Value buildPartial() { + io.opentdf.platform.policy.Value result = new io.opentdf.platform.policy.Value(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.Value result) { + if (membersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + members_ = java.util.Collections.unmodifiableList(members_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.members_ = members_; + } else { + result.members_ = membersBuilder_.build(); + } + if (grantsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + grants_ = java.util.Collections.unmodifiableList(grants_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.grants_ = grants_; + } else { + result.grants_ = grantsBuilder_.build(); + } + if (subjectMappingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + subjectMappings_ = java.util.Collections.unmodifiableList(subjectMappings_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.subjectMappings_ = subjectMappings_; + } else { + result.subjectMappings_ = subjectMappingsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.Value result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attribute_ = attributeBuilder_ == null + ? attribute_ + : attributeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fqn_ = fqn_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.active_ = activeBuilder_ == null + ? active_ + : activeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.Value) { + return mergeFrom((io.opentdf.platform.policy.Value)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.Value other) { + if (other == io.opentdf.platform.policy.Value.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAttribute()) { + mergeAttribute(other.getAttribute()); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (membersBuilder_ == null) { + if (!other.members_.isEmpty()) { + if (members_.isEmpty()) { + members_ = other.members_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMembersIsMutable(); + members_.addAll(other.members_); + } + onChanged(); + } + } else { + if (!other.members_.isEmpty()) { + if (membersBuilder_.isEmpty()) { + membersBuilder_.dispose(); + membersBuilder_ = null; + members_ = other.members_; + bitField0_ = (bitField0_ & ~0x00000008); + membersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMembersFieldBuilder() : null; + } else { + membersBuilder_.addAllMessages(other.members_); + } + } + } + if (grantsBuilder_ == null) { + if (!other.grants_.isEmpty()) { + if (grants_.isEmpty()) { + grants_ = other.grants_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureGrantsIsMutable(); + grants_.addAll(other.grants_); + } + onChanged(); + } + } else { + if (!other.grants_.isEmpty()) { + if (grantsBuilder_.isEmpty()) { + grantsBuilder_.dispose(); + grantsBuilder_ = null; + grants_ = other.grants_; + bitField0_ = (bitField0_ & ~0x00000010); + grantsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGrantsFieldBuilder() : null; + } else { + grantsBuilder_.addAllMessages(other.grants_); + } + } + } + if (!other.getFqn().isEmpty()) { + fqn_ = other.fqn_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasActive()) { + mergeActive(other.getActive()); + } + if (subjectMappingsBuilder_ == null) { + if (!other.subjectMappings_.isEmpty()) { + if (subjectMappings_.isEmpty()) { + subjectMappings_ = other.subjectMappings_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureSubjectMappingsIsMutable(); + subjectMappings_.addAll(other.subjectMappings_); + } + onChanged(); + } + } else { + if (!other.subjectMappings_.isEmpty()) { + if (subjectMappingsBuilder_.isEmpty()) { + subjectMappingsBuilder_.dispose(); + subjectMappingsBuilder_ = null; + subjectMappings_ = other.subjectMappings_; + bitField0_ = (bitField0_ & ~0x00000080); + subjectMappingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectMappingsFieldBuilder() : null; + } else { + subjectMappingsBuilder_.addAllMessages(other.subjectMappings_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getAttributeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.opentdf.platform.policy.Value m = + input.readMessage( + io.opentdf.platform.policy.Value.parser(), + extensionRegistry); + if (membersBuilder_ == null) { + ensureMembersIsMutable(); + members_.add(m); + } else { + membersBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + io.opentdf.platform.kasregistry.KeyAccessServer m = + input.readMessage( + io.opentdf.platform.kasregistry.KeyAccessServer.parser(), + extensionRegistry); + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.add(m); + } else { + grantsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + fqn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getActiveFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + io.opentdf.platform.policy.SubjectMapping m = + input.readMessage( + io.opentdf.platform.policy.SubjectMapping.parser(), + extensionRegistry); + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(m); + } else { + subjectMappingsBuilder_.addMessage(m); + } + break; + } // case 66 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * generated uuid in database
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.Attribute attribute_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + public boolean hasAttribute() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + * @return The attribute. + */ + public io.opentdf.platform.policy.Attribute getAttribute() { + if (attributeBuilder_ == null) { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } else { + return attributeBuilder_.getMessage(); + } + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attribute_ = value; + } else { + attributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + public Builder setAttribute( + io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributeBuilder_ == null) { + attribute_ = builderForValue.build(); + } else { + attributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + attribute_ != null && + attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { + getAttributeBuilder().mergeFrom(value); + } else { + attribute_ = value; + } + } else { + attributeBuilder_.mergeFrom(value); + } + if (attribute_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + public Builder clearAttribute() { + bitField0_ = (bitField0_ & ~0x00000002); + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAttributeFieldBuilder().getBuilder(); + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + if (attributeBuilder_ != null) { + return attributeBuilder_.getMessageOrBuilder(); + } else { + return attribute_ == null ? + io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + } + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> + getAttributeFieldBuilder() { + if (attributeBuilder_ == null) { + attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( + getAttribute(), + getParentForChildren(), + isClean()); + attribute_ = null; + } + return attributeBuilder_; + } + + private java.lang.Object value_ = ""; + /** + * string value = 3 [json_name = "value"]; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string value = 3 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string value = 3 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string value = 3 [json_name = "value"]; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List members_ = + java.util.Collections.emptyList(); + private void ensureMembersIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + members_ = new java.util.ArrayList(members_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> membersBuilder_; + + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public java.util.List getMembersList() { + if (membersBuilder_ == null) { + return java.util.Collections.unmodifiableList(members_); + } else { + return membersBuilder_.getMessageList(); + } + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public int getMembersCount() { + if (membersBuilder_ == null) { + return members_.size(); + } else { + return membersBuilder_.getCount(); + } + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public io.opentdf.platform.policy.Value getMembers(int index) { + if (membersBuilder_ == null) { + return members_.get(index); + } else { + return membersBuilder_.getMessage(index); + } + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder setMembers( + int index, io.opentdf.platform.policy.Value value) { + if (membersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMembersIsMutable(); + members_.set(index, value); + onChanged(); + } else { + membersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder setMembers( + int index, io.opentdf.platform.policy.Value.Builder builderForValue) { + if (membersBuilder_ == null) { + ensureMembersIsMutable(); + members_.set(index, builderForValue.build()); + onChanged(); + } else { + membersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder addMembers(io.opentdf.platform.policy.Value value) { + if (membersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMembersIsMutable(); + members_.add(value); + onChanged(); + } else { + membersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder addMembers( + int index, io.opentdf.platform.policy.Value value) { + if (membersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMembersIsMutable(); + members_.add(index, value); + onChanged(); + } else { + membersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder addMembers( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (membersBuilder_ == null) { + ensureMembersIsMutable(); + members_.add(builderForValue.build()); + onChanged(); + } else { + membersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder addMembers( + int index, io.opentdf.platform.policy.Value.Builder builderForValue) { + if (membersBuilder_ == null) { + ensureMembersIsMutable(); + members_.add(index, builderForValue.build()); + onChanged(); + } else { + membersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder addAllMembers( + java.lang.Iterable values) { + if (membersBuilder_ == null) { + ensureMembersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, members_); + onChanged(); + } else { + membersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder clearMembers() { + if (membersBuilder_ == null) { + members_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + membersBuilder_.clear(); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public Builder removeMembers(int index) { + if (membersBuilder_ == null) { + ensureMembersIsMutable(); + members_.remove(index); + onChanged(); + } else { + membersBuilder_.remove(index); + } + return this; + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public io.opentdf.platform.policy.Value.Builder getMembersBuilder( + int index) { + return getMembersFieldBuilder().getBuilder(index); + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getMembersOrBuilder( + int index) { + if (membersBuilder_ == null) { + return members_.get(index); } else { + return membersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public java.util.List + getMembersOrBuilderList() { + if (membersBuilder_ != null) { + return membersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(members_); + } + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public io.opentdf.platform.policy.Value.Builder addMembersBuilder() { + return getMembersFieldBuilder().addBuilder( + io.opentdf.platform.policy.Value.getDefaultInstance()); + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public io.opentdf.platform.policy.Value.Builder addMembersBuilder( + int index) { + return getMembersFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Value.getDefaultInstance()); + } + /** + *
+     * list of attribute values that this value is related to (attribute group)
+     * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + public java.util.List + getMembersBuilderList() { + return getMembersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getMembersFieldBuilder() { + if (membersBuilder_ == null) { + membersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + members_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + members_ = null; + } + return membersBuilder_; + } + + private java.util.List grants_ = + java.util.Collections.emptyList(); + private void ensureGrantsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + grants_ = new java.util.ArrayList(grants_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> grantsBuilder_; + + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public java.util.List getGrantsList() { + if (grantsBuilder_ == null) { + return java.util.Collections.unmodifiableList(grants_); + } else { + return grantsBuilder_.getMessageList(); + } + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public int getGrantsCount() { + if (grantsBuilder_ == null) { + return grants_.size(); + } else { + return grantsBuilder_.getCount(); + } + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index) { + if (grantsBuilder_ == null) { + return grants_.get(index); + } else { + return grantsBuilder_.getMessage(index); + } + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder setGrants( + int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (grantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGrantsIsMutable(); + grants_.set(index, value); + onChanged(); + } else { + grantsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder setGrants( + int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.set(index, builderForValue.build()); + onChanged(); + } else { + grantsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder addGrants(io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (grantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGrantsIsMutable(); + grants_.add(value); + onChanged(); + } else { + grantsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder addGrants( + int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { + if (grantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGrantsIsMutable(); + grants_.add(index, value); + onChanged(); + } else { + grantsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder addGrants( + io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.add(builderForValue.build()); + onChanged(); + } else { + grantsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder addGrants( + int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.add(index, builderForValue.build()); + onChanged(); + } else { + grantsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder addAllGrants( + java.lang.Iterable values) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, grants_); + onChanged(); + } else { + grantsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder clearGrants() { + if (grantsBuilder_ == null) { + grants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + grantsBuilder_.clear(); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public Builder removeGrants(int index) { + if (grantsBuilder_ == null) { + ensureGrantsIsMutable(); + grants_.remove(index); + onChanged(); + } else { + grantsBuilder_.remove(index); + } + return this; + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getGrantsBuilder( + int index) { + return getGrantsFieldBuilder().getBuilder(index); + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( + int index) { + if (grantsBuilder_ == null) { + return grants_.get(index); } else { + return grantsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public java.util.List + getGrantsOrBuilderList() { + if (grantsBuilder_ != null) { + return grantsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(grants_); + } + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addGrantsBuilder() { + return getGrantsFieldBuilder().addBuilder( + io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addGrantsBuilder( + int index) { + return getGrantsFieldBuilder().addBuilder( + index, io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); + } + /** + *
+     * list of key access servers
+     * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + public java.util.List + getGrantsBuilderList() { + return getGrantsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> + getGrantsFieldBuilder() { + if (grantsBuilder_ == null) { + grantsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( + grants_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + grants_ = null; + } + return grantsBuilder_; + } + + private java.lang.Object fqn_ = ""; + /** + * string fqn = 6 [json_name = "fqn"]; + * @return The fqn. + */ + public java.lang.String getFqn() { + java.lang.Object ref = fqn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string fqn = 6 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + public com.google.protobuf.ByteString + getFqnBytes() { + java.lang.Object ref = fqn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string fqn = 6 [json_name = "fqn"]; + * @param value The fqn to set. + * @return This builder for chaining. + */ + public Builder setFqn( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fqn_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string fqn = 6 [json_name = "fqn"]; + * @return This builder for chaining. + */ + public Builder clearFqn() { + fqn_ = getDefaultInstance().getFqn(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string fqn = 6 [json_name = "fqn"]; + * @param value The bytes for fqn to set. + * @return This builder for chaining. + */ + public Builder setFqnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fqn_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue active_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> activeBuilder_; + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + * @return Whether the active field is set. + */ + public boolean hasActive() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + * @return The active. + */ + public com.google.protobuf.BoolValue getActive() { + if (activeBuilder_ == null) { + return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } else { + return activeBuilder_.getMessage(); + } + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + public Builder setActive(com.google.protobuf.BoolValue value) { + if (activeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + active_ = value; + } else { + activeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + public Builder setActive( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (activeBuilder_ == null) { + active_ = builderForValue.build(); + } else { + activeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + public Builder mergeActive(com.google.protobuf.BoolValue value) { + if (activeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + active_ != null && + active_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getActiveBuilder().mergeFrom(value); + } else { + active_ = value; + } + } else { + activeBuilder_.mergeFrom(value); + } + if (active_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + public Builder clearActive() { + bitField0_ = (bitField0_ & ~0x00000040); + active_ = null; + if (activeBuilder_ != null) { + activeBuilder_.dispose(); + activeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + public com.google.protobuf.BoolValue.Builder getActiveBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getActiveFieldBuilder().getBuilder(); + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { + if (activeBuilder_ != null) { + return activeBuilder_.getMessageOrBuilder(); + } else { + return active_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : active_; + } + } + /** + *
+     * active by default until explicitly deactivated
+     * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getActiveFieldBuilder() { + if (activeBuilder_ == null) { + activeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getActive(), + getParentForChildren(), + isClean()); + active_ = null; + } + return activeBuilder_; + } + + private java.util.List subjectMappings_ = + java.util.Collections.emptyList(); + private void ensureSubjectMappingsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + subjectMappings_ = new java.util.ArrayList(subjectMappings_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingsBuilder_; + + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public java.util.List getSubjectMappingsList() { + if (subjectMappingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectMappings_); + } else { + return subjectMappingsBuilder_.getMessageList(); + } + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public int getSubjectMappingsCount() { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.size(); + } else { + return subjectMappingsBuilder_.getCount(); + } + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.get(index); + } else { + return subjectMappingsBuilder_.getMessage(index); + } + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder setSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.set(index, value); + onChanged(); + } else { + subjectMappingsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder setSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(value); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(index, value); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder addAllSubjectMappings( + java.lang.Iterable values) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectMappings_); + onChanged(); + } else { + subjectMappingsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder clearSubjectMappings() { + if (subjectMappingsBuilder_ == null) { + subjectMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + subjectMappingsBuilder_.clear(); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public Builder removeSubjectMappings(int index) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.remove(index); + onChanged(); + } else { + subjectMappingsBuilder_.remove(index); + } + return this; + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingsBuilder( + int index) { + return getSubjectMappingsFieldBuilder().getBuilder(index); + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index) { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.get(index); } else { + return subjectMappingsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public java.util.List + getSubjectMappingsOrBuilderList() { + if (subjectMappingsBuilder_ != null) { + return subjectMappingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectMappings_); + } + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder() { + return getSubjectMappingsFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder( + int index) { + return getSubjectMappingsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); + } + /** + *
+     * subject mapping
+     * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + public java.util.List + getSubjectMappingsBuilderList() { + return getSubjectMappingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> + getSubjectMappingsFieldBuilder() { + if (subjectMappingsBuilder_ == null) { + subjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( + subjectMappings_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + subjectMappings_ = null; + } + return subjectMappingsBuilder_; + } + + private io.opentdf.platform.common.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000100); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.Value) + } + + // @@protoc_insertion_point(class_scope:policy.Value) + private static final io.opentdf.platform.policy.Value DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.Value(); + } + + public static io.opentdf.platform.policy.Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ValueOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ValueOrBuilder.java new file mode 100644 index 00000000..9f79c4e9 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/ValueOrBuilder.java @@ -0,0 +1,255 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/objects.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy; + +public interface ValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.Value) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * generated uuid in database
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * generated uuid in database
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + boolean hasAttribute(); + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + * @return The attribute. + */ + io.opentdf.platform.policy.Attribute getAttribute(); + /** + * .policy.Attribute attribute = 2 [json_name = "attribute"]; + */ + io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); + + /** + * string value = 3 [json_name = "value"]; + * @return The value. + */ + java.lang.String getValue(); + /** + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + java.util.List + getMembersList(); + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + io.opentdf.platform.policy.Value getMembers(int index); + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + int getMembersCount(); + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + java.util.List + getMembersOrBuilderList(); + /** + *
+   * list of attribute values that this value is related to (attribute group)
+   * 
+ * + * repeated .policy.Value members = 4 [json_name = "members"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getMembersOrBuilder( + int index); + + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + java.util.List + getGrantsList(); + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index); + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + int getGrantsCount(); + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + java.util.List + getGrantsOrBuilderList(); + /** + *
+   * list of key access servers
+   * 
+ * + * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; + */ + io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( + int index); + + /** + * string fqn = 6 [json_name = "fqn"]; + * @return The fqn. + */ + java.lang.String getFqn(); + /** + * string fqn = 6 [json_name = "fqn"]; + * @return The bytes for fqn. + */ + com.google.protobuf.ByteString + getFqnBytes(); + + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + * @return Whether the active field is set. + */ + boolean hasActive(); + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + * @return The active. + */ + com.google.protobuf.BoolValue getActive(); + /** + *
+   * active by default until explicitly deactivated
+   * 
+ * + * .google.protobuf.BoolValue active = 7 [json_name = "active"]; + */ + com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder(); + + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + java.util.List + getSubjectMappingsList(); + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index); + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + int getSubjectMappingsCount(); + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + java.util.List + getSubjectMappingsOrBuilderList(); + /** + *
+   * subject mapping
+   * 
+ * + * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; + */ + io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequest.java new file mode 100644 index 00000000..96752c7c --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequest.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.AssignKeyAccessServerToAttributeRequest} + */ +public final class AssignKeyAccessServerToAttributeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.AssignKeyAccessServerToAttributeRequest) + AssignKeyAccessServerToAttributeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AssignKeyAccessServerToAttributeRequest.newBuilder() to construct. + private AssignKeyAccessServerToAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AssignKeyAccessServerToAttributeRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AssignKeyAccessServerToAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + @java.lang.Override + public boolean hasAttributeKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttributeKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttributeKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest other = (io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest) obj; + + if (hasAttributeKeyAccessServer() != other.hasAttributeKeyAccessServer()) return false; + if (hasAttributeKeyAccessServer()) { + if (!getAttributeKeyAccessServer() + .equals(other.getAttributeKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttributeKeyAccessServer()) { + hash = (37 * hash) + ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getAttributeKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.AssignKeyAccessServerToAttributeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.AssignKeyAccessServerToAttributeRequest) + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeKeyAccessServer_ = null; + if (attributeKeyAccessServerBuilder_ != null) { + attributeKeyAccessServerBuilder_.dispose(); + attributeKeyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest build() { + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest buildPartial() { + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest result = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeKeyAccessServer_ = attributeKeyAccessServerBuilder_ == null + ? attributeKeyAccessServer_ + : attributeKeyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest other) { + if (other == io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.getDefaultInstance()) return this; + if (other.hasAttributeKeyAccessServer()) { + mergeAttributeKeyAccessServer(other.getAttributeKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> attributeKeyAccessServerBuilder_; + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + public boolean hasAttributeKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { + if (attributeKeyAccessServerBuilder_ == null) { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } else { + return attributeKeyAccessServerBuilder_.getMessage(); + } + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder setAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { + if (attributeKeyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attributeKeyAccessServer_ = value; + } else { + attributeKeyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder setAttributeKeyAccessServer( + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder builderForValue) { + if (attributeKeyAccessServerBuilder_ == null) { + attributeKeyAccessServer_ = builderForValue.build(); + } else { + attributeKeyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder mergeAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { + if (attributeKeyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attributeKeyAccessServer_ != null && + attributeKeyAccessServer_ != io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) { + getAttributeKeyAccessServerBuilder().mergeFrom(value); + } else { + attributeKeyAccessServer_ = value; + } + } else { + attributeKeyAccessServerBuilder_.mergeFrom(value); + } + if (attributeKeyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder clearAttributeKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + attributeKeyAccessServer_ = null; + if (attributeKeyAccessServerBuilder_ != null) { + attributeKeyAccessServerBuilder_.dispose(); + attributeKeyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder getAttributeKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { + if (attributeKeyAccessServerBuilder_ != null) { + return attributeKeyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return attributeKeyAccessServer_ == null ? + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> + getAttributeKeyAccessServerFieldBuilder() { + if (attributeKeyAccessServerBuilder_ == null) { + attributeKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder>( + getAttributeKeyAccessServer(), + getParentForChildren(), + isClean()); + attributeKeyAccessServer_ = null; + } + return attributeKeyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.AssignKeyAccessServerToAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.AssignKeyAccessServerToAttributeRequest) + private static final io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest(); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssignKeyAccessServerToAttributeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequestOrBuilder.java new file mode 100644 index 00000000..a50a7da5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequestOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface AssignKeyAccessServerToAttributeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.AssignKeyAccessServerToAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + boolean hasAttributeKeyAccessServer(); + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer(); + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponse.java new file mode 100644 index 00000000..ed36fdbc --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.AssignKeyAccessServerToAttributeResponse} + */ +public final class AssignKeyAccessServerToAttributeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.AssignKeyAccessServerToAttributeResponse) + AssignKeyAccessServerToAttributeResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AssignKeyAccessServerToAttributeResponse.newBuilder() to construct. + private AssignKeyAccessServerToAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AssignKeyAccessServerToAttributeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AssignKeyAccessServerToAttributeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + @java.lang.Override + public boolean hasAttributeKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttributeKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttributeKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse other = (io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse) obj; + + if (hasAttributeKeyAccessServer() != other.hasAttributeKeyAccessServer()) return false; + if (hasAttributeKeyAccessServer()) { + if (!getAttributeKeyAccessServer() + .equals(other.getAttributeKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttributeKeyAccessServer()) { + hash = (37 * hash) + ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getAttributeKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.AssignKeyAccessServerToAttributeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.AssignKeyAccessServerToAttributeResponse) + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeKeyAccessServer_ = null; + if (attributeKeyAccessServerBuilder_ != null) { + attributeKeyAccessServerBuilder_.dispose(); + attributeKeyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse build() { + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse buildPartial() { + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse result = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeKeyAccessServer_ = attributeKeyAccessServerBuilder_ == null + ? attributeKeyAccessServer_ + : attributeKeyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse other) { + if (other == io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.getDefaultInstance()) return this; + if (other.hasAttributeKeyAccessServer()) { + mergeAttributeKeyAccessServer(other.getAttributeKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> attributeKeyAccessServerBuilder_; + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + public boolean hasAttributeKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { + if (attributeKeyAccessServerBuilder_ == null) { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } else { + return attributeKeyAccessServerBuilder_.getMessage(); + } + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder setAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { + if (attributeKeyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attributeKeyAccessServer_ = value; + } else { + attributeKeyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder setAttributeKeyAccessServer( + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder builderForValue) { + if (attributeKeyAccessServerBuilder_ == null) { + attributeKeyAccessServer_ = builderForValue.build(); + } else { + attributeKeyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder mergeAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { + if (attributeKeyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attributeKeyAccessServer_ != null && + attributeKeyAccessServer_ != io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) { + getAttributeKeyAccessServerBuilder().mergeFrom(value); + } else { + attributeKeyAccessServer_ = value; + } + } else { + attributeKeyAccessServerBuilder_.mergeFrom(value); + } + if (attributeKeyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder clearAttributeKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + attributeKeyAccessServer_ = null; + if (attributeKeyAccessServerBuilder_ != null) { + attributeKeyAccessServerBuilder_.dispose(); + attributeKeyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder getAttributeKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { + if (attributeKeyAccessServerBuilder_ != null) { + return attributeKeyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return attributeKeyAccessServer_ == null ? + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> + getAttributeKeyAccessServerFieldBuilder() { + if (attributeKeyAccessServerBuilder_ == null) { + attributeKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder>( + getAttributeKeyAccessServer(), + getParentForChildren(), + isClean()); + attributeKeyAccessServer_ = null; + } + return attributeKeyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.AssignKeyAccessServerToAttributeResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.AssignKeyAccessServerToAttributeResponse) + private static final io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse(); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssignKeyAccessServerToAttributeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponseOrBuilder.java new file mode 100644 index 00000000..9a301d8b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface AssignKeyAccessServerToAttributeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.AssignKeyAccessServerToAttributeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + boolean hasAttributeKeyAccessServer(); + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer(); + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequest.java new file mode 100644 index 00000000..52f2d837 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequest.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.AssignKeyAccessServerToValueRequest} + */ +public final class AssignKeyAccessServerToValueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.AssignKeyAccessServerToValueRequest) + AssignKeyAccessServerToValueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AssignKeyAccessServerToValueRequest.newBuilder() to construct. + private AssignKeyAccessServerToValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AssignKeyAccessServerToValueRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AssignKeyAccessServerToValueRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.Builder.class); + } + + private int bitField0_; + public static final int VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + @java.lang.Override + public boolean hasValueKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValueKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValueKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest other = (io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest) obj; + + if (hasValueKeyAccessServer() != other.hasValueKeyAccessServer()) return false; + if (hasValueKeyAccessServer()) { + if (!getValueKeyAccessServer() + .equals(other.getValueKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValueKeyAccessServer()) { + hash = (37 * hash) + VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getValueKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.AssignKeyAccessServerToValueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.AssignKeyAccessServerToValueRequest) + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueKeyAccessServer_ = null; + if (valueKeyAccessServerBuilder_ != null) { + valueKeyAccessServerBuilder_.dispose(); + valueKeyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest build() { + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest buildPartial() { + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest result = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.valueKeyAccessServer_ = valueKeyAccessServerBuilder_ == null + ? valueKeyAccessServer_ + : valueKeyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest other) { + if (other == io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.getDefaultInstance()) return this; + if (other.hasValueKeyAccessServer()) { + mergeValueKeyAccessServer(other.getValueKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> valueKeyAccessServerBuilder_; + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + public boolean hasValueKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { + if (valueKeyAccessServerBuilder_ == null) { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } else { + return valueKeyAccessServerBuilder_.getMessage(); + } + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder setValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { + if (valueKeyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueKeyAccessServer_ = value; + } else { + valueKeyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder setValueKeyAccessServer( + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder builderForValue) { + if (valueKeyAccessServerBuilder_ == null) { + valueKeyAccessServer_ = builderForValue.build(); + } else { + valueKeyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder mergeValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { + if (valueKeyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + valueKeyAccessServer_ != null && + valueKeyAccessServer_ != io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) { + getValueKeyAccessServerBuilder().mergeFrom(value); + } else { + valueKeyAccessServer_ = value; + } + } else { + valueKeyAccessServerBuilder_.mergeFrom(value); + } + if (valueKeyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder clearValueKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + valueKeyAccessServer_ = null; + if (valueKeyAccessServerBuilder_ != null) { + valueKeyAccessServerBuilder_.dispose(); + valueKeyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder getValueKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { + if (valueKeyAccessServerBuilder_ != null) { + return valueKeyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return valueKeyAccessServer_ == null ? + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> + getValueKeyAccessServerFieldBuilder() { + if (valueKeyAccessServerBuilder_ == null) { + valueKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder>( + getValueKeyAccessServer(), + getParentForChildren(), + isClean()); + valueKeyAccessServer_ = null; + } + return valueKeyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.AssignKeyAccessServerToValueRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.AssignKeyAccessServerToValueRequest) + private static final io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest(); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssignKeyAccessServerToValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequestOrBuilder.java new file mode 100644 index 00000000..7f171798 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequestOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface AssignKeyAccessServerToValueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.AssignKeyAccessServerToValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + boolean hasValueKeyAccessServer(); + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer(); + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponse.java new file mode 100644 index 00000000..bacef231 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.AssignKeyAccessServerToValueResponse} + */ +public final class AssignKeyAccessServerToValueResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.AssignKeyAccessServerToValueResponse) + AssignKeyAccessServerToValueResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AssignKeyAccessServerToValueResponse.newBuilder() to construct. + private AssignKeyAccessServerToValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AssignKeyAccessServerToValueResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AssignKeyAccessServerToValueResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.Builder.class); + } + + private int bitField0_; + public static final int VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + @java.lang.Override + public boolean hasValueKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValueKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValueKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse other = (io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse) obj; + + if (hasValueKeyAccessServer() != other.hasValueKeyAccessServer()) return false; + if (hasValueKeyAccessServer()) { + if (!getValueKeyAccessServer() + .equals(other.getValueKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValueKeyAccessServer()) { + hash = (37 * hash) + VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getValueKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.AssignKeyAccessServerToValueResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.AssignKeyAccessServerToValueResponse) + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueKeyAccessServer_ = null; + if (valueKeyAccessServerBuilder_ != null) { + valueKeyAccessServerBuilder_.dispose(); + valueKeyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse build() { + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse buildPartial() { + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse result = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.valueKeyAccessServer_ = valueKeyAccessServerBuilder_ == null + ? valueKeyAccessServer_ + : valueKeyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse other) { + if (other == io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.getDefaultInstance()) return this; + if (other.hasValueKeyAccessServer()) { + mergeValueKeyAccessServer(other.getValueKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> valueKeyAccessServerBuilder_; + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + public boolean hasValueKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { + if (valueKeyAccessServerBuilder_ == null) { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } else { + return valueKeyAccessServerBuilder_.getMessage(); + } + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder setValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { + if (valueKeyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueKeyAccessServer_ = value; + } else { + valueKeyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder setValueKeyAccessServer( + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder builderForValue) { + if (valueKeyAccessServerBuilder_ == null) { + valueKeyAccessServer_ = builderForValue.build(); + } else { + valueKeyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder mergeValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { + if (valueKeyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + valueKeyAccessServer_ != null && + valueKeyAccessServer_ != io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) { + getValueKeyAccessServerBuilder().mergeFrom(value); + } else { + valueKeyAccessServer_ = value; + } + } else { + valueKeyAccessServerBuilder_.mergeFrom(value); + } + if (valueKeyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder clearValueKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + valueKeyAccessServer_ = null; + if (valueKeyAccessServerBuilder_ != null) { + valueKeyAccessServerBuilder_.dispose(); + valueKeyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder getValueKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { + if (valueKeyAccessServerBuilder_ != null) { + return valueKeyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return valueKeyAccessServer_ == null ? + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> + getValueKeyAccessServerFieldBuilder() { + if (valueKeyAccessServerBuilder_ == null) { + valueKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder>( + getValueKeyAccessServer(), + getParentForChildren(), + isClean()); + valueKeyAccessServer_ = null; + } + return valueKeyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.AssignKeyAccessServerToValueResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.AssignKeyAccessServerToValueResponse) + private static final io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse(); + } + + public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssignKeyAccessServerToValueResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponseOrBuilder.java new file mode 100644 index 00000000..9bdfec88 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface AssignKeyAccessServerToValueResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.AssignKeyAccessServerToValueResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + boolean hasValueKeyAccessServer(); + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer(); + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServer.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServer.java new file mode 100644 index 00000000..16ae1bf5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServer.java @@ -0,0 +1,678 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.AttributeKeyAccessServer} + */ +public final class AttributeKeyAccessServer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.AttributeKeyAccessServer) + AttributeKeyAccessServerOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttributeKeyAccessServer.newBuilder() to construct. + private AttributeKeyAccessServer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttributeKeyAccessServer() { + attributeId_ = ""; + keyAccessServerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttributeKeyAccessServer(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.class, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder.class); + } + + public static final int ATTRIBUTE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object attributeId_ = ""; + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @return The attributeId. + */ + @java.lang.Override + public java.lang.String getAttributeId() { + java.lang.Object ref = attributeId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeId_ = s; + return s; + } + } + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @return The bytes for attributeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttributeIdBytes() { + java.lang.Object ref = attributeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_ACCESS_SERVER_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object keyAccessServerId_ = ""; + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The keyAccessServerId. + */ + @java.lang.Override + public java.lang.String getKeyAccessServerId() { + java.lang.Object ref = keyAccessServerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyAccessServerId_ = s; + return s; + } + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The bytes for keyAccessServerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyAccessServerIdBytes() { + java.lang.Object ref = keyAccessServerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyAccessServerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyAccessServerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyAccessServerId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyAccessServerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyAccessServerId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.AttributeKeyAccessServer)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer other = (io.opentdf.platform.policy.attributes.AttributeKeyAccessServer) obj; + + if (!getAttributeId() + .equals(other.getAttributeId())) return false; + if (!getKeyAccessServerId() + .equals(other.getKeyAccessServerId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeId().hashCode(); + hash = (37 * hash) + KEY_ACCESS_SERVER_ID_FIELD_NUMBER; + hash = (53 * hash) + getKeyAccessServerId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.AttributeKeyAccessServer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.AttributeKeyAccessServer) + io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.class, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeId_ = ""; + keyAccessServerId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer build() { + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer buildPartial() { + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer result = new io.opentdf.platform.policy.attributes.AttributeKeyAccessServer(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeId_ = attributeId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.keyAccessServerId_ = keyAccessServerId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.AttributeKeyAccessServer) { + return mergeFrom((io.opentdf.platform.policy.attributes.AttributeKeyAccessServer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer other) { + if (other == io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) return this; + if (!other.getAttributeId().isEmpty()) { + attributeId_ = other.attributeId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKeyAccessServerId().isEmpty()) { + keyAccessServerId_ = other.keyAccessServerId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + attributeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + keyAccessServerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object attributeId_ = ""; + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @return The attributeId. + */ + public java.lang.String getAttributeId() { + java.lang.Object ref = attributeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @return The bytes for attributeId. + */ + public com.google.protobuf.ByteString + getAttributeIdBytes() { + java.lang.Object ref = attributeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @param value The attributeId to set. + * @return This builder for chaining. + */ + public Builder setAttributeId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attributeId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @return This builder for chaining. + */ + public Builder clearAttributeId() { + attributeId_ = getDefaultInstance().getAttributeId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @param value The bytes for attributeId to set. + * @return This builder for chaining. + */ + public Builder setAttributeIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attributeId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object keyAccessServerId_ = ""; + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The keyAccessServerId. + */ + public java.lang.String getKeyAccessServerId() { + java.lang.Object ref = keyAccessServerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyAccessServerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The bytes for keyAccessServerId. + */ + public com.google.protobuf.ByteString + getKeyAccessServerIdBytes() { + java.lang.Object ref = keyAccessServerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyAccessServerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @param value The keyAccessServerId to set. + * @return This builder for chaining. + */ + public Builder setKeyAccessServerId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + keyAccessServerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return This builder for chaining. + */ + public Builder clearKeyAccessServerId() { + keyAccessServerId_ = getDefaultInstance().getKeyAccessServerId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @param value The bytes for keyAccessServerId to set. + * @return This builder for chaining. + */ + public Builder setKeyAccessServerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + keyAccessServerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.AttributeKeyAccessServer) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.AttributeKeyAccessServer) + private static final io.opentdf.platform.policy.attributes.AttributeKeyAccessServer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AttributeKeyAccessServer(); + } + + public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeKeyAccessServer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServerOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServerOrBuilder.java new file mode 100644 index 00000000..0648f8e4 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServerOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface AttributeKeyAccessServerOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.AttributeKeyAccessServer) + com.google.protobuf.MessageOrBuilder { + + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @return The attributeId. + */ + java.lang.String getAttributeId(); + /** + * string attribute_id = 1 [json_name = "attributeId"]; + * @return The bytes for attributeId. + */ + com.google.protobuf.ByteString + getAttributeIdBytes(); + + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The keyAccessServerId. + */ + java.lang.String getKeyAccessServerId(); + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The bytes for keyAccessServerId. + */ + com.google.protobuf.ByteString + getKeyAccessServerIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesProto.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesProto.java new file mode 100644 index 00000000..65f533f2 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesProto.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public final class AttributesProto { + private AttributesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_AttributeKeyAccessServer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_AttributeKeyAccessServer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_ValueKeyAccessServer_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_ValueKeyAccessServer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_ListAttributesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_ListAttributesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_ListAttributesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_ListAttributesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_GetAttributeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_GetAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_GetAttributeResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_GetAttributeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_CreateAttributeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_CreateAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_CreateAttributeResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_CreateAttributeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_UpdateAttributeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_UpdateAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_UpdateAttributeResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_UpdateAttributeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_DeactivateAttributeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_DeactivateAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_DeactivateAttributeResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_DeactivateAttributeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_GetAttributeValueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_GetAttributeValueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_GetAttributeValueResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_GetAttributeValueResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_ListAttributeValuesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_ListAttributeValuesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_ListAttributeValuesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_ListAttributeValuesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_CreateAttributeValueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_CreateAttributeValueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_CreateAttributeValueResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_CreateAttributeValueResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_UpdateAttributeValueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_UpdateAttributeValueResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_DeactivateAttributeValueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_DeactivateAttributeValueResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"policy/attributes/attributes.proto\022\021po" + + "licy.attributes\032\033buf/validate/validate.p" + + "roto\032\023common/common.proto\032\034google/api/an" + + "notations.proto\032\024policy/objects.proto\032\026p" + + "olicy/selectors.proto\"n\n\030AttributeKeyAcc" + + "essServer\022!\n\014attribute_id\030\001 \001(\tR\013attribu" + + "teId\022/\n\024key_access_server_id\030\002 \001(\tR\021keyA" + + "ccessServerId\"b\n\024ValueKeyAccessServer\022\031\n" + + "\010value_id\030\001 \001(\tR\007valueId\022/\n\024key_access_s" + + "erver_id\030\002 \001(\tR\021keyAccessServerId\"F\n\025Lis" + + "tAttributesRequest\022-\n\005state\030\001 \001(\0162\027.comm" + + "on.ActiveStateEnumR\005state\"K\n\026ListAttribu" + + "tesResponse\0221\n\nattributes\030\001 \003(\0132\021.policy" + + ".AttributeR\nattributes\"-\n\023GetAttributeRe" + + "quest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"G\n\024GetAttr" + + "ibuteResponse\022/\n\tattribute\030\001 \001(\0132\021.polic" + + "y.AttributeR\tattribute\"\324\001\n\026CreateAttribu" + + "teRequest\022)\n\014namespace_id\030\001 \001(\tB\006\272H\003\310\001\001R" + + "\013namespaceId\022\032\n\004name\030\002 \001(\tB\006\272H\003\310\001\001R\004name" + + "\022>\n\004rule\030\003 \001(\0162\035.policy.AttributeRuleTyp" + + "eEnumB\013\272H\010\202\001\002\020\001\310\001\001R\004rule\0223\n\010metadata\030d \001" + + "(\0132\027.common.MetadataMutableR\010metadata\"J\n" + + "\027CreateAttributeResponse\022/\n\tattribute\030\001 " + + "\001(\0132\021.policy.AttributeR\tattribute\"\273\001\n\026Up" + + "dateAttributeRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001" + + "R\002id\0223\n\010metadata\030d \001(\0132\027.common.Metadata" + + "MutableR\010metadata\022T\n\030metadata_update_beh" + + "avior\030e \001(\0162\032.common.MetadataUpdateEnumR" + + "\026metadataUpdateBehavior\"J\n\027UpdateAttribu" + + "teResponse\022/\n\tattribute\030\001 \001(\0132\021.policy.A" + + "ttributeR\tattribute\"4\n\032DeactivateAttribu" + + "teRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"N\n\033Dea" + + "ctivateAttributeResponse\022/\n\tattribute\030\001 " + + "\001(\0132\021.policy.AttributeR\tattribute\"2\n\030Get" + + "AttributeValueRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001" + + "\001R\002id\"@\n\031GetAttributeValueResponse\022#\n\005va" + + "lue\030\001 \001(\0132\r.policy.ValueR\005value\"v\n\032ListA" + + "ttributeValuesRequest\022)\n\014attribute_id\030\001 " + + "\001(\tB\006\272H\003\310\001\001R\013attributeId\022-\n\005state\030\002 \001(\0162" + + "\027.common.ActiveStateEnumR\005state\"D\n\033ListA" + + "ttributeValuesResponse\022%\n\006values\030\001 \003(\0132\r" + + ".policy.ValueR\006values\"\265\001\n\033CreateAttribut" + + "eValueRequest\022)\n\014attribute_id\030\001 \001(\tB\006\272H\003" + + "\310\001\001R\013attributeId\022\034\n\005value\030\002 \001(\tB\006\272H\003\310\001\001R" + + "\005value\022\030\n\007members\030\003 \003(\tR\007members\0223\n\010meta" + + "data\030d \001(\0132\027.common.MetadataMutableR\010met" + + "adata\"C\n\034CreateAttributeValueResponse\022#\n" + + "\005value\030\001 \001(\0132\r.policy.ValueR\005value\"\332\001\n\033U" + + "pdateAttributeValueRequest\022\026\n\002id\030\001 \001(\tB\006" + + "\272H\003\310\001\001R\002id\022\030\n\007members\030\004 \003(\tR\007members\0223\n\010" + + "metadata\030d \001(\0132\027.common.MetadataMutableR" + + "\010metadata\022T\n\030metadata_update_behavior\030e " + + "\001(\0162\032.common.MetadataUpdateEnumR\026metadat" + + "aUpdateBehavior\"C\n\034UpdateAttributeValueR" + + "esponse\022#\n\005value\030\001 \001(\0132\r.policy.ValueR\005v" + + "alue\"9\n\037DeactivateAttributeValueRequest\022" + + "\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"G\n DeactivateAtt" + + "ributeValueResponse\022#\n\005value\030\001 \001(\0132\r.pol" + + "icy.ValueR\005value\"\204\001\n\037GetAttributeValuesB" + + "yFqnsRequest\022\032\n\004fqns\030\001 \003(\tB\006\272H\003\310\001\001R\004fqns" + + "\022E\n\nwith_value\030\002 \001(\0132\036.policy.AttributeV" + + "alueSelectorB\006\272H\003\310\001\001R\twithValue\"\233\003\n GetA" + + "ttributeValuesByFqnsResponse\022}\n\024fqn_attr" + + "ibute_values\030\001 \003(\0132K.policy.attributes.G" + + "etAttributeValuesByFqnsResponse.FqnAttri" + + "buteValuesEntryR\022fqnAttributeValues\032i\n\021A" + + "ttributeAndValue\022/\n\tattribute\030\001 \001(\0132\021.po" + + "licy.AttributeR\tattribute\022#\n\005value\030\002 \001(\013" + + "2\r.policy.ValueR\005value\032\214\001\n\027FqnAttributeV" + + "aluesEntry\022\020\n\003key\030\001 \001(\tR\003key\022[\n\005value\030\002 " + + "\001(\0132E.policy.attributes.GetAttributeValu" + + "esByFqnsResponse.AttributeAndValueR\005valu" + + "e:\0028\001\"\225\001\n\'AssignKeyAccessServerToAttribu" + + "teRequest\022j\n\033attribute_key_access_server" + + "\030\001 \001(\0132+.policy.attributes.AttributeKeyA" + + "ccessServerR\030attributeKeyAccessServer\"\226\001" + + "\n(AssignKeyAccessServerToAttributeRespon" + + "se\022j\n\033attribute_key_access_server\030\001 \001(\0132" + + "+.policy.attributes.AttributeKeyAccessSe" + + "rverR\030attributeKeyAccessServer\"\227\001\n)Remov" + + "eKeyAccessServerFromAttributeRequest\022j\n\033" + + "attribute_key_access_server\030\001 \001(\0132+.poli" + + "cy.attributes.AttributeKeyAccessServerR\030" + + "attributeKeyAccessServer\"\230\001\n*RemoveKeyAc" + + "cessServerFromAttributeResponse\022j\n\033attri" + + "bute_key_access_server\030\001 \001(\0132+.policy.at" + + "tributes.AttributeKeyAccessServerR\030attri" + + "buteKeyAccessServer\"\205\001\n#AssignKeyAccessS" + + "erverToValueRequest\022^\n\027value_key_access_" + + "server\030\001 \001(\0132\'.policy.attributes.ValueKe" + + "yAccessServerR\024valueKeyAccessServer\"\206\001\n$" + + "AssignKeyAccessServerToValueResponse\022^\n\027" + + "value_key_access_server\030\001 \001(\0132\'.policy.a" + + "ttributes.ValueKeyAccessServerR\024valueKey" + + "AccessServer\"\207\001\n%RemoveKeyAccessServerFr" + + "omValueRequest\022^\n\027value_key_access_serve" + + "r\030\001 \001(\0132\'.policy.attributes.ValueKeyAcce" + + "ssServerR\024valueKeyAccessServer\"\210\001\n&Remov" + + "eKeyAccessServerFromValueResponse\022^\n\027val" + + "ue_key_access_server\030\001 \001(\0132\'.policy.attr" + + "ibutes.ValueKeyAccessServerR\024valueKeyAcc" + + "essServer2\307\023\n\021AttributesService\022g\n\016ListA" + + "ttributes\022(.policy.attributes.ListAttrib" + + "utesRequest\032).policy.attributes.ListAttr" + + "ibutesResponse\"\000\022v\n\023ListAttributeValues\022" + + "-.policy.attributes.ListAttributeValuesR" + + "equest\032..policy.attributes.ListAttribute" + + "ValuesResponse\"\000\022y\n\014GetAttribute\022&.polic" + + "y.attributes.GetAttributeRequest\032\'.polic" + + "y.attributes.GetAttributeResponse\"\030\202\323\344\223\002" + + "\022\022\020/attributes/{id}\022\236\001\n\030GetAttributeValu" + + "esByFqns\0222.policy.attributes.GetAttribut" + + "eValuesByFqnsRequest\0323.policy.attributes" + + ".GetAttributeValuesByFqnsResponse\"\031\202\323\344\223\002" + + "\023\022\021/attributes/*/fqn\022\200\001\n\017CreateAttribute" + + "\022).policy.attributes.CreateAttributeRequ" + + "est\032*.policy.attributes.CreateAttributeR" + + "esponse\"\026\202\323\344\223\002\020\"\013/attributes:\001*\022\205\001\n\017Upda" + + "teAttribute\022).policy.attributes.UpdateAt" + + "tributeRequest\032*.policy.attributes.Updat" + + "eAttributeResponse\"\033\202\323\344\223\002\0252\020/attributes/" + + "{id}:\001*\022\216\001\n\023DeactivateAttribute\022-.policy" + + ".attributes.DeactivateAttributeRequest\032." + + ".policy.attributes.DeactivateAttributeRe" + + "sponse\"\030\202\323\344\223\002\022*\020/attributes/{id}\022\221\001\n\021Get" + + "AttributeValue\022+.policy.attributes.GetAt" + + "tributeValueRequest\032,.policy.attributes." + + "GetAttributeValueResponse\"!\202\323\344\223\002\033\022\031/attr" + + "ibutes/*/values/{id}\022\245\001\n\024CreateAttribute" + + "Value\022..policy.attributes.CreateAttribut" + + "eValueRequest\032/.policy.attributes.Create" + + "AttributeValueResponse\",\202\323\344\223\002&\"!/attribu" + + "tes/{attribute_id}/values:\001*\022\235\001\n\024UpdateA" + + "ttributeValue\022..policy.attributes.Update" + + "AttributeValueRequest\032/.policy.attribute" + + "s.UpdateAttributeValueResponse\"$\202\323\344\223\002\0362\031" + + "/attributes/*/values/{id}:\001*\022\246\001\n\030Deactiv" + + "ateAttributeValue\0222.policy.attributes.De" + + "activateAttributeValueRequest\0323.policy.a" + + "ttributes.DeactivateAttributeValueRespon" + + "se\"!\202\323\344\223\002\033*\031/attributes/*/values/{id}\022\344\001" + + "\n AssignKeyAccessServerToAttribute\022:.pol" + + "icy.attributes.AssignKeyAccessServerToAt" + + "tributeRequest\032;.policy.attributes.Assig" + + "nKeyAccessServerToAttributeResponse\"G\202\323\344" + + "\223\002A\"\"/attributes/keyaccessserver/assign:" + + "\033attribute_key_access_server\022\352\001\n\"RemoveK" + + "eyAccessServerFromAttribute\022<.policy.att" + + "ributes.RemoveKeyAccessServerFromAttribu" + + "teRequest\032=.policy.attributes.RemoveKeyA" + + "ccessServerFromAttributeResponse\"G\202\323\344\223\002A" + + "\"\"/attributes/keyaccessserver/remove:\033at" + + "tribute_key_access_server\022\333\001\n\034AssignKeyA" + + "ccessServerToValue\0226.policy.attributes.A" + + "ssignKeyAccessServerToValueRequest\0327.pol" + + "icy.attributes.AssignKeyAccessServerToVa" + + "lueResponse\"J\202\323\344\223\002D\")/attributes/values/" + + "keyaccessserver/assign:\027value_key_access" + + "_server\022\341\001\n\036RemoveKeyAccessServerFromVal" + + "ue\0228.policy.attributes.RemoveKeyAccessSe" + + "rverFromValueRequest\0329.policy.attributes" + + ".RemoveKeyAccessServerFromValueResponse\"" + + "J\202\323\344\223\002D\")/attributes/values/keyaccessser" + + "ver/remove:\027value_key_access_serverB\235\001\n%" + + "io.opentdf.platform.policy.attributesB\017A" + + "ttributesProtoP\001\242\002\003PAX\252\002\021Policy.Attribut" + + "es\312\002\021Policy\\Attributes\342\002\035Policy\\Attribut" + + "es\\GPBMetadata\352\002\022Policy::Attributesb\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + build.buf.validate.ValidateProto.getDescriptor(), + io.opentdf.platform.common.CommonProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + io.opentdf.platform.policy.ObjectsProto.getDescriptor(), + io.opentdf.platform.policy.SelectorsProto.getDescriptor(), + }); + internal_static_policy_attributes_AttributeKeyAccessServer_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_policy_attributes_AttributeKeyAccessServer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_AttributeKeyAccessServer_descriptor, + new java.lang.String[] { "AttributeId", "KeyAccessServerId", }); + internal_static_policy_attributes_ValueKeyAccessServer_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_policy_attributes_ValueKeyAccessServer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_ValueKeyAccessServer_descriptor, + new java.lang.String[] { "ValueId", "KeyAccessServerId", }); + internal_static_policy_attributes_ListAttributesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_policy_attributes_ListAttributesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_ListAttributesRequest_descriptor, + new java.lang.String[] { "State", }); + internal_static_policy_attributes_ListAttributesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_policy_attributes_ListAttributesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_ListAttributesResponse_descriptor, + new java.lang.String[] { "Attributes", }); + internal_static_policy_attributes_GetAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_policy_attributes_GetAttributeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_GetAttributeRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_attributes_GetAttributeResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_policy_attributes_GetAttributeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_GetAttributeResponse_descriptor, + new java.lang.String[] { "Attribute", }); + internal_static_policy_attributes_CreateAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_policy_attributes_CreateAttributeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_CreateAttributeRequest_descriptor, + new java.lang.String[] { "NamespaceId", "Name", "Rule", "Metadata", }); + internal_static_policy_attributes_CreateAttributeResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_policy_attributes_CreateAttributeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_CreateAttributeResponse_descriptor, + new java.lang.String[] { "Attribute", }); + internal_static_policy_attributes_UpdateAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_policy_attributes_UpdateAttributeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_UpdateAttributeRequest_descriptor, + new java.lang.String[] { "Id", "Metadata", "MetadataUpdateBehavior", }); + internal_static_policy_attributes_UpdateAttributeResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_policy_attributes_UpdateAttributeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_UpdateAttributeResponse_descriptor, + new java.lang.String[] { "Attribute", }); + internal_static_policy_attributes_DeactivateAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_policy_attributes_DeactivateAttributeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_DeactivateAttributeRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_attributes_DeactivateAttributeResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_policy_attributes_DeactivateAttributeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_DeactivateAttributeResponse_descriptor, + new java.lang.String[] { "Attribute", }); + internal_static_policy_attributes_GetAttributeValueRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_policy_attributes_GetAttributeValueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_GetAttributeValueRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_attributes_GetAttributeValueResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_policy_attributes_GetAttributeValueResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_GetAttributeValueResponse_descriptor, + new java.lang.String[] { "Value", }); + internal_static_policy_attributes_ListAttributeValuesRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_policy_attributes_ListAttributeValuesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_ListAttributeValuesRequest_descriptor, + new java.lang.String[] { "AttributeId", "State", }); + internal_static_policy_attributes_ListAttributeValuesResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_policy_attributes_ListAttributeValuesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_ListAttributeValuesResponse_descriptor, + new java.lang.String[] { "Values", }); + internal_static_policy_attributes_CreateAttributeValueRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_policy_attributes_CreateAttributeValueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_CreateAttributeValueRequest_descriptor, + new java.lang.String[] { "AttributeId", "Value", "Members", "Metadata", }); + internal_static_policy_attributes_CreateAttributeValueResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_policy_attributes_CreateAttributeValueResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_CreateAttributeValueResponse_descriptor, + new java.lang.String[] { "Value", }); + internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_policy_attributes_UpdateAttributeValueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor, + new java.lang.String[] { "Id", "Members", "Metadata", "MetadataUpdateBehavior", }); + internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_policy_attributes_UpdateAttributeValueResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor, + new java.lang.String[] { "Value", }); + internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_policy_attributes_DeactivateAttributeValueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_policy_attributes_DeactivateAttributeValueResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor, + new java.lang.String[] { "Value", }); + internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor, + new java.lang.String[] { "Fqns", "WithValue", }); + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor, + new java.lang.String[] { "FqnAttributeValues", }); + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor = + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor.getNestedTypes().get(0); + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor, + new java.lang.String[] { "Attribute", "Value", }); + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_descriptor = + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor.getNestedTypes().get(1); + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor, + new java.lang.String[] { "AttributeKeyAccessServer", }); + internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor, + new java.lang.String[] { "AttributeKeyAccessServer", }); + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor, + new java.lang.String[] { "AttributeKeyAccessServer", }); + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor, + new java.lang.String[] { "AttributeKeyAccessServer", }); + internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor, + new java.lang.String[] { "ValueKeyAccessServer", }); + internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor, + new java.lang.String[] { "ValueKeyAccessServer", }); + internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor, + new java.lang.String[] { "ValueKeyAccessServer", }); + internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor, + new java.lang.String[] { "ValueKeyAccessServer", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(build.buf.validate.ValidateProto.field); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + build.buf.validate.ValidateProto.getDescriptor(); + io.opentdf.platform.common.CommonProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + io.opentdf.platform.policy.ObjectsProto.getDescriptor(); + io.opentdf.platform.policy.SelectorsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesServiceGrpc.java new file mode 100644 index 00000000..5a0569ea --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesServiceGrpc.java @@ -0,0 +1,1419 @@ +package io.opentdf.platform.policy.attributes; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ */
+ * / Attribute Service
+ * /
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.61.1)", + comments = "Source: policy/attributes/attributes.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AttributesServiceGrpc { + + private AttributesServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "policy.attributes.AttributesService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListAttributesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAttributes", + requestType = io.opentdf.platform.policy.attributes.ListAttributesRequest.class, + responseType = io.opentdf.platform.policy.attributes.ListAttributesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListAttributesMethod() { + io.grpc.MethodDescriptor getListAttributesMethod; + if ((getListAttributesMethod = AttributesServiceGrpc.getListAttributesMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getListAttributesMethod = AttributesServiceGrpc.getListAttributesMethod) == null) { + AttributesServiceGrpc.getListAttributesMethod = getListAttributesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAttributes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.ListAttributesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.ListAttributesResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("ListAttributes")) + .build(); + } + } + } + return getListAttributesMethod; + } + + private static volatile io.grpc.MethodDescriptor getListAttributeValuesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAttributeValues", + requestType = io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.class, + responseType = io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListAttributeValuesMethod() { + io.grpc.MethodDescriptor getListAttributeValuesMethod; + if ((getListAttributeValuesMethod = AttributesServiceGrpc.getListAttributeValuesMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getListAttributeValuesMethod = AttributesServiceGrpc.getListAttributeValuesMethod) == null) { + AttributesServiceGrpc.getListAttributeValuesMethod = getListAttributeValuesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAttributeValues")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("ListAttributeValues")) + .build(); + } + } + } + return getListAttributeValuesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAttribute", + requestType = io.opentdf.platform.policy.attributes.GetAttributeRequest.class, + responseType = io.opentdf.platform.policy.attributes.GetAttributeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAttributeMethod() { + io.grpc.MethodDescriptor getGetAttributeMethod; + if ((getGetAttributeMethod = AttributesServiceGrpc.getGetAttributeMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getGetAttributeMethod = AttributesServiceGrpc.getGetAttributeMethod) == null) { + AttributesServiceGrpc.getGetAttributeMethod = getGetAttributeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.GetAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.GetAttributeResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("GetAttribute")) + .build(); + } + } + } + return getGetAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAttributeValuesByFqnsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAttributeValuesByFqns", + requestType = io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.class, + responseType = io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAttributeValuesByFqnsMethod() { + io.grpc.MethodDescriptor getGetAttributeValuesByFqnsMethod; + if ((getGetAttributeValuesByFqnsMethod = AttributesServiceGrpc.getGetAttributeValuesByFqnsMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getGetAttributeValuesByFqnsMethod = AttributesServiceGrpc.getGetAttributeValuesByFqnsMethod) == null) { + AttributesServiceGrpc.getGetAttributeValuesByFqnsMethod = getGetAttributeValuesByFqnsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttributeValuesByFqns")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("GetAttributeValuesByFqns")) + .build(); + } + } + } + return getGetAttributeValuesByFqnsMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAttribute", + requestType = io.opentdf.platform.policy.attributes.CreateAttributeRequest.class, + responseType = io.opentdf.platform.policy.attributes.CreateAttributeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateAttributeMethod() { + io.grpc.MethodDescriptor getCreateAttributeMethod; + if ((getCreateAttributeMethod = AttributesServiceGrpc.getCreateAttributeMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getCreateAttributeMethod = AttributesServiceGrpc.getCreateAttributeMethod) == null) { + AttributesServiceGrpc.getCreateAttributeMethod = getCreateAttributeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.CreateAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.CreateAttributeResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("CreateAttribute")) + .build(); + } + } + } + return getCreateAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAttribute", + requestType = io.opentdf.platform.policy.attributes.UpdateAttributeRequest.class, + responseType = io.opentdf.platform.policy.attributes.UpdateAttributeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateAttributeMethod() { + io.grpc.MethodDescriptor getUpdateAttributeMethod; + if ((getUpdateAttributeMethod = AttributesServiceGrpc.getUpdateAttributeMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getUpdateAttributeMethod = AttributesServiceGrpc.getUpdateAttributeMethod) == null) { + AttributesServiceGrpc.getUpdateAttributeMethod = getUpdateAttributeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.UpdateAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.UpdateAttributeResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("UpdateAttribute")) + .build(); + } + } + } + return getUpdateAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeactivateAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeactivateAttribute", + requestType = io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.class, + responseType = io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeactivateAttributeMethod() { + io.grpc.MethodDescriptor getDeactivateAttributeMethod; + if ((getDeactivateAttributeMethod = AttributesServiceGrpc.getDeactivateAttributeMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getDeactivateAttributeMethod = AttributesServiceGrpc.getDeactivateAttributeMethod) == null) { + AttributesServiceGrpc.getDeactivateAttributeMethod = getDeactivateAttributeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeactivateAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("DeactivateAttribute")) + .build(); + } + } + } + return getDeactivateAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAttributeValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAttributeValue", + requestType = io.opentdf.platform.policy.attributes.GetAttributeValueRequest.class, + responseType = io.opentdf.platform.policy.attributes.GetAttributeValueResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAttributeValueMethod() { + io.grpc.MethodDescriptor getGetAttributeValueMethod; + if ((getGetAttributeValueMethod = AttributesServiceGrpc.getGetAttributeValueMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getGetAttributeValueMethod = AttributesServiceGrpc.getGetAttributeValueMethod) == null) { + AttributesServiceGrpc.getGetAttributeValueMethod = getGetAttributeValueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttributeValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.GetAttributeValueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.GetAttributeValueResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("GetAttributeValue")) + .build(); + } + } + } + return getGetAttributeValueMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateAttributeValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAttributeValue", + requestType = io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.class, + responseType = io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateAttributeValueMethod() { + io.grpc.MethodDescriptor getCreateAttributeValueMethod; + if ((getCreateAttributeValueMethod = AttributesServiceGrpc.getCreateAttributeValueMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getCreateAttributeValueMethod = AttributesServiceGrpc.getCreateAttributeValueMethod) == null) { + AttributesServiceGrpc.getCreateAttributeValueMethod = getCreateAttributeValueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAttributeValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("CreateAttributeValue")) + .build(); + } + } + } + return getCreateAttributeValueMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateAttributeValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAttributeValue", + requestType = io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.class, + responseType = io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateAttributeValueMethod() { + io.grpc.MethodDescriptor getUpdateAttributeValueMethod; + if ((getUpdateAttributeValueMethod = AttributesServiceGrpc.getUpdateAttributeValueMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getUpdateAttributeValueMethod = AttributesServiceGrpc.getUpdateAttributeValueMethod) == null) { + AttributesServiceGrpc.getUpdateAttributeValueMethod = getUpdateAttributeValueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAttributeValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("UpdateAttributeValue")) + .build(); + } + } + } + return getUpdateAttributeValueMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeactivateAttributeValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeactivateAttributeValue", + requestType = io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.class, + responseType = io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeactivateAttributeValueMethod() { + io.grpc.MethodDescriptor getDeactivateAttributeValueMethod; + if ((getDeactivateAttributeValueMethod = AttributesServiceGrpc.getDeactivateAttributeValueMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getDeactivateAttributeValueMethod = AttributesServiceGrpc.getDeactivateAttributeValueMethod) == null) { + AttributesServiceGrpc.getDeactivateAttributeValueMethod = getDeactivateAttributeValueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeactivateAttributeValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("DeactivateAttributeValue")) + .build(); + } + } + } + return getDeactivateAttributeValueMethod; + } + + private static volatile io.grpc.MethodDescriptor getAssignKeyAccessServerToAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AssignKeyAccessServerToAttribute", + requestType = io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.class, + responseType = io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAssignKeyAccessServerToAttributeMethod() { + io.grpc.MethodDescriptor getAssignKeyAccessServerToAttributeMethod; + if ((getAssignKeyAccessServerToAttributeMethod = AttributesServiceGrpc.getAssignKeyAccessServerToAttributeMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getAssignKeyAccessServerToAttributeMethod = AttributesServiceGrpc.getAssignKeyAccessServerToAttributeMethod) == null) { + AttributesServiceGrpc.getAssignKeyAccessServerToAttributeMethod = getAssignKeyAccessServerToAttributeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AssignKeyAccessServerToAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("AssignKeyAccessServerToAttribute")) + .build(); + } + } + } + return getAssignKeyAccessServerToAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveKeyAccessServerFromAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveKeyAccessServerFromAttribute", + requestType = io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.class, + responseType = io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveKeyAccessServerFromAttributeMethod() { + io.grpc.MethodDescriptor getRemoveKeyAccessServerFromAttributeMethod; + if ((getRemoveKeyAccessServerFromAttributeMethod = AttributesServiceGrpc.getRemoveKeyAccessServerFromAttributeMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getRemoveKeyAccessServerFromAttributeMethod = AttributesServiceGrpc.getRemoveKeyAccessServerFromAttributeMethod) == null) { + AttributesServiceGrpc.getRemoveKeyAccessServerFromAttributeMethod = getRemoveKeyAccessServerFromAttributeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveKeyAccessServerFromAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("RemoveKeyAccessServerFromAttribute")) + .build(); + } + } + } + return getRemoveKeyAccessServerFromAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor getAssignKeyAccessServerToValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AssignKeyAccessServerToValue", + requestType = io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.class, + responseType = io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAssignKeyAccessServerToValueMethod() { + io.grpc.MethodDescriptor getAssignKeyAccessServerToValueMethod; + if ((getAssignKeyAccessServerToValueMethod = AttributesServiceGrpc.getAssignKeyAccessServerToValueMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getAssignKeyAccessServerToValueMethod = AttributesServiceGrpc.getAssignKeyAccessServerToValueMethod) == null) { + AttributesServiceGrpc.getAssignKeyAccessServerToValueMethod = getAssignKeyAccessServerToValueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AssignKeyAccessServerToValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("AssignKeyAccessServerToValue")) + .build(); + } + } + } + return getAssignKeyAccessServerToValueMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveKeyAccessServerFromValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveKeyAccessServerFromValue", + requestType = io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.class, + responseType = io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveKeyAccessServerFromValueMethod() { + io.grpc.MethodDescriptor getRemoveKeyAccessServerFromValueMethod; + if ((getRemoveKeyAccessServerFromValueMethod = AttributesServiceGrpc.getRemoveKeyAccessServerFromValueMethod) == null) { + synchronized (AttributesServiceGrpc.class) { + if ((getRemoveKeyAccessServerFromValueMethod = AttributesServiceGrpc.getRemoveKeyAccessServerFromValueMethod) == null) { + AttributesServiceGrpc.getRemoveKeyAccessServerFromValueMethod = getRemoveKeyAccessServerFromValueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveKeyAccessServerFromValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.getDefaultInstance())) + .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("RemoveKeyAccessServerFromValue")) + .build(); + } + } + } + return getRemoveKeyAccessServerFromValueMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static AttributesServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AttributesServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AttributesServiceStub(channel, callOptions); + } + }; + return AttributesServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AttributesServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AttributesServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AttributesServiceBlockingStub(channel, callOptions); + } + }; + return AttributesServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static AttributesServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AttributesServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AttributesServiceFutureStub(channel, callOptions); + } + }; + return AttributesServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   */
+   * / Attribute Service
+   * /
+   * 
+ */ + public interface AsyncService { + + /** + *
+     *--------------------------------------*
+     * Attribute RPCs
+     *---------------------------------------
+     * 
+ */ + default void listAttributes(io.opentdf.platform.policy.attributes.ListAttributesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAttributesMethod(), responseObserver); + } + + /** + */ + default void listAttributeValues(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAttributeValuesMethod(), responseObserver); + } + + /** + */ + default void getAttribute(io.opentdf.platform.policy.attributes.GetAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAttributeMethod(), responseObserver); + } + + /** + */ + default void getAttributeValuesByFqns(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAttributeValuesByFqnsMethod(), responseObserver); + } + + /** + */ + default void createAttribute(io.opentdf.platform.policy.attributes.CreateAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateAttributeMethod(), responseObserver); + } + + /** + */ + default void updateAttribute(io.opentdf.platform.policy.attributes.UpdateAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateAttributeMethod(), responseObserver); + } + + /** + */ + default void deactivateAttribute(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeactivateAttributeMethod(), responseObserver); + } + + /** + *
+     *--------------------------------------*
+     * Value RPCs
+     *---------------------------------------
+     * 
+ */ + default void getAttributeValue(io.opentdf.platform.policy.attributes.GetAttributeValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAttributeValueMethod(), responseObserver); + } + + /** + */ + default void createAttributeValue(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateAttributeValueMethod(), responseObserver); + } + + /** + */ + default void updateAttributeValue(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateAttributeValueMethod(), responseObserver); + } + + /** + */ + default void deactivateAttributeValue(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeactivateAttributeValueMethod(), responseObserver); + } + + /** + *
+     *--------------------------------------*
+     * Attribute <> Key Access Server RPCs
+     *---------------------------------------
+     * 
+ */ + default void assignKeyAccessServerToAttribute(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAssignKeyAccessServerToAttributeMethod(), responseObserver); + } + + /** + */ + default void removeKeyAccessServerFromAttribute(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveKeyAccessServerFromAttributeMethod(), responseObserver); + } + + /** + */ + default void assignKeyAccessServerToValue(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAssignKeyAccessServerToValueMethod(), responseObserver); + } + + /** + */ + default void removeKeyAccessServerFromValue(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveKeyAccessServerFromValueMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AttributesService. + *
+   */
+   * / Attribute Service
+   * /
+   * 
+ */ + public static abstract class AttributesServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return AttributesServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AttributesService. + *
+   */
+   * / Attribute Service
+   * /
+   * 
+ */ + public static final class AttributesServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private AttributesServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AttributesServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AttributesServiceStub(channel, callOptions); + } + + /** + *
+     *--------------------------------------*
+     * Attribute RPCs
+     *---------------------------------------
+     * 
+ */ + public void listAttributes(io.opentdf.platform.policy.attributes.ListAttributesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAttributesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listAttributeValues(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAttributeValuesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getAttribute(io.opentdf.platform.policy.attributes.GetAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAttributeMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getAttributeValuesByFqns(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAttributeValuesByFqnsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void createAttribute(io.opentdf.platform.policy.attributes.CreateAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAttributeMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void updateAttribute(io.opentdf.platform.policy.attributes.UpdateAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAttributeMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deactivateAttribute(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeactivateAttributeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     *--------------------------------------*
+     * Value RPCs
+     *---------------------------------------
+     * 
+ */ + public void getAttributeValue(io.opentdf.platform.policy.attributes.GetAttributeValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAttributeValueMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void createAttributeValue(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAttributeValueMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void updateAttributeValue(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAttributeValueMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deactivateAttributeValue(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeactivateAttributeValueMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     *--------------------------------------*
+     * Attribute <> Key Access Server RPCs
+     *---------------------------------------
+     * 
+ */ + public void assignKeyAccessServerToAttribute(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAssignKeyAccessServerToAttributeMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeKeyAccessServerFromAttribute(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveKeyAccessServerFromAttributeMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void assignKeyAccessServerToValue(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAssignKeyAccessServerToValueMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeKeyAccessServerFromValue(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveKeyAccessServerFromValueMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AttributesService. + *
+   */
+   * / Attribute Service
+   * /
+   * 
+ */ + public static final class AttributesServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AttributesServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AttributesServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AttributesServiceBlockingStub(channel, callOptions); + } + + /** + *
+     *--------------------------------------*
+     * Attribute RPCs
+     *---------------------------------------
+     * 
+ */ + public io.opentdf.platform.policy.attributes.ListAttributesResponse listAttributes(io.opentdf.platform.policy.attributes.ListAttributesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAttributesMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse listAttributeValues(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAttributeValuesMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.GetAttributeResponse getAttribute(io.opentdf.platform.policy.attributes.GetAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAttributeMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse getAttributeValuesByFqns(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAttributeValuesByFqnsMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.CreateAttributeResponse createAttribute(io.opentdf.platform.policy.attributes.CreateAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAttributeMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.UpdateAttributeResponse updateAttribute(io.opentdf.platform.policy.attributes.UpdateAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAttributeMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse deactivateAttribute(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeactivateAttributeMethod(), getCallOptions(), request); + } + + /** + *
+     *--------------------------------------*
+     * Value RPCs
+     *---------------------------------------
+     * 
+ */ + public io.opentdf.platform.policy.attributes.GetAttributeValueResponse getAttributeValue(io.opentdf.platform.policy.attributes.GetAttributeValueRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAttributeValueMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse createAttributeValue(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAttributeValueMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse updateAttributeValue(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAttributeValueMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse deactivateAttributeValue(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeactivateAttributeValueMethod(), getCallOptions(), request); + } + + /** + *
+     *--------------------------------------*
+     * Attribute <> Key Access Server RPCs
+     *---------------------------------------
+     * 
+ */ + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse assignKeyAccessServerToAttribute(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAssignKeyAccessServerToAttributeMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse removeKeyAccessServerFromAttribute(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveKeyAccessServerFromAttributeMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse assignKeyAccessServerToValue(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAssignKeyAccessServerToValueMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse removeKeyAccessServerFromValue(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveKeyAccessServerFromValueMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AttributesService. + *
+   */
+   * / Attribute Service
+   * /
+   * 
+ */ + public static final class AttributesServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AttributesServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AttributesServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AttributesServiceFutureStub(channel, callOptions); + } + + /** + *
+     *--------------------------------------*
+     * Attribute RPCs
+     *---------------------------------------
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listAttributes( + io.opentdf.platform.policy.attributes.ListAttributesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAttributesMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listAttributeValues( + io.opentdf.platform.policy.attributes.ListAttributeValuesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAttributeValuesMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getAttribute( + io.opentdf.platform.policy.attributes.GetAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAttributeMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getAttributeValuesByFqns( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAttributeValuesByFqnsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createAttribute( + io.opentdf.platform.policy.attributes.CreateAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAttributeMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateAttribute( + io.opentdf.platform.policy.attributes.UpdateAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAttributeMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deactivateAttribute( + io.opentdf.platform.policy.attributes.DeactivateAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeactivateAttributeMethod(), getCallOptions()), request); + } + + /** + *
+     *--------------------------------------*
+     * Value RPCs
+     *---------------------------------------
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAttributeValue( + io.opentdf.platform.policy.attributes.GetAttributeValueRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAttributeValueMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createAttributeValue( + io.opentdf.platform.policy.attributes.CreateAttributeValueRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAttributeValueMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateAttributeValue( + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAttributeValueMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deactivateAttributeValue( + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeactivateAttributeValueMethod(), getCallOptions()), request); + } + + /** + *
+     *--------------------------------------*
+     * Attribute <> Key Access Server RPCs
+     *---------------------------------------
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture assignKeyAccessServerToAttribute( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAssignKeyAccessServerToAttributeMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeKeyAccessServerFromAttribute( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveKeyAccessServerFromAttributeMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture assignKeyAccessServerToValue( + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAssignKeyAccessServerToValueMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeKeyAccessServerFromValue( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveKeyAccessServerFromValueMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_ATTRIBUTES = 0; + private static final int METHODID_LIST_ATTRIBUTE_VALUES = 1; + private static final int METHODID_GET_ATTRIBUTE = 2; + private static final int METHODID_GET_ATTRIBUTE_VALUES_BY_FQNS = 3; + private static final int METHODID_CREATE_ATTRIBUTE = 4; + private static final int METHODID_UPDATE_ATTRIBUTE = 5; + private static final int METHODID_DEACTIVATE_ATTRIBUTE = 6; + private static final int METHODID_GET_ATTRIBUTE_VALUE = 7; + private static final int METHODID_CREATE_ATTRIBUTE_VALUE = 8; + private static final int METHODID_UPDATE_ATTRIBUTE_VALUE = 9; + private static final int METHODID_DEACTIVATE_ATTRIBUTE_VALUE = 10; + private static final int METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_ATTRIBUTE = 11; + private static final int METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_ATTRIBUTE = 12; + private static final int METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_VALUE = 13; + private static final int METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_VALUE = 14; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_ATTRIBUTES: + serviceImpl.listAttributes((io.opentdf.platform.policy.attributes.ListAttributesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ATTRIBUTE_VALUES: + serviceImpl.listAttributeValues((io.opentdf.platform.policy.attributes.ListAttributeValuesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ATTRIBUTE: + serviceImpl.getAttribute((io.opentdf.platform.policy.attributes.GetAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ATTRIBUTE_VALUES_BY_FQNS: + serviceImpl.getAttributeValuesByFqns((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_ATTRIBUTE: + serviceImpl.createAttribute((io.opentdf.platform.policy.attributes.CreateAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ATTRIBUTE: + serviceImpl.updateAttribute((io.opentdf.platform.policy.attributes.UpdateAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEACTIVATE_ATTRIBUTE: + serviceImpl.deactivateAttribute((io.opentdf.platform.policy.attributes.DeactivateAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ATTRIBUTE_VALUE: + serviceImpl.getAttributeValue((io.opentdf.platform.policy.attributes.GetAttributeValueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_ATTRIBUTE_VALUE: + serviceImpl.createAttributeValue((io.opentdf.platform.policy.attributes.CreateAttributeValueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ATTRIBUTE_VALUE: + serviceImpl.updateAttributeValue((io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEACTIVATE_ATTRIBUTE_VALUE: + serviceImpl.deactivateAttributeValue((io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_ATTRIBUTE: + serviceImpl.assignKeyAccessServerToAttribute((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_ATTRIBUTE: + serviceImpl.removeKeyAccessServerFromAttribute((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_VALUE: + serviceImpl.assignKeyAccessServerToValue((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_VALUE: + serviceImpl.removeKeyAccessServerFromValue((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListAttributesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.ListAttributesRequest, + io.opentdf.platform.policy.attributes.ListAttributesResponse>( + service, METHODID_LIST_ATTRIBUTES))) + .addMethod( + getListAttributeValuesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.ListAttributeValuesRequest, + io.opentdf.platform.policy.attributes.ListAttributeValuesResponse>( + service, METHODID_LIST_ATTRIBUTE_VALUES))) + .addMethod( + getGetAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.GetAttributeRequest, + io.opentdf.platform.policy.attributes.GetAttributeResponse>( + service, METHODID_GET_ATTRIBUTE))) + .addMethod( + getGetAttributeValuesByFqnsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest, + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse>( + service, METHODID_GET_ATTRIBUTE_VALUES_BY_FQNS))) + .addMethod( + getCreateAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.CreateAttributeRequest, + io.opentdf.platform.policy.attributes.CreateAttributeResponse>( + service, METHODID_CREATE_ATTRIBUTE))) + .addMethod( + getUpdateAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.UpdateAttributeRequest, + io.opentdf.platform.policy.attributes.UpdateAttributeResponse>( + service, METHODID_UPDATE_ATTRIBUTE))) + .addMethod( + getDeactivateAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.DeactivateAttributeRequest, + io.opentdf.platform.policy.attributes.DeactivateAttributeResponse>( + service, METHODID_DEACTIVATE_ATTRIBUTE))) + .addMethod( + getGetAttributeValueMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.GetAttributeValueRequest, + io.opentdf.platform.policy.attributes.GetAttributeValueResponse>( + service, METHODID_GET_ATTRIBUTE_VALUE))) + .addMethod( + getCreateAttributeValueMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.CreateAttributeValueRequest, + io.opentdf.platform.policy.attributes.CreateAttributeValueResponse>( + service, METHODID_CREATE_ATTRIBUTE_VALUE))) + .addMethod( + getUpdateAttributeValueMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest, + io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse>( + service, METHODID_UPDATE_ATTRIBUTE_VALUE))) + .addMethod( + getDeactivateAttributeValueMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest, + io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse>( + service, METHODID_DEACTIVATE_ATTRIBUTE_VALUE))) + .addMethod( + getAssignKeyAccessServerToAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest, + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse>( + service, METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_ATTRIBUTE))) + .addMethod( + getRemoveKeyAccessServerFromAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest, + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse>( + service, METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_ATTRIBUTE))) + .addMethod( + getAssignKeyAccessServerToValueMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest, + io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse>( + service, METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_VALUE))) + .addMethod( + getRemoveKeyAccessServerFromValueMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest, + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse>( + service, METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_VALUE))) + .build(); + } + + private static abstract class AttributesServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AttributesServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AttributesService"); + } + } + + private static final class AttributesServiceFileDescriptorSupplier + extends AttributesServiceBaseDescriptorSupplier { + AttributesServiceFileDescriptorSupplier() {} + } + + private static final class AttributesServiceMethodDescriptorSupplier + extends AttributesServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AttributesServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AttributesServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AttributesServiceFileDescriptorSupplier()) + .addMethod(getListAttributesMethod()) + .addMethod(getListAttributeValuesMethod()) + .addMethod(getGetAttributeMethod()) + .addMethod(getGetAttributeValuesByFqnsMethod()) + .addMethod(getCreateAttributeMethod()) + .addMethod(getUpdateAttributeMethod()) + .addMethod(getDeactivateAttributeMethod()) + .addMethod(getGetAttributeValueMethod()) + .addMethod(getCreateAttributeValueMethod()) + .addMethod(getUpdateAttributeValueMethod()) + .addMethod(getDeactivateAttributeValueMethod()) + .addMethod(getAssignKeyAccessServerToAttributeMethod()) + .addMethod(getRemoveKeyAccessServerFromAttributeMethod()) + .addMethod(getAssignKeyAccessServerToValueMethod()) + .addMethod(getRemoveKeyAccessServerFromValueMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequest.java new file mode 100644 index 00000000..a198cf41 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequest.java @@ -0,0 +1,1041 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.CreateAttributeRequest} + */ +public final class CreateAttributeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.CreateAttributeRequest) + CreateAttributeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateAttributeRequest.newBuilder() to construct. + private CreateAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateAttributeRequest() { + namespaceId_ = ""; + name_ = ""; + rule_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.CreateAttributeRequest.class, io.opentdf.platform.policy.attributes.CreateAttributeRequest.Builder.class); + } + + private int bitField0_; + public static final int NAMESPACE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object namespaceId_ = ""; + /** + *
+   * Required
+   * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @return The namespaceId. + */ + @java.lang.Override + public java.lang.String getNamespaceId() { + java.lang.Object ref = namespaceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespaceId_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @return The bytes for namespaceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNamespaceIdBytes() { + java.lang.Object ref = namespaceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespaceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_FIELD_NUMBER = 3; + private int rule_ = 0; + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for rule. + */ + @java.lang.Override public int getRuleValue() { + return rule_; + } + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The rule. + */ + @java.lang.Override public io.opentdf.platform.policy.AttributeRuleTypeEnum getRule() { + io.opentdf.platform.policy.AttributeRuleTypeEnum result = io.opentdf.platform.policy.AttributeRuleTypeEnum.forNumber(rule_); + return result == null ? io.opentdf.platform.policy.AttributeRuleTypeEnum.UNRECOGNIZED : result; + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespaceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (rule_ != io.opentdf.platform.policy.AttributeRuleTypeEnum.ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(3, rule_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespaceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (rule_ != io.opentdf.platform.policy.AttributeRuleTypeEnum.ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, rule_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.CreateAttributeRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.CreateAttributeRequest other = (io.opentdf.platform.policy.attributes.CreateAttributeRequest) obj; + + if (!getNamespaceId() + .equals(other.getNamespaceId())) return false; + if (!getName() + .equals(other.getName())) return false; + if (rule_ != other.rule_) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAMESPACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNamespaceId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RULE_FIELD_NUMBER; + hash = (53 * hash) + rule_; + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.CreateAttributeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.CreateAttributeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.CreateAttributeRequest) + io.opentdf.platform.policy.attributes.CreateAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.CreateAttributeRequest.class, io.opentdf.platform.policy.attributes.CreateAttributeRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.CreateAttributeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + namespaceId_ = ""; + name_ = ""; + rule_ = 0; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.CreateAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeRequest build() { + io.opentdf.platform.policy.attributes.CreateAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeRequest buildPartial() { + io.opentdf.platform.policy.attributes.CreateAttributeRequest result = new io.opentdf.platform.policy.attributes.CreateAttributeRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.CreateAttributeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.namespaceId_ = namespaceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rule_ = rule_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.CreateAttributeRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.CreateAttributeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.CreateAttributeRequest other) { + if (other == io.opentdf.platform.policy.attributes.CreateAttributeRequest.getDefaultInstance()) return this; + if (!other.getNamespaceId().isEmpty()) { + namespaceId_ = other.namespaceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.rule_ != 0) { + setRuleValue(other.getRuleValue()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + namespaceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + rule_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object namespaceId_ = ""; + /** + *
+     * Required
+     * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @return The namespaceId. + */ + public java.lang.String getNamespaceId() { + java.lang.Object ref = namespaceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespaceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @return The bytes for namespaceId. + */ + public com.google.protobuf.ByteString + getNamespaceIdBytes() { + java.lang.Object ref = namespaceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespaceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @param value The namespaceId to set. + * @return This builder for chaining. + */ + public Builder setNamespaceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + namespaceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearNamespaceId() { + namespaceId_ = getDefaultInstance().getNamespaceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @param value The bytes for namespaceId to set. + * @return This builder for chaining. + */ + public Builder setNamespaceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + namespaceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int rule_ = 0; + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for rule. + */ + @java.lang.Override public int getRuleValue() { + return rule_; + } + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @param value The enum numeric value on the wire for rule to set. + * @return This builder for chaining. + */ + public Builder setRuleValue(int value) { + rule_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The rule. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeRuleTypeEnum getRule() { + io.opentdf.platform.policy.AttributeRuleTypeEnum result = io.opentdf.platform.policy.AttributeRuleTypeEnum.forNumber(rule_); + return result == null ? io.opentdf.platform.policy.AttributeRuleTypeEnum.UNRECOGNIZED : result; + } + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @param value The rule to set. + * @return This builder for chaining. + */ + public Builder setRule(io.opentdf.platform.policy.AttributeRuleTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + rule_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearRule() { + bitField0_ = (bitField0_ & ~0x00000004); + rule_ = 0; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.CreateAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.CreateAttributeRequest) + private static final io.opentdf.platform.policy.attributes.CreateAttributeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.CreateAttributeRequest(); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAttributeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequestOrBuilder.java new file mode 100644 index 00000000..e880ffe5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequestOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface CreateAttributeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.CreateAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @return The namespaceId. + */ + java.lang.String getNamespaceId(); + /** + *
+   * Required
+   * 
+ * + * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } + * @return The bytes for namespaceId. + */ + com.google.protobuf.ByteString + getNamespaceIdBytes(); + + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for rule. + */ + int getRuleValue(); + /** + * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } + * @return The rule. + */ + io.opentdf.platform.policy.AttributeRuleTypeEnum getRule(); + + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponse.java new file mode 100644 index 00000000..64726edc --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.CreateAttributeResponse} + */ +public final class CreateAttributeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.CreateAttributeResponse) + CreateAttributeResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateAttributeResponse.newBuilder() to construct. + private CreateAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateAttributeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateAttributeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.CreateAttributeResponse.class, io.opentdf.platform.policy.attributes.CreateAttributeResponse.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Attribute attribute_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + @java.lang.Override + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + @java.lang.Override + public io.opentdf.platform.policy.Attribute getAttribute() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttribute()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttribute()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.CreateAttributeResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.CreateAttributeResponse other = (io.opentdf.platform.policy.attributes.CreateAttributeResponse) obj; + + if (hasAttribute() != other.hasAttribute()) return false; + if (hasAttribute()) { + if (!getAttribute() + .equals(other.getAttribute())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttribute()) { + hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getAttribute().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.CreateAttributeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.CreateAttributeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.CreateAttributeResponse) + io.opentdf.platform.policy.attributes.CreateAttributeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.CreateAttributeResponse.class, io.opentdf.platform.policy.attributes.CreateAttributeResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.CreateAttributeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.CreateAttributeResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeResponse build() { + io.opentdf.platform.policy.attributes.CreateAttributeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeResponse buildPartial() { + io.opentdf.platform.policy.attributes.CreateAttributeResponse result = new io.opentdf.platform.policy.attributes.CreateAttributeResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.CreateAttributeResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attribute_ = attributeBuilder_ == null + ? attribute_ + : attributeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.CreateAttributeResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.CreateAttributeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.CreateAttributeResponse other) { + if (other == io.opentdf.platform.policy.attributes.CreateAttributeResponse.getDefaultInstance()) return this; + if (other.hasAttribute()) { + mergeAttribute(other.getAttribute()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Attribute attribute_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + public io.opentdf.platform.policy.Attribute getAttribute() { + if (attributeBuilder_ == null) { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } else { + return attributeBuilder_.getMessage(); + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attribute_ = value; + } else { + attributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute( + io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributeBuilder_ == null) { + attribute_ = builderForValue.build(); + } else { + attributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attribute_ != null && + attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { + getAttributeBuilder().mergeFrom(value); + } else { + attribute_ = value; + } + } else { + attributeBuilder_.mergeFrom(value); + } + if (attribute_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder clearAttribute() { + bitField0_ = (bitField0_ & ~0x00000001); + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeFieldBuilder().getBuilder(); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + if (attributeBuilder_ != null) { + return attributeBuilder_.getMessageOrBuilder(); + } else { + return attribute_ == null ? + io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> + getAttributeFieldBuilder() { + if (attributeBuilder_ == null) { + attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( + getAttribute(), + getParentForChildren(), + isClean()); + attribute_ = null; + } + return attributeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.CreateAttributeResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.CreateAttributeResponse) + private static final io.opentdf.platform.policy.attributes.CreateAttributeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.CreateAttributeResponse(); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAttributeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponseOrBuilder.java new file mode 100644 index 00000000..c43c8d97 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface CreateAttributeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.CreateAttributeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + boolean hasAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + io.opentdf.platform.policy.Attribute getAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequest.java new file mode 100644 index 00000000..e9b4b8d3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequest.java @@ -0,0 +1,1188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.CreateAttributeValueRequest} + */ +public final class CreateAttributeValueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.CreateAttributeValueRequest) + CreateAttributeValueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateAttributeValueRequest.newBuilder() to construct. + private CreateAttributeValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateAttributeValueRequest() { + attributeId_ = ""; + value_ = ""; + members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateAttributeValueRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object attributeId_ = ""; + /** + *
+   * Required
+   * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The attributeId. + */ + @java.lang.Override + public java.lang.String getAttributeId() { + java.lang.Object ref = attributeId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeId_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The bytes for attributeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttributeIdBytes() { + java.lang.Object ref = attributeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBERS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @return A list containing the members. + */ + public com.google.protobuf.ProtocolStringList + getMembersList() { + return members_; + } + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @return The count of members. + */ + public int getMembersCount() { + return members_.size(); + } + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param index The index of the element to return. + * @return The members at the given index. + */ + public java.lang.String getMembers(int index) { + return members_.get(index); + } + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + public com.google.protobuf.ByteString + getMembersBytes(int index) { + return members_.getByteString(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + for (int i = 0; i < members_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, members_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + { + int dataSize = 0; + for (int i = 0; i < members_.size(); i++) { + dataSize += computeStringSizeNoTag(members_.getRaw(i)); + } + size += dataSize; + size += 1 * getMembersList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.CreateAttributeValueRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.CreateAttributeValueRequest other = (io.opentdf.platform.policy.attributes.CreateAttributeValueRequest) obj; + + if (!getAttributeId() + .equals(other.getAttributeId())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getMembersList() + .equals(other.getMembersList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeId().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + if (getMembersCount() > 0) { + hash = (37 * hash) + MEMBERS_FIELD_NUMBER; + hash = (53 * hash) + getMembersList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.CreateAttributeValueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.CreateAttributeValueRequest) + io.opentdf.platform.policy.attributes.CreateAttributeValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeId_ = ""; + value_ = ""; + members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeValueRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeValueRequest build() { + io.opentdf.platform.policy.attributes.CreateAttributeValueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeValueRequest buildPartial() { + io.opentdf.platform.policy.attributes.CreateAttributeValueRequest result = new io.opentdf.platform.policy.attributes.CreateAttributeValueRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeId_ = attributeId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + members_.makeImmutable(); + result.members_ = members_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.CreateAttributeValueRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.CreateAttributeValueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest other) { + if (other == io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.getDefaultInstance()) return this; + if (!other.getAttributeId().isEmpty()) { + attributeId_ = other.attributeId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.members_.isEmpty()) { + if (members_.isEmpty()) { + members_ = other.members_; + bitField0_ |= 0x00000004; + } else { + ensureMembersIsMutable(); + members_.addAll(other.members_); + } + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + attributeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureMembersIsMutable(); + members_.add(s); + break; + } // case 26 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object attributeId_ = ""; + /** + *
+     * Required
+     * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The attributeId. + */ + public java.lang.String getAttributeId() { + java.lang.Object ref = attributeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The bytes for attributeId. + */ + public com.google.protobuf.ByteString + getAttributeIdBytes() { + java.lang.Object ref = attributeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @param value The attributeId to set. + * @return This builder for chaining. + */ + public Builder setAttributeId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attributeId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearAttributeId() { + attributeId_ = getDefaultInstance().getAttributeId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @param value The bytes for attributeId to set. + * @return This builder for chaining. + */ + public Builder setAttributeIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attributeId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureMembersIsMutable() { + if (!members_.isModifiable()) { + members_ = new com.google.protobuf.LazyStringArrayList(members_); + } + bitField0_ |= 0x00000004; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @return A list containing the members. + */ + public com.google.protobuf.ProtocolStringList + getMembersList() { + members_.makeImmutable(); + return members_; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @return The count of members. + */ + public int getMembersCount() { + return members_.size(); + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param index The index of the element to return. + * @return The members at the given index. + */ + public java.lang.String getMembers(int index) { + return members_.get(index); + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + public com.google.protobuf.ByteString + getMembersBytes(int index) { + return members_.getByteString(index); + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param index The index to set the value at. + * @param value The members to set. + * @return This builder for chaining. + */ + public Builder setMembers( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureMembersIsMutable(); + members_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param value The members to add. + * @return This builder for chaining. + */ + public Builder addMembers( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureMembersIsMutable(); + members_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param values The members to add. + * @return This builder for chaining. + */ + public Builder addAllMembers( + java.lang.Iterable values) { + ensureMembersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, members_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @return This builder for chaining. + */ + public Builder clearMembers() { + members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004);; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param value The bytes of the members to add. + * @return This builder for chaining. + */ + public Builder addMembersBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureMembersIsMutable(); + members_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.CreateAttributeValueRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.CreateAttributeValueRequest) + private static final io.opentdf.platform.policy.attributes.CreateAttributeValueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.CreateAttributeValueRequest(); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAttributeValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeValueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequestOrBuilder.java new file mode 100644 index 00000000..15136a2d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequestOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface CreateAttributeValueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.CreateAttributeValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The attributeId. + */ + java.lang.String getAttributeId(); + /** + *
+   * Required
+   * 
+ * + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The bytes for attributeId. + */ + com.google.protobuf.ByteString + getAttributeIdBytes(); + + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @return The value. + */ + java.lang.String getValue(); + /** + * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @return A list containing the members. + */ + java.util.List + getMembersList(); + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @return The count of members. + */ + int getMembersCount(); + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param index The index of the element to return. + * @return The members at the given index. + */ + java.lang.String getMembers(int index); + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 3 [json_name = "members"]; + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + com.google.protobuf.ByteString + getMembersBytes(int index); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponse.java new file mode 100644 index 00000000..1e4b388f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.CreateAttributeValueResponse} + */ +public final class CreateAttributeValueResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.CreateAttributeValueResponse) + CreateAttributeValueResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateAttributeValueResponse.newBuilder() to construct. + private CreateAttributeValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateAttributeValueResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateAttributeValueResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.Builder.class); + } + + private int bitField0_; + public static final int VALUE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Value value_; + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getValue() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.CreateAttributeValueResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.CreateAttributeValueResponse other = (io.opentdf.platform.policy.attributes.CreateAttributeValueResponse) obj; + + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.CreateAttributeValueResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.CreateAttributeValueResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.CreateAttributeValueResponse) + io.opentdf.platform.policy.attributes.CreateAttributeValueResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse build() { + io.opentdf.platform.policy.attributes.CreateAttributeValueResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse buildPartial() { + io.opentdf.platform.policy.attributes.CreateAttributeValueResponse result = new io.opentdf.platform.policy.attributes.CreateAttributeValueResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.CreateAttributeValueResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = valueBuilder_ == null + ? value_ + : valueBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.CreateAttributeValueResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.CreateAttributeValueResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.CreateAttributeValueResponse other) { + if (other == io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.getDefaultInstance()) return this; + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + public io.opentdf.platform.policy.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder setValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder setValue( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder mergeValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + value_ != null && + value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + if (value_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public io.opentdf.platform.policy.Value.Builder getValueBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.CreateAttributeValueResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.CreateAttributeValueResponse) + private static final io.opentdf.platform.policy.attributes.CreateAttributeValueResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.CreateAttributeValueResponse(); + } + + public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAttributeValueResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponseOrBuilder.java new file mode 100644 index 00000000..ea8d358a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface CreateAttributeValueResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.CreateAttributeValueResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + io.opentdf.platform.policy.Value getValue(); + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequest.java new file mode 100644 index 00000000..bbd2b386 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.DeactivateAttributeRequest} + */ +public final class DeactivateAttributeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.DeactivateAttributeRequest) + DeactivateAttributeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeactivateAttributeRequest.newBuilder() to construct. + private DeactivateAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeactivateAttributeRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeactivateAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.class, io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.DeactivateAttributeRequest other = (io.opentdf.platform.policy.attributes.DeactivateAttributeRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.DeactivateAttributeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.DeactivateAttributeRequest) + io.opentdf.platform.policy.attributes.DeactivateAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.class, io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeRequest build() { + io.opentdf.platform.policy.attributes.DeactivateAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeRequest buildPartial() { + io.opentdf.platform.policy.attributes.DeactivateAttributeRequest result = new io.opentdf.platform.policy.attributes.DeactivateAttributeRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.DeactivateAttributeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest other) { + if (other == io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.DeactivateAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.DeactivateAttributeRequest) + private static final io.opentdf.platform.policy.attributes.DeactivateAttributeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.DeactivateAttributeRequest(); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeactivateAttributeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequestOrBuilder.java new file mode 100644 index 00000000..74e2a311 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface DeactivateAttributeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.DeactivateAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponse.java new file mode 100644 index 00000000..43a64cce --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.DeactivateAttributeResponse} + */ +public final class DeactivateAttributeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.DeactivateAttributeResponse) + DeactivateAttributeResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeactivateAttributeResponse.newBuilder() to construct. + private DeactivateAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeactivateAttributeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeactivateAttributeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.class, io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Attribute attribute_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + @java.lang.Override + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + @java.lang.Override + public io.opentdf.platform.policy.Attribute getAttribute() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttribute()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttribute()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.DeactivateAttributeResponse other = (io.opentdf.platform.policy.attributes.DeactivateAttributeResponse) obj; + + if (hasAttribute() != other.hasAttribute()) return false; + if (hasAttribute()) { + if (!getAttribute() + .equals(other.getAttribute())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttribute()) { + hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getAttribute().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.DeactivateAttributeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.DeactivateAttributeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.DeactivateAttributeResponse) + io.opentdf.platform.policy.attributes.DeactivateAttributeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.class, io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse build() { + io.opentdf.platform.policy.attributes.DeactivateAttributeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse buildPartial() { + io.opentdf.platform.policy.attributes.DeactivateAttributeResponse result = new io.opentdf.platform.policy.attributes.DeactivateAttributeResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.DeactivateAttributeResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attribute_ = attributeBuilder_ == null + ? attribute_ + : attributeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.DeactivateAttributeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.DeactivateAttributeResponse other) { + if (other == io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.getDefaultInstance()) return this; + if (other.hasAttribute()) { + mergeAttribute(other.getAttribute()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Attribute attribute_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + public io.opentdf.platform.policy.Attribute getAttribute() { + if (attributeBuilder_ == null) { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } else { + return attributeBuilder_.getMessage(); + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attribute_ = value; + } else { + attributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute( + io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributeBuilder_ == null) { + attribute_ = builderForValue.build(); + } else { + attributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attribute_ != null && + attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { + getAttributeBuilder().mergeFrom(value); + } else { + attribute_ = value; + } + } else { + attributeBuilder_.mergeFrom(value); + } + if (attribute_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder clearAttribute() { + bitField0_ = (bitField0_ & ~0x00000001); + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeFieldBuilder().getBuilder(); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + if (attributeBuilder_ != null) { + return attributeBuilder_.getMessageOrBuilder(); + } else { + return attribute_ == null ? + io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> + getAttributeFieldBuilder() { + if (attributeBuilder_ == null) { + attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( + getAttribute(), + getParentForChildren(), + isClean()); + attribute_ = null; + } + return attributeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.DeactivateAttributeResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.DeactivateAttributeResponse) + private static final io.opentdf.platform.policy.attributes.DeactivateAttributeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.DeactivateAttributeResponse(); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeactivateAttributeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponseOrBuilder.java new file mode 100644 index 00000000..a2e020f3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface DeactivateAttributeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.DeactivateAttributeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + boolean hasAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + io.opentdf.platform.policy.Attribute getAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequest.java new file mode 100644 index 00000000..783b0856 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.DeactivateAttributeValueRequest} + */ +public final class DeactivateAttributeValueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.DeactivateAttributeValueRequest) + DeactivateAttributeValueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeactivateAttributeValueRequest.newBuilder() to construct. + private DeactivateAttributeValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeactivateAttributeValueRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeactivateAttributeValueRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest other = (io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.DeactivateAttributeValueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.DeactivateAttributeValueRequest) + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest build() { + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest buildPartial() { + io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest result = new io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest other) { + if (other == io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.DeactivateAttributeValueRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.DeactivateAttributeValueRequest) + private static final io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest(); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeactivateAttributeValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequestOrBuilder.java new file mode 100644 index 00000000..600ead67 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface DeactivateAttributeValueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.DeactivateAttributeValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponse.java new file mode 100644 index 00000000..300c9777 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.DeactivateAttributeValueResponse} + */ +public final class DeactivateAttributeValueResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.DeactivateAttributeValueResponse) + DeactivateAttributeValueResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeactivateAttributeValueResponse.newBuilder() to construct. + private DeactivateAttributeValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeactivateAttributeValueResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeactivateAttributeValueResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.Builder.class); + } + + private int bitField0_; + public static final int VALUE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Value value_; + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getValue() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse other = (io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse) obj; + + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.DeactivateAttributeValueResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.DeactivateAttributeValueResponse) + io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse build() { + io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse buildPartial() { + io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse result = new io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = valueBuilder_ == null + ? value_ + : valueBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse other) { + if (other == io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.getDefaultInstance()) return this; + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + public io.opentdf.platform.policy.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder setValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder setValue( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder mergeValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + value_ != null && + value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + if (value_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public io.opentdf.platform.policy.Value.Builder getValueBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.DeactivateAttributeValueResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.DeactivateAttributeValueResponse) + private static final io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse(); + } + + public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeactivateAttributeValueResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponseOrBuilder.java new file mode 100644 index 00000000..bfd44f06 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface DeactivateAttributeValueResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.DeactivateAttributeValueResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + io.opentdf.platform.policy.Value getValue(); + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequest.java new file mode 100644 index 00000000..c7572c94 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.GetAttributeRequest} + */ +public final class GetAttributeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeRequest) + GetAttributeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetAttributeRequest.newBuilder() to construct. + private GetAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAttributeRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeRequest.class, io.opentdf.platform.policy.attributes.GetAttributeRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.GetAttributeRequest other = (io.opentdf.platform.policy.attributes.GetAttributeRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.GetAttributeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeRequest) + io.opentdf.platform.policy.attributes.GetAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeRequest.class, io.opentdf.platform.policy.attributes.GetAttributeRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.GetAttributeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.GetAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeRequest build() { + io.opentdf.platform.policy.attributes.GetAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeRequest buildPartial() { + io.opentdf.platform.policy.attributes.GetAttributeRequest result = new io.opentdf.platform.policy.attributes.GetAttributeRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeRequest other) { + if (other == io.opentdf.platform.policy.attributes.GetAttributeRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeRequest) + private static final io.opentdf.platform.policy.attributes.GetAttributeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeRequest(); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAttributeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequestOrBuilder.java new file mode 100644 index 00000000..f9d968a3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface GetAttributeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponse.java new file mode 100644 index 00000000..00e665e5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.GetAttributeResponse} + */ +public final class GetAttributeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeResponse) + GetAttributeResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetAttributeResponse.newBuilder() to construct. + private GetAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAttributeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAttributeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeResponse.class, io.opentdf.platform.policy.attributes.GetAttributeResponse.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Attribute attribute_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + @java.lang.Override + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + @java.lang.Override + public io.opentdf.platform.policy.Attribute getAttribute() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttribute()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttribute()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.GetAttributeResponse other = (io.opentdf.platform.policy.attributes.GetAttributeResponse) obj; + + if (hasAttribute() != other.hasAttribute()) return false; + if (hasAttribute()) { + if (!getAttribute() + .equals(other.getAttribute())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttribute()) { + hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getAttribute().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.GetAttributeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeResponse) + io.opentdf.platform.policy.attributes.GetAttributeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeResponse.class, io.opentdf.platform.policy.attributes.GetAttributeResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.GetAttributeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.GetAttributeResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeResponse build() { + io.opentdf.platform.policy.attributes.GetAttributeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeResponse buildPartial() { + io.opentdf.platform.policy.attributes.GetAttributeResponse result = new io.opentdf.platform.policy.attributes.GetAttributeResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attribute_ = attributeBuilder_ == null + ? attribute_ + : attributeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeResponse other) { + if (other == io.opentdf.platform.policy.attributes.GetAttributeResponse.getDefaultInstance()) return this; + if (other.hasAttribute()) { + mergeAttribute(other.getAttribute()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Attribute attribute_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + public io.opentdf.platform.policy.Attribute getAttribute() { + if (attributeBuilder_ == null) { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } else { + return attributeBuilder_.getMessage(); + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attribute_ = value; + } else { + attributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute( + io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributeBuilder_ == null) { + attribute_ = builderForValue.build(); + } else { + attributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attribute_ != null && + attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { + getAttributeBuilder().mergeFrom(value); + } else { + attribute_ = value; + } + } else { + attributeBuilder_.mergeFrom(value); + } + if (attribute_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder clearAttribute() { + bitField0_ = (bitField0_ & ~0x00000001); + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeFieldBuilder().getBuilder(); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + if (attributeBuilder_ != null) { + return attributeBuilder_.getMessageOrBuilder(); + } else { + return attribute_ == null ? + io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> + getAttributeFieldBuilder() { + if (attributeBuilder_ == null) { + attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( + getAttribute(), + getParentForChildren(), + isClean()); + attribute_ = null; + } + return attributeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeResponse) + private static final io.opentdf.platform.policy.attributes.GetAttributeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeResponse(); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAttributeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponseOrBuilder.java new file mode 100644 index 00000000..2814e218 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface GetAttributeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + boolean hasAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + io.opentdf.platform.policy.Attribute getAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequest.java new file mode 100644 index 00000000..eb0a4578 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequest.java @@ -0,0 +1,554 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + *
+ */
+ * / Value RPC messages
+ * /
+ * 
+ * + * Protobuf type {@code policy.attributes.GetAttributeValueRequest} + */ +public final class GetAttributeValueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValueRequest) + GetAttributeValueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetAttributeValueRequest.newBuilder() to construct. + private GetAttributeValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAttributeValueRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAttributeValueRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValueRequest.class, io.opentdf.platform.policy.attributes.GetAttributeValueRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValueRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.GetAttributeValueRequest other = (io.opentdf.platform.policy.attributes.GetAttributeValueRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   */
+   * / Value RPC messages
+   * /
+   * 
+ * + * Protobuf type {@code policy.attributes.GetAttributeValueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValueRequest) + io.opentdf.platform.policy.attributes.GetAttributeValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValueRequest.class, io.opentdf.platform.policy.attributes.GetAttributeValueRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.GetAttributeValueRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValueRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.GetAttributeValueRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValueRequest build() { + io.opentdf.platform.policy.attributes.GetAttributeValueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValueRequest buildPartial() { + io.opentdf.platform.policy.attributes.GetAttributeValueRequest result = new io.opentdf.platform.policy.attributes.GetAttributeValueRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValueRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValueRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValueRequest other) { + if (other == io.opentdf.platform.policy.attributes.GetAttributeValueRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValueRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValueRequest) + private static final io.opentdf.platform.policy.attributes.GetAttributeValueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValueRequest(); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAttributeValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequestOrBuilder.java new file mode 100644 index 00000000..2250ba3a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface GetAttributeValueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponse.java new file mode 100644 index 00000000..0c117a01 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.GetAttributeValueResponse} + */ +public final class GetAttributeValueResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValueResponse) + GetAttributeValueResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetAttributeValueResponse.newBuilder() to construct. + private GetAttributeValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAttributeValueResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAttributeValueResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValueResponse.class, io.opentdf.platform.policy.attributes.GetAttributeValueResponse.Builder.class); + } + + private int bitField0_; + public static final int VALUE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Value value_; + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getValue() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValueResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.GetAttributeValueResponse other = (io.opentdf.platform.policy.attributes.GetAttributeValueResponse) obj; + + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValueResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.GetAttributeValueResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValueResponse) + io.opentdf.platform.policy.attributes.GetAttributeValueResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValueResponse.class, io.opentdf.platform.policy.attributes.GetAttributeValueResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.GetAttributeValueResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValueResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.GetAttributeValueResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValueResponse build() { + io.opentdf.platform.policy.attributes.GetAttributeValueResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValueResponse buildPartial() { + io.opentdf.platform.policy.attributes.GetAttributeValueResponse result = new io.opentdf.platform.policy.attributes.GetAttributeValueResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValueResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = valueBuilder_ == null + ? value_ + : valueBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValueResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValueResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValueResponse other) { + if (other == io.opentdf.platform.policy.attributes.GetAttributeValueResponse.getDefaultInstance()) return this; + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + public io.opentdf.platform.policy.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder setValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder setValue( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder mergeValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + value_ != null && + value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + if (value_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public io.opentdf.platform.policy.Value.Builder getValueBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValueResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValueResponse) + private static final io.opentdf.platform.policy.attributes.GetAttributeValueResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValueResponse(); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAttributeValueResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValueResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponseOrBuilder.java new file mode 100644 index 00000000..1dca509b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface GetAttributeValueResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValueResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + io.opentdf.platform.policy.Value getValue(); + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequest.java new file mode 100644 index 00000000..fadb332d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequest.java @@ -0,0 +1,840 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsRequest} + */ +public final class GetAttributeValuesByFqnsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValuesByFqnsRequest) + GetAttributeValuesByFqnsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetAttributeValuesByFqnsRequest.newBuilder() to construct. + private GetAttributeValuesByFqnsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAttributeValuesByFqnsRequest() { + fqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAttributeValuesByFqnsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.Builder.class); + } + + private int bitField0_; + public static final int FQNS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList fqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Required
+   * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @return A list containing the fqns. + */ + public com.google.protobuf.ProtocolStringList + getFqnsList() { + return fqns_; + } + /** + *
+   * Required
+   * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @return The count of fqns. + */ + public int getFqnsCount() { + return fqns_.size(); + } + /** + *
+   * Required
+   * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param index The index of the element to return. + * @return The fqns at the given index. + */ + public java.lang.String getFqns(int index) { + return fqns_.get(index); + } + /** + *
+   * Required
+   * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param index The index of the value to return. + * @return The bytes of the fqns at the given index. + */ + public com.google.protobuf.ByteString + getFqnsBytes(int index) { + return fqns_.getByteString(index); + } + + public static final int WITH_VALUE_FIELD_NUMBER = 2; + private io.opentdf.platform.policy.AttributeValueSelector withValue_; + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + * @return Whether the withValue field is set. + */ + @java.lang.Override + public boolean hasWithValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + * @return The withValue. + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelector getWithValue() { + return withValue_ == null ? io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance() : withValue_; + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeValueSelectorOrBuilder getWithValueOrBuilder() { + return withValue_ == null ? io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance() : withValue_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < fqns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fqns_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getWithValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < fqns_.size(); i++) { + dataSize += computeStringSizeNoTag(fqns_.getRaw(i)); + } + size += dataSize; + size += 1 * getFqnsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getWithValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest other = (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest) obj; + + if (!getFqnsList() + .equals(other.getFqnsList())) return false; + if (hasWithValue() != other.hasWithValue()) return false; + if (hasWithValue()) { + if (!getWithValue() + .equals(other.getWithValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFqnsCount() > 0) { + hash = (37 * hash) + FQNS_FIELD_NUMBER; + hash = (53 * hash) + getFqnsList().hashCode(); + } + if (hasWithValue()) { + hash = (37 * hash) + WITH_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getWithValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValuesByFqnsRequest) + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWithValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + withValue_ = null; + if (withValueBuilder_ != null) { + withValueBuilder_.dispose(); + withValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest build() { + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest buildPartial() { + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest result = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + fqns_.makeImmutable(); + result.fqns_ = fqns_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withValue_ = withValueBuilder_ == null + ? withValue_ + : withValueBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest other) { + if (other == io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.getDefaultInstance()) return this; + if (!other.fqns_.isEmpty()) { + if (fqns_.isEmpty()) { + fqns_ = other.fqns_; + bitField0_ |= 0x00000001; + } else { + ensureFqnsIsMutable(); + fqns_.addAll(other.fqns_); + } + onChanged(); + } + if (other.hasWithValue()) { + mergeWithValue(other.getWithValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureFqnsIsMutable(); + fqns_.add(s); + break; + } // case 10 + case 18: { + input.readMessage( + getWithValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList fqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureFqnsIsMutable() { + if (!fqns_.isModifiable()) { + fqns_ = new com.google.protobuf.LazyStringArrayList(fqns_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @return A list containing the fqns. + */ + public com.google.protobuf.ProtocolStringList + getFqnsList() { + fqns_.makeImmutable(); + return fqns_; + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @return The count of fqns. + */ + public int getFqnsCount() { + return fqns_.size(); + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param index The index of the element to return. + * @return The fqns at the given index. + */ + public java.lang.String getFqns(int index) { + return fqns_.get(index); + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param index The index of the value to return. + * @return The bytes of the fqns at the given index. + */ + public com.google.protobuf.ByteString + getFqnsBytes(int index) { + return fqns_.getByteString(index); + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param index The index to set the value at. + * @param value The fqns to set. + * @return This builder for chaining. + */ + public Builder setFqns( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureFqnsIsMutable(); + fqns_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param value The fqns to add. + * @return This builder for chaining. + */ + public Builder addFqns( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureFqnsIsMutable(); + fqns_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param values The fqns to add. + * @return This builder for chaining. + */ + public Builder addAllFqns( + java.lang.Iterable values) { + ensureFqnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fqns_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearFqns() { + fqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param value The bytes of the fqns to add. + * @return This builder for chaining. + */ + public Builder addFqnsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureFqnsIsMutable(); + fqns_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.AttributeValueSelector withValue_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector, io.opentdf.platform.policy.AttributeValueSelector.Builder, io.opentdf.platform.policy.AttributeValueSelectorOrBuilder> withValueBuilder_; + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + * @return Whether the withValue field is set. + */ + public boolean hasWithValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + * @return The withValue. + */ + public io.opentdf.platform.policy.AttributeValueSelector getWithValue() { + if (withValueBuilder_ == null) { + return withValue_ == null ? io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance() : withValue_; + } else { + return withValueBuilder_.getMessage(); + } + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + public Builder setWithValue(io.opentdf.platform.policy.AttributeValueSelector value) { + if (withValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + withValue_ = value; + } else { + withValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + public Builder setWithValue( + io.opentdf.platform.policy.AttributeValueSelector.Builder builderForValue) { + if (withValueBuilder_ == null) { + withValue_ = builderForValue.build(); + } else { + withValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + public Builder mergeWithValue(io.opentdf.platform.policy.AttributeValueSelector value) { + if (withValueBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + withValue_ != null && + withValue_ != io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance()) { + getWithValueBuilder().mergeFrom(value); + } else { + withValue_ = value; + } + } else { + withValueBuilder_.mergeFrom(value); + } + if (withValue_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + public Builder clearWithValue() { + bitField0_ = (bitField0_ & ~0x00000002); + withValue_ = null; + if (withValueBuilder_ != null) { + withValueBuilder_.dispose(); + withValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.AttributeValueSelector.Builder getWithValueBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWithValueFieldBuilder().getBuilder(); + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.AttributeValueSelectorOrBuilder getWithValueOrBuilder() { + if (withValueBuilder_ != null) { + return withValueBuilder_.getMessageOrBuilder(); + } else { + return withValue_ == null ? + io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance() : withValue_; + } + } + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector, io.opentdf.platform.policy.AttributeValueSelector.Builder, io.opentdf.platform.policy.AttributeValueSelectorOrBuilder> + getWithValueFieldBuilder() { + if (withValueBuilder_ == null) { + withValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.AttributeValueSelector, io.opentdf.platform.policy.AttributeValueSelector.Builder, io.opentdf.platform.policy.AttributeValueSelectorOrBuilder>( + getWithValue(), + getParentForChildren(), + isClean()); + withValue_ = null; + } + return withValueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValuesByFqnsRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValuesByFqnsRequest) + private static final io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest(); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAttributeValuesByFqnsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequestOrBuilder.java new file mode 100644 index 00000000..78b5f3f8 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequestOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface GetAttributeValuesByFqnsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValuesByFqnsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @return A list containing the fqns. + */ + java.util.List + getFqnsList(); + /** + *
+   * Required
+   * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @return The count of fqns. + */ + int getFqnsCount(); + /** + *
+   * Required
+   * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param index The index of the element to return. + * @return The fqns at the given index. + */ + java.lang.String getFqns(int index); + /** + *
+   * Required
+   * 
+ * + * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } + * @param index The index of the value to return. + * @return The bytes of the fqns at the given index. + */ + com.google.protobuf.ByteString + getFqnsBytes(int index); + + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + * @return Whether the withValue field is set. + */ + boolean hasWithValue(); + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + * @return The withValue. + */ + io.opentdf.platform.policy.AttributeValueSelector getWithValue(); + /** + * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.AttributeValueSelectorOrBuilder getWithValueOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponse.java new file mode 100644 index 00000000..e35c1268 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponse.java @@ -0,0 +1,1572 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsResponse} + */ +public final class GetAttributeValuesByFqnsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValuesByFqnsResponse) + GetAttributeValuesByFqnsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetAttributeValuesByFqnsResponse.newBuilder() to construct. + private GetAttributeValuesByFqnsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAttributeValuesByFqnsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAttributeValuesByFqnsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetFqnAttributeValues(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.Builder.class); + } + + public interface AttributeAndValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + boolean hasAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + io.opentdf.platform.policy.Attribute getAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); + + /** + * .policy.Value value = 2 [json_name = "value"]; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * .policy.Value value = 2 [json_name = "value"]; + * @return The value. + */ + io.opentdf.platform.policy.Value getValue(); + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); + } + /** + * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue} + */ + public static final class AttributeAndValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) + AttributeAndValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttributeAndValue.newBuilder() to construct. + private AttributeAndValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttributeAndValue() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttributeAndValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Attribute attribute_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + @java.lang.Override + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + @java.lang.Override + public io.opentdf.platform.policy.Attribute getAttribute() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + + public static final int VALUE_FIELD_NUMBER = 2; + private io.opentdf.platform.policy.Value value_; + /** + * .policy.Value value = 2 [json_name = "value"]; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.Value value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getValue() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttribute()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttribute()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue other = (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) obj; + + if (hasAttribute() != other.hasAttribute()) return false; + if (hasAttribute()) { + if (!getAttribute() + .equals(other.getAttribute())) return false; + } + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttribute()) { + hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getAttribute().hashCode(); + } + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeFieldBuilder(); + getValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue build() { + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue buildPartial() { + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue result = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attribute_ = attributeBuilder_ == null + ? attribute_ + : attributeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = valueBuilder_ == null + ? value_ + : valueBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) { + return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue other) { + if (other == io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.getDefaultInstance()) return this; + if (other.hasAttribute()) { + mergeAttribute(other.getAttribute()); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Attribute attribute_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + public io.opentdf.platform.policy.Attribute getAttribute() { + if (attributeBuilder_ == null) { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } else { + return attributeBuilder_.getMessage(); + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attribute_ = value; + } else { + attributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute( + io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributeBuilder_ == null) { + attribute_ = builderForValue.build(); + } else { + attributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attribute_ != null && + attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { + getAttributeBuilder().mergeFrom(value); + } else { + attribute_ = value; + } + } else { + attributeBuilder_.mergeFrom(value); + } + if (attribute_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder clearAttribute() { + bitField0_ = (bitField0_ & ~0x00000001); + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeFieldBuilder().getBuilder(); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + if (attributeBuilder_ != null) { + return attributeBuilder_.getMessageOrBuilder(); + } else { + return attribute_ == null ? + io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> + getAttributeFieldBuilder() { + if (attributeBuilder_ == null) { + attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( + getAttribute(), + getParentForChildren(), + isClean()); + attribute_ = null; + } + return attributeBuilder_; + } + + private io.opentdf.platform.policy.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; + /** + * .policy.Value value = 2 [json_name = "value"]; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.Value value = 2 [json_name = "value"]; + * @return The value. + */ + public io.opentdf.platform.policy.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + public Builder setValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + public Builder setValue( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + public Builder mergeValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + value_ != null && + value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + if (value_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + public io.opentdf.platform.policy.Value.Builder getValueBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + } + /** + * .policy.Value value = 2 [json_name = "value"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) + private static final io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue(); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeAndValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FQN_ATTRIBUTE_VALUES_FIELD_NUMBER = 1; + private static final class FqnAttributeValuesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqnAttributeValues_; + private com.google.protobuf.MapField + internalGetFqnAttributeValues() { + if (fqnAttributeValues_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FqnAttributeValuesDefaultEntryHolder.defaultEntry); + } + return fqnAttributeValues_; + } + public int getFqnAttributeValuesCount() { + return internalGetFqnAttributeValues().getMap().size(); + } + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + @java.lang.Override + public boolean containsFqnAttributeValues( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetFqnAttributeValues().getMap().containsKey(key); + } + /** + * Use {@link #getFqnAttributeValuesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFqnAttributeValues() { + return getFqnAttributeValuesMap(); + } + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + @java.lang.Override + public java.util.Map getFqnAttributeValuesMap() { + return internalGetFqnAttributeValues().getMap(); + } + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + @java.lang.Override + public /* nullable */ +io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrDefault( + java.lang.String key, + /* nullable */ +io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFqnAttributeValues().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFqnAttributeValues().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFqnAttributeValues(), + FqnAttributeValuesDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetFqnAttributeValues().getMap().entrySet()) { + com.google.protobuf.MapEntry + fqnAttributeValues__ = FqnAttributeValuesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fqnAttributeValues__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse other = (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse) obj; + + if (!internalGetFqnAttributeValues().equals( + other.internalGetFqnAttributeValues())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetFqnAttributeValues().getMap().isEmpty()) { + hash = (37 * hash) + FQN_ATTRIBUTE_VALUES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFqnAttributeValues().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValuesByFqnsResponse) + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetFqnAttributeValues(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableFqnAttributeValues(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableFqnAttributeValues().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse build() { + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse buildPartial() { + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse result = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fqnAttributeValues_ = internalGetFqnAttributeValues().build(FqnAttributeValuesDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse other) { + if (other == io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.getDefaultInstance()) return this; + internalGetMutableFqnAttributeValues().mergeFrom( + other.internalGetFqnAttributeValues()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + fqnAttributeValues__ = input.readMessage( + FqnAttributeValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableFqnAttributeValues().ensureBuilderMap().put( + fqnAttributeValues__.getKey(), fqnAttributeValues__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private static final class FqnAttributeValuesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue build(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValueOrBuilder val) { + if (val instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) { return (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) val; } + return ((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return FqnAttributeValuesDefaultEntryHolder.defaultEntry; + } + }; + private static final FqnAttributeValuesConverter fqnAttributeValuesConverter = new FqnAttributeValuesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValueOrBuilder, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder> fqnAttributeValues_; + private com.google.protobuf.MapFieldBuilder + internalGetFqnAttributeValues() { + if (fqnAttributeValues_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(fqnAttributeValuesConverter); + } + return fqnAttributeValues_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableFqnAttributeValues() { + if (fqnAttributeValues_ == null) { + fqnAttributeValues_ = new com.google.protobuf.MapFieldBuilder<>(fqnAttributeValuesConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return fqnAttributeValues_; + } + public int getFqnAttributeValuesCount() { + return internalGetFqnAttributeValues().ensureBuilderMap().size(); + } + /** + *
+     * map of fqns to complete attributes and the one selected value
+     * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + @java.lang.Override + public boolean containsFqnAttributeValues( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetFqnAttributeValues().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getFqnAttributeValuesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFqnAttributeValues() { + return getFqnAttributeValuesMap(); + } + /** + *
+     * map of fqns to complete attributes and the one selected value
+     * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + @java.lang.Override + public java.util.Map getFqnAttributeValuesMap() { + return internalGetFqnAttributeValues().getImmutableMap(); + } + /** + *
+     * map of fqns to complete attributes and the one selected value
+     * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + @java.lang.Override + public /* nullable */ +io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrDefault( + java.lang.String key, + /* nullable */ +io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableFqnAttributeValues().ensureBuilderMap(); + return map.containsKey(key) ? fqnAttributeValuesConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * map of fqns to complete attributes and the one selected value
+     * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableFqnAttributeValues().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return fqnAttributeValuesConverter.build(map.get(key)); + } + public Builder clearFqnAttributeValues() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableFqnAttributeValues().clear(); + return this; + } + /** + *
+     * map of fqns to complete attributes and the one selected value
+     * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + public Builder removeFqnAttributeValues( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableFqnAttributeValues().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFqnAttributeValues() { + bitField0_ |= 0x00000001; + return internalGetMutableFqnAttributeValues().ensureMessageMap(); + } + /** + *
+     * map of fqns to complete attributes and the one selected value
+     * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + public Builder putFqnAttributeValues( + java.lang.String key, + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableFqnAttributeValues().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * map of fqns to complete attributes and the one selected value
+     * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + public Builder putAllFqnAttributeValues( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableFqnAttributeValues().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * map of fqns to complete attributes and the one selected value
+     * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder putFqnAttributeValuesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableFqnAttributeValues().ensureBuilderMap(); + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) { + entry = ((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValuesByFqnsResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValuesByFqnsResponse) + private static final io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse(); + } + + public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAttributeValuesByFqnsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponseOrBuilder.java new file mode 100644 index 00000000..be750030 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponseOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface GetAttributeValuesByFqnsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValuesByFqnsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + int getFqnAttributeValuesCount(); + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + boolean containsFqnAttributeValues( + java.lang.String key); + /** + * Use {@link #getFqnAttributeValuesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFqnAttributeValues(); + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + java.util.Map + getFqnAttributeValuesMap(); + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + /* nullable */ +io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrDefault( + java.lang.String key, + /* nullable */ +io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue defaultValue); + /** + *
+   * map of fqns to complete attributes and the one selected value
+   * 
+ * + * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; + */ + io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequest.java new file mode 100644 index 00000000..ab0f125c --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequest.java @@ -0,0 +1,664 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.ListAttributeValuesRequest} + */ +public final class ListAttributeValuesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.ListAttributeValuesRequest) + ListAttributeValuesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAttributeValuesRequest.newBuilder() to construct. + private ListAttributeValuesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAttributeValuesRequest() { + attributeId_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAttributeValuesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.class, io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.Builder.class); + } + + public static final int ATTRIBUTE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object attributeId_ = ""; + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The attributeId. + */ + @java.lang.Override + public java.lang.String getAttributeId() { + java.lang.Object ref = attributeId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeId_ = s; + return s; + } + } + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The bytes for attributeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttributeIdBytes() { + java.lang.Object ref = attributeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override public io.opentdf.platform.common.ActiveStateEnum getState() { + io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); + return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeId_); + } + if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeId_); + } + if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.ListAttributeValuesRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.ListAttributeValuesRequest other = (io.opentdf.platform.policy.attributes.ListAttributeValuesRequest) obj; + + if (!getAttributeId() + .equals(other.getAttributeId())) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.ListAttributeValuesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.ListAttributeValuesRequest) + io.opentdf.platform.policy.attributes.ListAttributeValuesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.class, io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeId_ = ""; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributeValuesRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributeValuesRequest build() { + io.opentdf.platform.policy.attributes.ListAttributeValuesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributeValuesRequest buildPartial() { + io.opentdf.platform.policy.attributes.ListAttributeValuesRequest result = new io.opentdf.platform.policy.attributes.ListAttributeValuesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeId_ = attributeId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.ListAttributeValuesRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.ListAttributeValuesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest other) { + if (other == io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.getDefaultInstance()) return this; + if (!other.getAttributeId().isEmpty()) { + attributeId_ = other.attributeId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + attributeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object attributeId_ = ""; + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The attributeId. + */ + public java.lang.String getAttributeId() { + java.lang.Object ref = attributeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The bytes for attributeId. + */ + public com.google.protobuf.ByteString + getAttributeIdBytes() { + java.lang.Object ref = attributeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @param value The attributeId to set. + * @return This builder for chaining. + */ + public Builder setAttributeId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attributeId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearAttributeId() { + attributeId_ = getDefaultInstance().getAttributeId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @param value The bytes for attributeId to set. + * @return This builder for chaining. + */ + public Builder setAttributeIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attributeId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public io.opentdf.platform.common.ActiveStateEnum getState() { + io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); + return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(io.opentdf.platform.common.ActiveStateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.ListAttributeValuesRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.ListAttributeValuesRequest) + private static final io.opentdf.platform.policy.attributes.ListAttributeValuesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ListAttributeValuesRequest(); + } + + public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAttributeValuesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributeValuesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequestOrBuilder.java new file mode 100644 index 00000000..e413f301 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequestOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface ListAttributeValuesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.ListAttributeValuesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The attributeId. + */ + java.lang.String getAttributeId(); + /** + * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } + * @return The bytes for attributeId. + */ + com.google.protobuf.ByteString + getAttributeIdBytes(); + + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 2 [json_name = "state"]; + * @return The state. + */ + io.opentdf.platform.common.ActiveStateEnum getState(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponse.java new file mode 100644 index 00000000..d1501f2b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.ListAttributeValuesResponse} + */ +public final class ListAttributeValuesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.ListAttributeValuesResponse) + ListAttributeValuesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAttributeValuesResponse.newBuilder() to construct. + private ListAttributeValuesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAttributeValuesResponse() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAttributeValuesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.class, io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List values_; + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getValues(int index) { + return values_.get(index); + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, values_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.ListAttributeValuesResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.ListAttributeValuesResponse other = (io.opentdf.platform.policy.attributes.ListAttributeValuesResponse) obj; + + if (!getValuesList() + .equals(other.getValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.ListAttributeValuesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.ListAttributeValuesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.ListAttributeValuesResponse) + io.opentdf.platform.policy.attributes.ListAttributeValuesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.class, io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse build() { + io.opentdf.platform.policy.attributes.ListAttributeValuesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse buildPartial() { + io.opentdf.platform.policy.attributes.ListAttributeValuesResponse result = new io.opentdf.platform.policy.attributes.ListAttributeValuesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.attributes.ListAttributeValuesResponse result) { + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.ListAttributeValuesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.ListAttributeValuesResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.ListAttributeValuesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.ListAttributeValuesResponse other) { + if (other == io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.Value m = + input.readMessage( + io.opentdf.platform.policy.Value.parser(), + extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valuesBuilder_; + + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public io.opentdf.platform.policy.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder setValues( + int index, io.opentdf.platform.policy.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder setValues( + int index, io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder addValues(io.opentdf.platform.policy.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder addValues( + int index, io.opentdf.platform.policy.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder addValues( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder addValues( + int index, io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public io.opentdf.platform.policy.Value.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public io.opentdf.platform.policy.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + io.opentdf.platform.policy.Value.getDefaultInstance()); + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public io.opentdf.platform.policy.Value.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Value.getDefaultInstance()); + } + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.ListAttributeValuesResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.ListAttributeValuesResponse) + private static final io.opentdf.platform.policy.attributes.ListAttributeValuesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ListAttributeValuesResponse(); + } + + public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAttributeValuesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponseOrBuilder.java new file mode 100644 index 00000000..7591947b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface ListAttributeValuesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.ListAttributeValuesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + java.util.List + getValuesList(); + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + io.opentdf.platform.policy.Value getValues(int index); + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + int getValuesCount(); + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + java.util.List + getValuesOrBuilderList(); + /** + * repeated .policy.Value values = 1 [json_name = "values"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequest.java new file mode 100644 index 00000000..4654e21a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequest.java @@ -0,0 +1,528 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.ListAttributesRequest} + */ +public final class ListAttributesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.ListAttributesRequest) + ListAttributesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAttributesRequest.newBuilder() to construct. + private ListAttributesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAttributesRequest() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAttributesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ListAttributesRequest.class, io.opentdf.platform.policy.attributes.ListAttributesRequest.Builder.class); + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override public io.opentdf.platform.common.ActiveStateEnum getState() { + io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); + return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.ListAttributesRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.ListAttributesRequest other = (io.opentdf.platform.policy.attributes.ListAttributesRequest) obj; + + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.ListAttributesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.ListAttributesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.ListAttributesRequest) + io.opentdf.platform.policy.attributes.ListAttributesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ListAttributesRequest.class, io.opentdf.platform.policy.attributes.ListAttributesRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.ListAttributesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributesRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.ListAttributesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributesRequest build() { + io.opentdf.platform.policy.attributes.ListAttributesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributesRequest buildPartial() { + io.opentdf.platform.policy.attributes.ListAttributesRequest result = new io.opentdf.platform.policy.attributes.ListAttributesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.ListAttributesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.ListAttributesRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.ListAttributesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.ListAttributesRequest other) { + if (other == io.opentdf.platform.policy.attributes.ListAttributesRequest.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int state_ = 0; + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public io.opentdf.platform.common.ActiveStateEnum getState() { + io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); + return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(io.opentdf.platform.common.ActiveStateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.ListAttributesRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.ListAttributesRequest) + private static final io.opentdf.platform.policy.attributes.ListAttributesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ListAttributesRequest(); + } + + public static io.opentdf.platform.policy.attributes.ListAttributesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAttributesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequestOrBuilder.java new file mode 100644 index 00000000..c8085d74 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface ListAttributesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.ListAttributesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The state. + */ + io.opentdf.platform.common.ActiveStateEnum getState(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponse.java new file mode 100644 index 00000000..d4754fc1 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.ListAttributesResponse} + */ +public final class ListAttributesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.ListAttributesResponse) + ListAttributesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAttributesResponse.newBuilder() to construct. + private ListAttributesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAttributesResponse() { + attributes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAttributesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ListAttributesResponse.class, io.opentdf.platform.policy.attributes.ListAttributesResponse.Builder.class); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List attributes_; + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.Attribute getAttributes(int index) { + return attributes_.get(index); + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeOrBuilder getAttributesOrBuilder( + int index) { + return attributes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(1, attributes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, attributes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.ListAttributesResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.ListAttributesResponse other = (io.opentdf.platform.policy.attributes.ListAttributesResponse) obj; + + if (!getAttributesList() + .equals(other.getAttributesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.ListAttributesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.ListAttributesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.ListAttributesResponse) + io.opentdf.platform.policy.attributes.ListAttributesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ListAttributesResponse.class, io.opentdf.platform.policy.attributes.ListAttributesResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.ListAttributesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributesResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.ListAttributesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributesResponse build() { + io.opentdf.platform.policy.attributes.ListAttributesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributesResponse buildPartial() { + io.opentdf.platform.policy.attributes.ListAttributesResponse result = new io.opentdf.platform.policy.attributes.ListAttributesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.attributes.ListAttributesResponse result) { + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.ListAttributesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.ListAttributesResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.ListAttributesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.ListAttributesResponse other) { + if (other == io.opentdf.platform.policy.attributes.ListAttributesResponse.getDefaultInstance()) return this; + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000001); + attributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAttributesFieldBuilder() : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.Attribute m = + input.readMessage( + io.opentdf.platform.policy.Attribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + attributes_ = new java.util.ArrayList(attributes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributesBuilder_; + + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public io.opentdf.platform.policy.Attribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder setAttributes( + int index, io.opentdf.platform.policy.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder setAttributes( + int index, io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder addAttributes(io.opentdf.platform.policy.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder addAttributes( + int index, io.opentdf.platform.policy.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder addAttributes( + io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder addAttributes( + int index, io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder addAllAttributes( + java.lang.Iterable values) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, attributes_); + onChanged(); + } else { + attributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public io.opentdf.platform.policy.Attribute.Builder getAttributesBuilder( + int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public io.opentdf.platform.policy.AttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public io.opentdf.platform.policy.Attribute.Builder addAttributesBuilder() { + return getAttributesFieldBuilder().addBuilder( + io.opentdf.platform.policy.Attribute.getDefaultInstance()); + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public io.opentdf.platform.policy.Attribute.Builder addAttributesBuilder( + int index) { + return getAttributesFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Attribute.getDefaultInstance()); + } + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + public java.util.List + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( + attributes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.ListAttributesResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.ListAttributesResponse) + private static final io.opentdf.platform.policy.attributes.ListAttributesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ListAttributesResponse(); + } + + public static io.opentdf.platform.policy.attributes.ListAttributesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAttributesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ListAttributesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponseOrBuilder.java new file mode 100644 index 00000000..d311b597 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface ListAttributesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.ListAttributesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + java.util.List + getAttributesList(); + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + io.opentdf.platform.policy.Attribute getAttributes(int index); + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + int getAttributesCount(); + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + java.util.List + getAttributesOrBuilderList(); + /** + * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; + */ + io.opentdf.platform.policy.AttributeOrBuilder getAttributesOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequest.java new file mode 100644 index 00000000..3caa6593 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequest.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromAttributeRequest} + */ +public final class RemoveKeyAccessServerFromAttributeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) + RemoveKeyAccessServerFromAttributeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveKeyAccessServerFromAttributeRequest.newBuilder() to construct. + private RemoveKeyAccessServerFromAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveKeyAccessServerFromAttributeRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveKeyAccessServerFromAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + @java.lang.Override + public boolean hasAttributeKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttributeKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttributeKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest other = (io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest) obj; + + if (hasAttributeKeyAccessServer() != other.hasAttributeKeyAccessServer()) return false; + if (hasAttributeKeyAccessServer()) { + if (!getAttributeKeyAccessServer() + .equals(other.getAttributeKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttributeKeyAccessServer()) { + hash = (37 * hash) + ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getAttributeKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromAttributeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeKeyAccessServer_ = null; + if (attributeKeyAccessServerBuilder_ != null) { + attributeKeyAccessServerBuilder_.dispose(); + attributeKeyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest build() { + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest buildPartial() { + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest result = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeKeyAccessServer_ = attributeKeyAccessServerBuilder_ == null + ? attributeKeyAccessServer_ + : attributeKeyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest other) { + if (other == io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.getDefaultInstance()) return this; + if (other.hasAttributeKeyAccessServer()) { + mergeAttributeKeyAccessServer(other.getAttributeKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> attributeKeyAccessServerBuilder_; + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + public boolean hasAttributeKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { + if (attributeKeyAccessServerBuilder_ == null) { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } else { + return attributeKeyAccessServerBuilder_.getMessage(); + } + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder setAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { + if (attributeKeyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attributeKeyAccessServer_ = value; + } else { + attributeKeyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder setAttributeKeyAccessServer( + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder builderForValue) { + if (attributeKeyAccessServerBuilder_ == null) { + attributeKeyAccessServer_ = builderForValue.build(); + } else { + attributeKeyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder mergeAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { + if (attributeKeyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attributeKeyAccessServer_ != null && + attributeKeyAccessServer_ != io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) { + getAttributeKeyAccessServerBuilder().mergeFrom(value); + } else { + attributeKeyAccessServer_ = value; + } + } else { + attributeKeyAccessServerBuilder_.mergeFrom(value); + } + if (attributeKeyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder clearAttributeKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + attributeKeyAccessServer_ = null; + if (attributeKeyAccessServerBuilder_ != null) { + attributeKeyAccessServerBuilder_.dispose(); + attributeKeyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder getAttributeKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { + if (attributeKeyAccessServerBuilder_ != null) { + return attributeKeyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return attributeKeyAccessServer_ == null ? + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> + getAttributeKeyAccessServerFieldBuilder() { + if (attributeKeyAccessServerBuilder_ == null) { + attributeKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder>( + getAttributeKeyAccessServer(), + getParentForChildren(), + isClean()); + attributeKeyAccessServer_ = null; + } + return attributeKeyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) + private static final io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest(); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveKeyAccessServerFromAttributeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequestOrBuilder.java new file mode 100644 index 00000000..2fb81c3c --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequestOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface RemoveKeyAccessServerFromAttributeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + boolean hasAttributeKeyAccessServer(); + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer(); + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponse.java new file mode 100644 index 00000000..d0d60a65 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromAttributeResponse} + */ +public final class RemoveKeyAccessServerFromAttributeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) + RemoveKeyAccessServerFromAttributeResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveKeyAccessServerFromAttributeResponse.newBuilder() to construct. + private RemoveKeyAccessServerFromAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveKeyAccessServerFromAttributeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveKeyAccessServerFromAttributeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + @java.lang.Override + public boolean hasAttributeKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttributeKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttributeKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse other = (io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse) obj; + + if (hasAttributeKeyAccessServer() != other.hasAttributeKeyAccessServer()) return false; + if (hasAttributeKeyAccessServer()) { + if (!getAttributeKeyAccessServer() + .equals(other.getAttributeKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttributeKeyAccessServer()) { + hash = (37 * hash) + ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getAttributeKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromAttributeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeKeyAccessServer_ = null; + if (attributeKeyAccessServerBuilder_ != null) { + attributeKeyAccessServerBuilder_.dispose(); + attributeKeyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse build() { + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse buildPartial() { + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse result = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeKeyAccessServer_ = attributeKeyAccessServerBuilder_ == null + ? attributeKeyAccessServer_ + : attributeKeyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse other) { + if (other == io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.getDefaultInstance()) return this; + if (other.hasAttributeKeyAccessServer()) { + mergeAttributeKeyAccessServer(other.getAttributeKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> attributeKeyAccessServerBuilder_; + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + public boolean hasAttributeKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { + if (attributeKeyAccessServerBuilder_ == null) { + return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } else { + return attributeKeyAccessServerBuilder_.getMessage(); + } + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder setAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { + if (attributeKeyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attributeKeyAccessServer_ = value; + } else { + attributeKeyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder setAttributeKeyAccessServer( + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder builderForValue) { + if (attributeKeyAccessServerBuilder_ == null) { + attributeKeyAccessServer_ = builderForValue.build(); + } else { + attributeKeyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder mergeAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { + if (attributeKeyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attributeKeyAccessServer_ != null && + attributeKeyAccessServer_ != io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) { + getAttributeKeyAccessServerBuilder().mergeFrom(value); + } else { + attributeKeyAccessServer_ = value; + } + } else { + attributeKeyAccessServerBuilder_.mergeFrom(value); + } + if (attributeKeyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public Builder clearAttributeKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + attributeKeyAccessServer_ = null; + if (attributeKeyAccessServerBuilder_ != null) { + attributeKeyAccessServerBuilder_.dispose(); + attributeKeyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder getAttributeKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { + if (attributeKeyAccessServerBuilder_ != null) { + return attributeKeyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return attributeKeyAccessServer_ == null ? + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; + } + } + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> + getAttributeKeyAccessServerFieldBuilder() { + if (attributeKeyAccessServerBuilder_ == null) { + attributeKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder>( + getAttributeKeyAccessServer(), + getParentForChildren(), + isClean()); + attributeKeyAccessServer_ = null; + } + return attributeKeyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) + private static final io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse(); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveKeyAccessServerFromAttributeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponseOrBuilder.java new file mode 100644 index 00000000..39e4dde9 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface RemoveKeyAccessServerFromAttributeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return Whether the attributeKeyAccessServer field is set. + */ + boolean hasAttributeKeyAccessServer(); + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + * @return The attributeKeyAccessServer. + */ + io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer(); + /** + * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; + */ + io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequest.java new file mode 100644 index 00000000..a1834a4d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequest.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromValueRequest} + */ +public final class RemoveKeyAccessServerFromValueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.RemoveKeyAccessServerFromValueRequest) + RemoveKeyAccessServerFromValueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveKeyAccessServerFromValueRequest.newBuilder() to construct. + private RemoveKeyAccessServerFromValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveKeyAccessServerFromValueRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveKeyAccessServerFromValueRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.Builder.class); + } + + private int bitField0_; + public static final int VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + @java.lang.Override + public boolean hasValueKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValueKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValueKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest other = (io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest) obj; + + if (hasValueKeyAccessServer() != other.hasValueKeyAccessServer()) return false; + if (hasValueKeyAccessServer()) { + if (!getValueKeyAccessServer() + .equals(other.getValueKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValueKeyAccessServer()) { + hash = (37 * hash) + VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getValueKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromValueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.RemoveKeyAccessServerFromValueRequest) + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueKeyAccessServer_ = null; + if (valueKeyAccessServerBuilder_ != null) { + valueKeyAccessServerBuilder_.dispose(); + valueKeyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest build() { + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest buildPartial() { + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest result = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.valueKeyAccessServer_ = valueKeyAccessServerBuilder_ == null + ? valueKeyAccessServer_ + : valueKeyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest other) { + if (other == io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.getDefaultInstance()) return this; + if (other.hasValueKeyAccessServer()) { + mergeValueKeyAccessServer(other.getValueKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> valueKeyAccessServerBuilder_; + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + public boolean hasValueKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { + if (valueKeyAccessServerBuilder_ == null) { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } else { + return valueKeyAccessServerBuilder_.getMessage(); + } + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder setValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { + if (valueKeyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueKeyAccessServer_ = value; + } else { + valueKeyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder setValueKeyAccessServer( + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder builderForValue) { + if (valueKeyAccessServerBuilder_ == null) { + valueKeyAccessServer_ = builderForValue.build(); + } else { + valueKeyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder mergeValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { + if (valueKeyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + valueKeyAccessServer_ != null && + valueKeyAccessServer_ != io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) { + getValueKeyAccessServerBuilder().mergeFrom(value); + } else { + valueKeyAccessServer_ = value; + } + } else { + valueKeyAccessServerBuilder_.mergeFrom(value); + } + if (valueKeyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder clearValueKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + valueKeyAccessServer_ = null; + if (valueKeyAccessServerBuilder_ != null) { + valueKeyAccessServerBuilder_.dispose(); + valueKeyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder getValueKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { + if (valueKeyAccessServerBuilder_ != null) { + return valueKeyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return valueKeyAccessServer_ == null ? + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> + getValueKeyAccessServerFieldBuilder() { + if (valueKeyAccessServerBuilder_ == null) { + valueKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder>( + getValueKeyAccessServer(), + getParentForChildren(), + isClean()); + valueKeyAccessServer_ = null; + } + return valueKeyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.RemoveKeyAccessServerFromValueRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.RemoveKeyAccessServerFromValueRequest) + private static final io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest(); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveKeyAccessServerFromValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequestOrBuilder.java new file mode 100644 index 00000000..59fd2699 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequestOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface RemoveKeyAccessServerFromValueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.RemoveKeyAccessServerFromValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + boolean hasValueKeyAccessServer(); + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer(); + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponse.java new file mode 100644 index 00000000..46d788d6 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromValueResponse} + */ +public final class RemoveKeyAccessServerFromValueResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.RemoveKeyAccessServerFromValueResponse) + RemoveKeyAccessServerFromValueResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveKeyAccessServerFromValueResponse.newBuilder() to construct. + private RemoveKeyAccessServerFromValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveKeyAccessServerFromValueResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveKeyAccessServerFromValueResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.Builder.class); + } + + private int bitField0_; + public static final int VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + @java.lang.Override + public boolean hasValueKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValueKeyAccessServer()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValueKeyAccessServer()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse other = (io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse) obj; + + if (hasValueKeyAccessServer() != other.hasValueKeyAccessServer()) return false; + if (hasValueKeyAccessServer()) { + if (!getValueKeyAccessServer() + .equals(other.getValueKeyAccessServer())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValueKeyAccessServer()) { + hash = (37 * hash) + VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getValueKeyAccessServer().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromValueResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.RemoveKeyAccessServerFromValueResponse) + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueKeyAccessServerFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueKeyAccessServer_ = null; + if (valueKeyAccessServerBuilder_ != null) { + valueKeyAccessServerBuilder_.dispose(); + valueKeyAccessServerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse build() { + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse buildPartial() { + io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse result = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.valueKeyAccessServer_ = valueKeyAccessServerBuilder_ == null + ? valueKeyAccessServer_ + : valueKeyAccessServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse other) { + if (other == io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.getDefaultInstance()) return this; + if (other.hasValueKeyAccessServer()) { + mergeValueKeyAccessServer(other.getValueKeyAccessServer()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueKeyAccessServerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> valueKeyAccessServerBuilder_; + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + public boolean hasValueKeyAccessServer() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { + if (valueKeyAccessServerBuilder_ == null) { + return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } else { + return valueKeyAccessServerBuilder_.getMessage(); + } + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder setValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { + if (valueKeyAccessServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueKeyAccessServer_ = value; + } else { + valueKeyAccessServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder setValueKeyAccessServer( + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder builderForValue) { + if (valueKeyAccessServerBuilder_ == null) { + valueKeyAccessServer_ = builderForValue.build(); + } else { + valueKeyAccessServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder mergeValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { + if (valueKeyAccessServerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + valueKeyAccessServer_ != null && + valueKeyAccessServer_ != io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) { + getValueKeyAccessServerBuilder().mergeFrom(value); + } else { + valueKeyAccessServer_ = value; + } + } else { + valueKeyAccessServerBuilder_.mergeFrom(value); + } + if (valueKeyAccessServer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public Builder clearValueKeyAccessServer() { + bitField0_ = (bitField0_ & ~0x00000001); + valueKeyAccessServer_ = null; + if (valueKeyAccessServerBuilder_ != null) { + valueKeyAccessServerBuilder_.dispose(); + valueKeyAccessServerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder getValueKeyAccessServerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueKeyAccessServerFieldBuilder().getBuilder(); + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { + if (valueKeyAccessServerBuilder_ != null) { + return valueKeyAccessServerBuilder_.getMessageOrBuilder(); + } else { + return valueKeyAccessServer_ == null ? + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; + } + } + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> + getValueKeyAccessServerFieldBuilder() { + if (valueKeyAccessServerBuilder_ == null) { + valueKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder>( + getValueKeyAccessServer(), + getParentForChildren(), + isClean()); + valueKeyAccessServer_ = null; + } + return valueKeyAccessServerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.RemoveKeyAccessServerFromValueResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.RemoveKeyAccessServerFromValueResponse) + private static final io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse(); + } + + public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveKeyAccessServerFromValueResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponseOrBuilder.java new file mode 100644 index 00000000..e696bfae --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface RemoveKeyAccessServerFromValueResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.RemoveKeyAccessServerFromValueResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return Whether the valueKeyAccessServer field is set. + */ + boolean hasValueKeyAccessServer(); + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + * @return The valueKeyAccessServer. + */ + io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer(); + /** + * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; + */ + io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequest.java new file mode 100644 index 00000000..6f6a5fe1 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequest.java @@ -0,0 +1,905 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.UpdateAttributeRequest} + */ +public final class UpdateAttributeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.UpdateAttributeRequest) + UpdateAttributeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateAttributeRequest.newBuilder() to construct. + private UpdateAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateAttributeRequest() { + id_ = ""; + metadataUpdateBehavior_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.UpdateAttributeRequest.class, io.opentdf.platform.policy.attributes.UpdateAttributeRequest.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(101, metadataUpdateBehavior_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.UpdateAttributeRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.UpdateAttributeRequest other = (io.opentdf.platform.policy.attributes.UpdateAttributeRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.UpdateAttributeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.UpdateAttributeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.UpdateAttributeRequest) + io.opentdf.platform.policy.attributes.UpdateAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.UpdateAttributeRequest.class, io.opentdf.platform.policy.attributes.UpdateAttributeRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.UpdateAttributeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.UpdateAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeRequest build() { + io.opentdf.platform.policy.attributes.UpdateAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeRequest buildPartial() { + io.opentdf.platform.policy.attributes.UpdateAttributeRequest result = new io.opentdf.platform.policy.attributes.UpdateAttributeRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.UpdateAttributeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.UpdateAttributeRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.UpdateAttributeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.UpdateAttributeRequest other) { + if (other == io.opentdf.platform.policy.attributes.UpdateAttributeRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 808 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000004); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.UpdateAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.UpdateAttributeRequest) + private static final io.opentdf.platform.policy.attributes.UpdateAttributeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.UpdateAttributeRequest(); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAttributeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequestOrBuilder.java new file mode 100644 index 00000000..6d7d1be3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequestOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface UpdateAttributeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.UpdateAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponse.java new file mode 100644 index 00000000..c23c8f72 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.UpdateAttributeResponse} + */ +public final class UpdateAttributeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.UpdateAttributeResponse) + UpdateAttributeResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateAttributeResponse.newBuilder() to construct. + private UpdateAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateAttributeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateAttributeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.UpdateAttributeResponse.class, io.opentdf.platform.policy.attributes.UpdateAttributeResponse.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Attribute attribute_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + @java.lang.Override + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + @java.lang.Override + public io.opentdf.platform.policy.Attribute getAttribute() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAttribute()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAttribute()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.UpdateAttributeResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.UpdateAttributeResponse other = (io.opentdf.platform.policy.attributes.UpdateAttributeResponse) obj; + + if (hasAttribute() != other.hasAttribute()) return false; + if (hasAttribute()) { + if (!getAttribute() + .equals(other.getAttribute())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAttribute()) { + hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getAttribute().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.UpdateAttributeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.UpdateAttributeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.UpdateAttributeResponse) + io.opentdf.platform.policy.attributes.UpdateAttributeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.UpdateAttributeResponse.class, io.opentdf.platform.policy.attributes.UpdateAttributeResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.UpdateAttributeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAttributeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.UpdateAttributeResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeResponse build() { + io.opentdf.platform.policy.attributes.UpdateAttributeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeResponse buildPartial() { + io.opentdf.platform.policy.attributes.UpdateAttributeResponse result = new io.opentdf.platform.policy.attributes.UpdateAttributeResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.UpdateAttributeResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attribute_ = attributeBuilder_ == null + ? attribute_ + : attributeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.UpdateAttributeResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.UpdateAttributeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.UpdateAttributeResponse other) { + if (other == io.opentdf.platform.policy.attributes.UpdateAttributeResponse.getDefaultInstance()) return this; + if (other.hasAttribute()) { + mergeAttribute(other.getAttribute()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAttributeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Attribute attribute_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + public boolean hasAttribute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + public io.opentdf.platform.policy.Attribute getAttribute() { + if (attributeBuilder_ == null) { + return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } else { + return attributeBuilder_.getMessage(); + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attribute_ = value; + } else { + attributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder setAttribute( + io.opentdf.platform.policy.Attribute.Builder builderForValue) { + if (attributeBuilder_ == null) { + attribute_ = builderForValue.build(); + } else { + attributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { + if (attributeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + attribute_ != null && + attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { + getAttributeBuilder().mergeFrom(value); + } else { + attribute_ = value; + } + } else { + attributeBuilder_.mergeFrom(value); + } + if (attribute_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public Builder clearAttribute() { + bitField0_ = (bitField0_ & ~0x00000001); + attribute_ = null; + if (attributeBuilder_ != null) { + attributeBuilder_.dispose(); + attributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAttributeFieldBuilder().getBuilder(); + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { + if (attributeBuilder_ != null) { + return attributeBuilder_.getMessageOrBuilder(); + } else { + return attribute_ == null ? + io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; + } + } + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> + getAttributeFieldBuilder() { + if (attributeBuilder_ == null) { + attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( + getAttribute(), + getParentForChildren(), + isClean()); + attribute_ = null; + } + return attributeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.UpdateAttributeResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.UpdateAttributeResponse) + private static final io.opentdf.platform.policy.attributes.UpdateAttributeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.UpdateAttributeResponse(); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAttributeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponseOrBuilder.java new file mode 100644 index 00000000..8795ef75 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface UpdateAttributeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.UpdateAttributeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return Whether the attribute field is set. + */ + boolean hasAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + * @return The attribute. + */ + io.opentdf.platform.policy.Attribute getAttribute(); + /** + * .policy.Attribute attribute = 1 [json_name = "attribute"]; + */ + io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequest.java new file mode 100644 index 00000000..c1c9390a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequest.java @@ -0,0 +1,1118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.UpdateAttributeValueRequest} + */ +public final class UpdateAttributeValueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.UpdateAttributeValueRequest) + UpdateAttributeValueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateAttributeValueRequest.newBuilder() to construct. + private UpdateAttributeValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateAttributeValueRequest() { + id_ = ""; + members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + metadataUpdateBehavior_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateAttributeValueRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBERS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @return A list containing the members. + */ + public com.google.protobuf.ProtocolStringList + getMembersList() { + return members_; + } + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @return The count of members. + */ + public int getMembersCount() { + return members_.size(); + } + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param index The index of the element to return. + * @return The members at the given index. + */ + public java.lang.String getMembers(int index) { + return members_.get(index); + } + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + public com.google.protobuf.ByteString + getMembersBytes(int index) { + return members_.getByteString(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + for (int i = 0; i < members_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, members_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + { + int dataSize = 0; + for (int i = 0; i < members_.size(); i++) { + dataSize += computeStringSizeNoTag(members_.getRaw(i)); + } + size += dataSize; + size += 1 * getMembersList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(101, metadataUpdateBehavior_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest other = (io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getMembersList() + .equals(other.getMembersList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getMembersCount() > 0) { + hash = (37 * hash) + MEMBERS_FIELD_NUMBER; + hash = (53 * hash) + getMembersList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.UpdateAttributeValueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.UpdateAttributeValueRequest) + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest build() { + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest buildPartial() { + io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest result = new io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + members_.makeImmutable(); + result.members_ = members_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest) { + return mergeFrom((io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest other) { + if (other == io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.members_.isEmpty()) { + if (members_.isEmpty()) { + members_ = other.members_; + bitField0_ |= 0x00000002; + } else { + ensureMembersIsMutable(); + members_.addAll(other.members_); + } + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + ensureMembersIsMutable(); + members_.add(s); + break; + } // case 34 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 808 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureMembersIsMutable() { + if (!members_.isModifiable()) { + members_ = new com.google.protobuf.LazyStringArrayList(members_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @return A list containing the members. + */ + public com.google.protobuf.ProtocolStringList + getMembersList() { + members_.makeImmutable(); + return members_; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @return The count of members. + */ + public int getMembersCount() { + return members_.size(); + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param index The index of the element to return. + * @return The members at the given index. + */ + public java.lang.String getMembers(int index) { + return members_.get(index); + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + public com.google.protobuf.ByteString + getMembersBytes(int index) { + return members_.getByteString(index); + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param index The index to set the value at. + * @param value The members to set. + * @return This builder for chaining. + */ + public Builder setMembers( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureMembersIsMutable(); + members_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param value The members to add. + * @return This builder for chaining. + */ + public Builder addMembers( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureMembersIsMutable(); + members_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param values The members to add. + * @return This builder for chaining. + */ + public Builder addAllMembers( + java.lang.Iterable values) { + ensureMembersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, members_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @return This builder for chaining. + */ + public Builder clearMembers() { + members_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param value The bytes of the members to add. + * @return This builder for chaining. + */ + public Builder addMembersBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureMembersIsMutable(); + members_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000008); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.UpdateAttributeValueRequest) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.UpdateAttributeValueRequest) + private static final io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest(); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAttributeValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequestOrBuilder.java new file mode 100644 index 00000000..5022a20a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequestOrBuilder.java @@ -0,0 +1,101 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface UpdateAttributeValueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.UpdateAttributeValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @return A list containing the members. + */ + java.util.List + getMembersList(); + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @return The count of members. + */ + int getMembersCount(); + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param index The index of the element to return. + * @return The members at the given index. + */ + java.lang.String getMembers(int index); + /** + *
+   * Optional
+   * 
+ * + * repeated string members = 4 [json_name = "members"]; + * @param index The index of the value to return. + * @return The bytes of the members at the given index. + */ + com.google.protobuf.ByteString + getMembersBytes(int index); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponse.java new file mode 100644 index 00000000..f523892c --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.UpdateAttributeValueResponse} + */ +public final class UpdateAttributeValueResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.UpdateAttributeValueResponse) + UpdateAttributeValueResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateAttributeValueResponse.newBuilder() to construct. + private UpdateAttributeValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateAttributeValueResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateAttributeValueResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.Builder.class); + } + + private int bitField0_; + public static final int VALUE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Value value_; + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public io.opentdf.platform.policy.Value getValue() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse other = (io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse) obj; + + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.UpdateAttributeValueResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.UpdateAttributeValueResponse) + io.opentdf.platform.policy.attributes.UpdateAttributeValueResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse build() { + io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse buildPartial() { + io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse result = new io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = valueBuilder_ == null + ? value_ + : valueBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse) { + return mergeFrom((io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse other) { + if (other == io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.getDefaultInstance()) return this; + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + public io.opentdf.platform.policy.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder setValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder setValue( + io.opentdf.platform.policy.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder mergeValue(io.opentdf.platform.policy.Value value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + value_ != null && + value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + if (value_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public io.opentdf.platform.policy.Value.Builder getValueBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + io.opentdf.platform.policy.Value.getDefaultInstance() : value_; + } + } + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.UpdateAttributeValueResponse) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.UpdateAttributeValueResponse) + private static final io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse(); + } + + public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAttributeValueResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponseOrBuilder.java new file mode 100644 index 00000000..29e29df9 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface UpdateAttributeValueResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.UpdateAttributeValueResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * .policy.Value value = 1 [json_name = "value"]; + * @return The value. + */ + io.opentdf.platform.policy.Value getValue(); + /** + * .policy.Value value = 1 [json_name = "value"]; + */ + io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServer.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServer.java new file mode 100644 index 00000000..443d66eb --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServer.java @@ -0,0 +1,678 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +/** + * Protobuf type {@code policy.attributes.ValueKeyAccessServer} + */ +public final class ValueKeyAccessServer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.attributes.ValueKeyAccessServer) + ValueKeyAccessServerOrBuilder { +private static final long serialVersionUID = 0L; + // Use ValueKeyAccessServer.newBuilder() to construct. + private ValueKeyAccessServer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ValueKeyAccessServer() { + valueId_ = ""; + keyAccessServerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ValueKeyAccessServer(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.class, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder.class); + } + + public static final int VALUE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object valueId_ = ""; + /** + * string value_id = 1 [json_name = "valueId"]; + * @return The valueId. + */ + @java.lang.Override + public java.lang.String getValueId() { + java.lang.Object ref = valueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueId_ = s; + return s; + } + } + /** + * string value_id = 1 [json_name = "valueId"]; + * @return The bytes for valueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueIdBytes() { + java.lang.Object ref = valueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_ACCESS_SERVER_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object keyAccessServerId_ = ""; + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The keyAccessServerId. + */ + @java.lang.Override + public java.lang.String getKeyAccessServerId() { + java.lang.Object ref = keyAccessServerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyAccessServerId_ = s; + return s; + } + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The bytes for keyAccessServerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyAccessServerIdBytes() { + java.lang.Object ref = keyAccessServerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyAccessServerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, valueId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyAccessServerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyAccessServerId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, valueId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyAccessServerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyAccessServerId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.attributes.ValueKeyAccessServer)) { + return super.equals(obj); + } + io.opentdf.platform.policy.attributes.ValueKeyAccessServer other = (io.opentdf.platform.policy.attributes.ValueKeyAccessServer) obj; + + if (!getValueId() + .equals(other.getValueId())) return false; + if (!getKeyAccessServerId() + .equals(other.getKeyAccessServerId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getValueId().hashCode(); + hash = (37 * hash) + KEY_ACCESS_SERVER_ID_FIELD_NUMBER; + hash = (53 * hash) + getKeyAccessServerId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.attributes.ValueKeyAccessServer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.attributes.ValueKeyAccessServer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.attributes.ValueKeyAccessServer) + io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.attributes.ValueKeyAccessServer.class, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder.class); + } + + // Construct using io.opentdf.platform.policy.attributes.ValueKeyAccessServer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueId_ = ""; + keyAccessServerId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getDefaultInstanceForType() { + return io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer build() { + io.opentdf.platform.policy.attributes.ValueKeyAccessServer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer buildPartial() { + io.opentdf.platform.policy.attributes.ValueKeyAccessServer result = new io.opentdf.platform.policy.attributes.ValueKeyAccessServer(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.attributes.ValueKeyAccessServer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.valueId_ = valueId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.keyAccessServerId_ = keyAccessServerId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.attributes.ValueKeyAccessServer) { + return mergeFrom((io.opentdf.platform.policy.attributes.ValueKeyAccessServer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.attributes.ValueKeyAccessServer other) { + if (other == io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) return this; + if (!other.getValueId().isEmpty()) { + valueId_ = other.valueId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKeyAccessServerId().isEmpty()) { + keyAccessServerId_ = other.keyAccessServerId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + valueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + keyAccessServerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object valueId_ = ""; + /** + * string value_id = 1 [json_name = "valueId"]; + * @return The valueId. + */ + public java.lang.String getValueId() { + java.lang.Object ref = valueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string value_id = 1 [json_name = "valueId"]; + * @return The bytes for valueId. + */ + public com.google.protobuf.ByteString + getValueIdBytes() { + java.lang.Object ref = valueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string value_id = 1 [json_name = "valueId"]; + * @param value The valueId to set. + * @return This builder for chaining. + */ + public Builder setValueId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + valueId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string value_id = 1 [json_name = "valueId"]; + * @return This builder for chaining. + */ + public Builder clearValueId() { + valueId_ = getDefaultInstance().getValueId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string value_id = 1 [json_name = "valueId"]; + * @param value The bytes for valueId to set. + * @return This builder for chaining. + */ + public Builder setValueIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + valueId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object keyAccessServerId_ = ""; + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The keyAccessServerId. + */ + public java.lang.String getKeyAccessServerId() { + java.lang.Object ref = keyAccessServerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyAccessServerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The bytes for keyAccessServerId. + */ + public com.google.protobuf.ByteString + getKeyAccessServerIdBytes() { + java.lang.Object ref = keyAccessServerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyAccessServerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @param value The keyAccessServerId to set. + * @return This builder for chaining. + */ + public Builder setKeyAccessServerId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + keyAccessServerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return This builder for chaining. + */ + public Builder clearKeyAccessServerId() { + keyAccessServerId_ = getDefaultInstance().getKeyAccessServerId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @param value The bytes for keyAccessServerId to set. + * @return This builder for chaining. + */ + public Builder setKeyAccessServerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + keyAccessServerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.attributes.ValueKeyAccessServer) + } + + // @@protoc_insertion_point(class_scope:policy.attributes.ValueKeyAccessServer) + private static final io.opentdf.platform.policy.attributes.ValueKeyAccessServer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ValueKeyAccessServer(); + } + + public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValueKeyAccessServer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServerOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServerOrBuilder.java new file mode 100644 index 00000000..addc68d9 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServerOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/attributes/attributes.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.attributes; + +public interface ValueKeyAccessServerOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.attributes.ValueKeyAccessServer) + com.google.protobuf.MessageOrBuilder { + + /** + * string value_id = 1 [json_name = "valueId"]; + * @return The valueId. + */ + java.lang.String getValueId(); + /** + * string value_id = 1 [json_name = "valueId"]; + * @return The bytes for valueId. + */ + com.google.protobuf.ByteString + getValueIdBytes(); + + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The keyAccessServerId. + */ + java.lang.String getKeyAccessServerId(); + /** + * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; + * @return The bytes for keyAccessServerId. + */ + com.google.protobuf.ByteString + getKeyAccessServerIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequest.java new file mode 100644 index 00000000..da77385d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequest.java @@ -0,0 +1,811 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.CreateNamespaceRequest} + */ +public final class CreateNamespaceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.CreateNamespaceRequest) + CreateNamespaceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateNamespaceRequest.newBuilder() to construct. + private CreateNamespaceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateNamespaceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateNamespaceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Required
+   * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.CreateNamespaceRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.CreateNamespaceRequest other = (io.opentdf.platform.policy.namespaces.CreateNamespaceRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.CreateNamespaceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.CreateNamespaceRequest) + io.opentdf.platform.policy.namespaces.CreateNamespaceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.CreateNamespaceRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.CreateNamespaceRequest build() { + io.opentdf.platform.policy.namespaces.CreateNamespaceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.CreateNamespaceRequest buildPartial() { + io.opentdf.platform.policy.namespaces.CreateNamespaceRequest result = new io.opentdf.platform.policy.namespaces.CreateNamespaceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.CreateNamespaceRequest) { + return mergeFrom((io.opentdf.platform.policy.namespaces.CreateNamespaceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest other) { + if (other == io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required
+     * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.CreateNamespaceRequest) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.CreateNamespaceRequest) + private static final io.opentdf.platform.policy.namespaces.CreateNamespaceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.CreateNamespaceRequest(); + } + + public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNamespaceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.CreateNamespaceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequestOrBuilder.java new file mode 100644 index 00000000..0451297d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequestOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface CreateNamespaceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.CreateNamespaceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required
+   * 
+ * + * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponse.java new file mode 100644 index 00000000..b1e183cb --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.CreateNamespaceResponse} + */ +public final class CreateNamespaceResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.CreateNamespaceResponse) + CreateNamespaceResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateNamespaceResponse.newBuilder() to construct. + private CreateNamespaceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateNamespaceResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateNamespaceResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.Builder.class); + } + + private int bitField0_; + public static final int NAMESPACE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Namespace namespace_; + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + @java.lang.Override + public boolean hasNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + @java.lang.Override + public io.opentdf.platform.policy.Namespace getNamespace() { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getNamespace()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getNamespace()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.CreateNamespaceResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.CreateNamespaceResponse other = (io.opentdf.platform.policy.namespaces.CreateNamespaceResponse) obj; + + if (hasNamespace() != other.hasNamespace()) return false; + if (hasNamespace()) { + if (!getNamespace() + .equals(other.getNamespace())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNamespace()) { + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.CreateNamespaceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.CreateNamespaceResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.CreateNamespaceResponse) + io.opentdf.platform.policy.namespaces.CreateNamespaceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNamespaceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + namespace_ = null; + if (namespaceBuilder_ != null) { + namespaceBuilder_.dispose(); + namespaceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse build() { + io.opentdf.platform.policy.namespaces.CreateNamespaceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse buildPartial() { + io.opentdf.platform.policy.namespaces.CreateNamespaceResponse result = new io.opentdf.platform.policy.namespaces.CreateNamespaceResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.CreateNamespaceResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.namespace_ = namespaceBuilder_ == null + ? namespace_ + : namespaceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.CreateNamespaceResponse) { + return mergeFrom((io.opentdf.platform.policy.namespaces.CreateNamespaceResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.CreateNamespaceResponse other) { + if (other == io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.getDefaultInstance()) return this; + if (other.hasNamespace()) { + mergeNamespace(other.getNamespace()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getNamespaceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Namespace namespace_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespaceBuilder_; + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + public boolean hasNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + public io.opentdf.platform.policy.Namespace getNamespace() { + if (namespaceBuilder_ == null) { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } else { + return namespaceBuilder_.getMessage(); + } + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder setNamespace(io.opentdf.platform.policy.Namespace value) { + if (namespaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + namespace_ = value; + } else { + namespaceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder setNamespace( + io.opentdf.platform.policy.Namespace.Builder builderForValue) { + if (namespaceBuilder_ == null) { + namespace_ = builderForValue.build(); + } else { + namespaceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder mergeNamespace(io.opentdf.platform.policy.Namespace value) { + if (namespaceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + namespace_ != null && + namespace_ != io.opentdf.platform.policy.Namespace.getDefaultInstance()) { + getNamespaceBuilder().mergeFrom(value); + } else { + namespace_ = value; + } + } else { + namespaceBuilder_.mergeFrom(value); + } + if (namespace_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder clearNamespace() { + bitField0_ = (bitField0_ & ~0x00000001); + namespace_ = null; + if (namespaceBuilder_ != null) { + namespaceBuilder_.dispose(); + namespaceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public io.opentdf.platform.policy.Namespace.Builder getNamespaceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getNamespaceFieldBuilder().getBuilder(); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { + if (namespaceBuilder_ != null) { + return namespaceBuilder_.getMessageOrBuilder(); + } else { + return namespace_ == null ? + io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> + getNamespaceFieldBuilder() { + if (namespaceBuilder_ == null) { + namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( + getNamespace(), + getParentForChildren(), + isClean()); + namespace_ = null; + } + return namespaceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.CreateNamespaceResponse) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.CreateNamespaceResponse) + private static final io.opentdf.platform.policy.namespaces.CreateNamespaceResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.CreateNamespaceResponse(); + } + + public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNamespaceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponseOrBuilder.java new file mode 100644 index 00000000..1777ae2b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface CreateNamespaceResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.CreateNamespaceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + boolean hasNamespace(); + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + io.opentdf.platform.policy.Namespace getNamespace(); + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequest.java new file mode 100644 index 00000000..5fd35eaa --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.DeactivateNamespaceRequest} + */ +public final class DeactivateNamespaceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.DeactivateNamespaceRequest) + DeactivateNamespaceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeactivateNamespaceRequest.newBuilder() to construct. + private DeactivateNamespaceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeactivateNamespaceRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeactivateNamespaceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest other = (io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.DeactivateNamespaceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.DeactivateNamespaceRequest) + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest build() { + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest buildPartial() { + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest result = new io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest) { + return mergeFrom((io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest other) { + if (other == io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.DeactivateNamespaceRequest) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.DeactivateNamespaceRequest) + private static final io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest(); + } + + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeactivateNamespaceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequestOrBuilder.java new file mode 100644 index 00000000..425660ed --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface DeactivateNamespaceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.DeactivateNamespaceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponse.java new file mode 100644 index 00000000..966726dc --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponse.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.DeactivateNamespaceResponse} + */ +public final class DeactivateNamespaceResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.DeactivateNamespaceResponse) + DeactivateNamespaceResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeactivateNamespaceResponse.newBuilder() to construct. + private DeactivateNamespaceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeactivateNamespaceResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeactivateNamespaceResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse other = (io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.DeactivateNamespaceResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.DeactivateNamespaceResponse) + io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse build() { + io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse buildPartial() { + io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse result = new io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse) { + return mergeFrom((io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse other) { + if (other == io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.DeactivateNamespaceResponse) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.DeactivateNamespaceResponse) + private static final io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse(); + } + + public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeactivateNamespaceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponseOrBuilder.java new file mode 100644 index 00000000..b800fb04 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponseOrBuilder.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface DeactivateNamespaceResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.DeactivateNamespaceResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequest.java new file mode 100644 index 00000000..d0529acd --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.GetNamespaceRequest} + */ +public final class GetNamespaceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.GetNamespaceRequest) + GetNamespaceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetNamespaceRequest.newBuilder() to construct. + private GetNamespaceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNamespaceRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNamespaceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.GetNamespaceRequest.class, io.opentdf.platform.policy.namespaces.GetNamespaceRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.GetNamespaceRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.GetNamespaceRequest other = (io.opentdf.platform.policy.namespaces.GetNamespaceRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.GetNamespaceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.GetNamespaceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.GetNamespaceRequest) + io.opentdf.platform.policy.namespaces.GetNamespaceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.GetNamespaceRequest.class, io.opentdf.platform.policy.namespaces.GetNamespaceRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.GetNamespaceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.GetNamespaceRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.GetNamespaceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.GetNamespaceRequest build() { + io.opentdf.platform.policy.namespaces.GetNamespaceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.GetNamespaceRequest buildPartial() { + io.opentdf.platform.policy.namespaces.GetNamespaceRequest result = new io.opentdf.platform.policy.namespaces.GetNamespaceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.GetNamespaceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.GetNamespaceRequest) { + return mergeFrom((io.opentdf.platform.policy.namespaces.GetNamespaceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.GetNamespaceRequest other) { + if (other == io.opentdf.platform.policy.namespaces.GetNamespaceRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.GetNamespaceRequest) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.GetNamespaceRequest) + private static final io.opentdf.platform.policy.namespaces.GetNamespaceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.GetNamespaceRequest(); + } + + public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNamespaceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.GetNamespaceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequestOrBuilder.java new file mode 100644 index 00000000..a2a70855 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface GetNamespaceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.GetNamespaceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponse.java new file mode 100644 index 00000000..fac2b52d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.GetNamespaceResponse} + */ +public final class GetNamespaceResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.GetNamespaceResponse) + GetNamespaceResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetNamespaceResponse.newBuilder() to construct. + private GetNamespaceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNamespaceResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNamespaceResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.GetNamespaceResponse.class, io.opentdf.platform.policy.namespaces.GetNamespaceResponse.Builder.class); + } + + private int bitField0_; + public static final int NAMESPACE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Namespace namespace_; + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + @java.lang.Override + public boolean hasNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + @java.lang.Override + public io.opentdf.platform.policy.Namespace getNamespace() { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getNamespace()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getNamespace()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.GetNamespaceResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.GetNamespaceResponse other = (io.opentdf.platform.policy.namespaces.GetNamespaceResponse) obj; + + if (hasNamespace() != other.hasNamespace()) return false; + if (hasNamespace()) { + if (!getNamespace() + .equals(other.getNamespace())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNamespace()) { + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.GetNamespaceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.GetNamespaceResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.GetNamespaceResponse) + io.opentdf.platform.policy.namespaces.GetNamespaceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.GetNamespaceResponse.class, io.opentdf.platform.policy.namespaces.GetNamespaceResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.GetNamespaceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNamespaceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + namespace_ = null; + if (namespaceBuilder_ != null) { + namespaceBuilder_.dispose(); + namespaceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.GetNamespaceResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.GetNamespaceResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.GetNamespaceResponse build() { + io.opentdf.platform.policy.namespaces.GetNamespaceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.GetNamespaceResponse buildPartial() { + io.opentdf.platform.policy.namespaces.GetNamespaceResponse result = new io.opentdf.platform.policy.namespaces.GetNamespaceResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.GetNamespaceResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.namespace_ = namespaceBuilder_ == null + ? namespace_ + : namespaceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.GetNamespaceResponse) { + return mergeFrom((io.opentdf.platform.policy.namespaces.GetNamespaceResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.GetNamespaceResponse other) { + if (other == io.opentdf.platform.policy.namespaces.GetNamespaceResponse.getDefaultInstance()) return this; + if (other.hasNamespace()) { + mergeNamespace(other.getNamespace()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getNamespaceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Namespace namespace_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespaceBuilder_; + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + public boolean hasNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + public io.opentdf.platform.policy.Namespace getNamespace() { + if (namespaceBuilder_ == null) { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } else { + return namespaceBuilder_.getMessage(); + } + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder setNamespace(io.opentdf.platform.policy.Namespace value) { + if (namespaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + namespace_ = value; + } else { + namespaceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder setNamespace( + io.opentdf.platform.policy.Namespace.Builder builderForValue) { + if (namespaceBuilder_ == null) { + namespace_ = builderForValue.build(); + } else { + namespaceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder mergeNamespace(io.opentdf.platform.policy.Namespace value) { + if (namespaceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + namespace_ != null && + namespace_ != io.opentdf.platform.policy.Namespace.getDefaultInstance()) { + getNamespaceBuilder().mergeFrom(value); + } else { + namespace_ = value; + } + } else { + namespaceBuilder_.mergeFrom(value); + } + if (namespace_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder clearNamespace() { + bitField0_ = (bitField0_ & ~0x00000001); + namespace_ = null; + if (namespaceBuilder_ != null) { + namespaceBuilder_.dispose(); + namespaceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public io.opentdf.platform.policy.Namespace.Builder getNamespaceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getNamespaceFieldBuilder().getBuilder(); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { + if (namespaceBuilder_ != null) { + return namespaceBuilder_.getMessageOrBuilder(); + } else { + return namespace_ == null ? + io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> + getNamespaceFieldBuilder() { + if (namespaceBuilder_ == null) { + namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( + getNamespace(), + getParentForChildren(), + isClean()); + namespace_ = null; + } + return namespaceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.GetNamespaceResponse) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.GetNamespaceResponse) + private static final io.opentdf.platform.policy.namespaces.GetNamespaceResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.GetNamespaceResponse(); + } + + public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNamespaceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.GetNamespaceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponseOrBuilder.java new file mode 100644 index 00000000..80192090 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface GetNamespaceResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.GetNamespaceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + boolean hasNamespace(); + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + io.opentdf.platform.policy.Namespace getNamespace(); + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequest.java new file mode 100644 index 00000000..56ccdf5d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequest.java @@ -0,0 +1,528 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.ListNamespacesRequest} + */ +public final class ListNamespacesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.ListNamespacesRequest) + ListNamespacesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNamespacesRequest.newBuilder() to construct. + private ListNamespacesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNamespacesRequest() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNamespacesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.ListNamespacesRequest.class, io.opentdf.platform.policy.namespaces.ListNamespacesRequest.Builder.class); + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override public io.opentdf.platform.common.ActiveStateEnum getState() { + io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); + return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.ListNamespacesRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.ListNamespacesRequest other = (io.opentdf.platform.policy.namespaces.ListNamespacesRequest) obj; + + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.ListNamespacesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.ListNamespacesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.ListNamespacesRequest) + io.opentdf.platform.policy.namespaces.ListNamespacesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.ListNamespacesRequest.class, io.opentdf.platform.policy.namespaces.ListNamespacesRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.ListNamespacesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.ListNamespacesRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.ListNamespacesRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.ListNamespacesRequest build() { + io.opentdf.platform.policy.namespaces.ListNamespacesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.ListNamespacesRequest buildPartial() { + io.opentdf.platform.policy.namespaces.ListNamespacesRequest result = new io.opentdf.platform.policy.namespaces.ListNamespacesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.ListNamespacesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.ListNamespacesRequest) { + return mergeFrom((io.opentdf.platform.policy.namespaces.ListNamespacesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.ListNamespacesRequest other) { + if (other == io.opentdf.platform.policy.namespaces.ListNamespacesRequest.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int state_ = 0; + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public io.opentdf.platform.common.ActiveStateEnum getState() { + io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); + return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(io.opentdf.platform.common.ActiveStateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * ACTIVE by default when not specified
+     * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.ListNamespacesRequest) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.ListNamespacesRequest) + private static final io.opentdf.platform.policy.namespaces.ListNamespacesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.ListNamespacesRequest(); + } + + public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNamespacesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.ListNamespacesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequestOrBuilder.java new file mode 100644 index 00000000..4fe596c8 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface ListNamespacesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.ListNamespacesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * ACTIVE by default when not specified
+   * 
+ * + * .common.ActiveStateEnum state = 1 [json_name = "state"]; + * @return The state. + */ + io.opentdf.platform.common.ActiveStateEnum getState(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponse.java new file mode 100644 index 00000000..9e08998e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.ListNamespacesResponse} + */ +public final class ListNamespacesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.ListNamespacesResponse) + ListNamespacesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListNamespacesResponse.newBuilder() to construct. + private ListNamespacesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListNamespacesResponse() { + namespaces_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListNamespacesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.ListNamespacesResponse.class, io.opentdf.platform.policy.namespaces.ListNamespacesResponse.Builder.class); + } + + public static final int NAMESPACES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List namespaces_; + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + @java.lang.Override + public java.util.List getNamespacesList() { + return namespaces_; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + @java.lang.Override + public java.util.List + getNamespacesOrBuilderList() { + return namespaces_; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + @java.lang.Override + public int getNamespacesCount() { + return namespaces_.size(); + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.Namespace getNamespaces(int index) { + return namespaces_.get(index); + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespacesOrBuilder( + int index) { + return namespaces_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < namespaces_.size(); i++) { + output.writeMessage(1, namespaces_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < namespaces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, namespaces_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.ListNamespacesResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.ListNamespacesResponse other = (io.opentdf.platform.policy.namespaces.ListNamespacesResponse) obj; + + if (!getNamespacesList() + .equals(other.getNamespacesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNamespacesCount() > 0) { + hash = (37 * hash) + NAMESPACES_FIELD_NUMBER; + hash = (53 * hash) + getNamespacesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.ListNamespacesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.ListNamespacesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.ListNamespacesResponse) + io.opentdf.platform.policy.namespaces.ListNamespacesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.ListNamespacesResponse.class, io.opentdf.platform.policy.namespaces.ListNamespacesResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.ListNamespacesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (namespacesBuilder_ == null) { + namespaces_ = java.util.Collections.emptyList(); + } else { + namespaces_ = null; + namespacesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.ListNamespacesResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.ListNamespacesResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.ListNamespacesResponse build() { + io.opentdf.platform.policy.namespaces.ListNamespacesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.ListNamespacesResponse buildPartial() { + io.opentdf.platform.policy.namespaces.ListNamespacesResponse result = new io.opentdf.platform.policy.namespaces.ListNamespacesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.namespaces.ListNamespacesResponse result) { + if (namespacesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + namespaces_ = java.util.Collections.unmodifiableList(namespaces_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.namespaces_ = namespaces_; + } else { + result.namespaces_ = namespacesBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.ListNamespacesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.ListNamespacesResponse) { + return mergeFrom((io.opentdf.platform.policy.namespaces.ListNamespacesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.ListNamespacesResponse other) { + if (other == io.opentdf.platform.policy.namespaces.ListNamespacesResponse.getDefaultInstance()) return this; + if (namespacesBuilder_ == null) { + if (!other.namespaces_.isEmpty()) { + if (namespaces_.isEmpty()) { + namespaces_ = other.namespaces_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamespacesIsMutable(); + namespaces_.addAll(other.namespaces_); + } + onChanged(); + } + } else { + if (!other.namespaces_.isEmpty()) { + if (namespacesBuilder_.isEmpty()) { + namespacesBuilder_.dispose(); + namespacesBuilder_ = null; + namespaces_ = other.namespaces_; + bitField0_ = (bitField0_ & ~0x00000001); + namespacesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNamespacesFieldBuilder() : null; + } else { + namespacesBuilder_.addAllMessages(other.namespaces_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.Namespace m = + input.readMessage( + io.opentdf.platform.policy.Namespace.parser(), + extensionRegistry); + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.add(m); + } else { + namespacesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List namespaces_ = + java.util.Collections.emptyList(); + private void ensureNamespacesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + namespaces_ = new java.util.ArrayList(namespaces_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespacesBuilder_; + + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public java.util.List getNamespacesList() { + if (namespacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(namespaces_); + } else { + return namespacesBuilder_.getMessageList(); + } + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public int getNamespacesCount() { + if (namespacesBuilder_ == null) { + return namespaces_.size(); + } else { + return namespacesBuilder_.getCount(); + } + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public io.opentdf.platform.policy.Namespace getNamespaces(int index) { + if (namespacesBuilder_ == null) { + return namespaces_.get(index); + } else { + return namespacesBuilder_.getMessage(index); + } + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder setNamespaces( + int index, io.opentdf.platform.policy.Namespace value) { + if (namespacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespacesIsMutable(); + namespaces_.set(index, value); + onChanged(); + } else { + namespacesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder setNamespaces( + int index, io.opentdf.platform.policy.Namespace.Builder builderForValue) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.set(index, builderForValue.build()); + onChanged(); + } else { + namespacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder addNamespaces(io.opentdf.platform.policy.Namespace value) { + if (namespacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespacesIsMutable(); + namespaces_.add(value); + onChanged(); + } else { + namespacesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder addNamespaces( + int index, io.opentdf.platform.policy.Namespace value) { + if (namespacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespacesIsMutable(); + namespaces_.add(index, value); + onChanged(); + } else { + namespacesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder addNamespaces( + io.opentdf.platform.policy.Namespace.Builder builderForValue) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.add(builderForValue.build()); + onChanged(); + } else { + namespacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder addNamespaces( + int index, io.opentdf.platform.policy.Namespace.Builder builderForValue) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.add(index, builderForValue.build()); + onChanged(); + } else { + namespacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder addAllNamespaces( + java.lang.Iterable values) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, namespaces_); + onChanged(); + } else { + namespacesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder clearNamespaces() { + if (namespacesBuilder_ == null) { + namespaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + namespacesBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public Builder removeNamespaces(int index) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.remove(index); + onChanged(); + } else { + namespacesBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public io.opentdf.platform.policy.Namespace.Builder getNamespacesBuilder( + int index) { + return getNamespacesFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespacesOrBuilder( + int index) { + if (namespacesBuilder_ == null) { + return namespaces_.get(index); } else { + return namespacesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public java.util.List + getNamespacesOrBuilderList() { + if (namespacesBuilder_ != null) { + return namespacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(namespaces_); + } + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public io.opentdf.platform.policy.Namespace.Builder addNamespacesBuilder() { + return getNamespacesFieldBuilder().addBuilder( + io.opentdf.platform.policy.Namespace.getDefaultInstance()); + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public io.opentdf.platform.policy.Namespace.Builder addNamespacesBuilder( + int index) { + return getNamespacesFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Namespace.getDefaultInstance()); + } + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + public java.util.List + getNamespacesBuilderList() { + return getNamespacesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> + getNamespacesFieldBuilder() { + if (namespacesBuilder_ == null) { + namespacesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( + namespaces_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + namespaces_ = null; + } + return namespacesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.ListNamespacesResponse) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.ListNamespacesResponse) + private static final io.opentdf.platform.policy.namespaces.ListNamespacesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.ListNamespacesResponse(); + } + + public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNamespacesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.ListNamespacesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponseOrBuilder.java new file mode 100644 index 00000000..ac8c1d34 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface ListNamespacesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.ListNamespacesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + java.util.List + getNamespacesList(); + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + io.opentdf.platform.policy.Namespace getNamespaces(int index); + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + int getNamespacesCount(); + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + java.util.List + getNamespacesOrBuilderList(); + /** + * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; + */ + io.opentdf.platform.policy.NamespaceOrBuilder getNamespacesOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespaceServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespaceServiceGrpc.java new file mode 100644 index 00000000..e8c70f2a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespaceServiceGrpc.java @@ -0,0 +1,589 @@ +package io.opentdf.platform.policy.namespaces; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.61.1)", + comments = "Source: policy/namespaces/namespaces.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class NamespaceServiceGrpc { + + private NamespaceServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "policy.namespaces.NamespaceService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetNamespaceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNamespace", + requestType = io.opentdf.platform.policy.namespaces.GetNamespaceRequest.class, + responseType = io.opentdf.platform.policy.namespaces.GetNamespaceResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNamespaceMethod() { + io.grpc.MethodDescriptor getGetNamespaceMethod; + if ((getGetNamespaceMethod = NamespaceServiceGrpc.getGetNamespaceMethod) == null) { + synchronized (NamespaceServiceGrpc.class) { + if ((getGetNamespaceMethod = NamespaceServiceGrpc.getGetNamespaceMethod) == null) { + NamespaceServiceGrpc.getGetNamespaceMethod = getGetNamespaceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNamespace")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.GetNamespaceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.GetNamespaceResponse.getDefaultInstance())) + .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("GetNamespace")) + .build(); + } + } + } + return getGetNamespaceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListNamespacesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNamespaces", + requestType = io.opentdf.platform.policy.namespaces.ListNamespacesRequest.class, + responseType = io.opentdf.platform.policy.namespaces.ListNamespacesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNamespacesMethod() { + io.grpc.MethodDescriptor getListNamespacesMethod; + if ((getListNamespacesMethod = NamespaceServiceGrpc.getListNamespacesMethod) == null) { + synchronized (NamespaceServiceGrpc.class) { + if ((getListNamespacesMethod = NamespaceServiceGrpc.getListNamespacesMethod) == null) { + NamespaceServiceGrpc.getListNamespacesMethod = getListNamespacesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNamespaces")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.ListNamespacesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.ListNamespacesResponse.getDefaultInstance())) + .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("ListNamespaces")) + .build(); + } + } + } + return getListNamespacesMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateNamespaceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNamespace", + requestType = io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.class, + responseType = io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateNamespaceMethod() { + io.grpc.MethodDescriptor getCreateNamespaceMethod; + if ((getCreateNamespaceMethod = NamespaceServiceGrpc.getCreateNamespaceMethod) == null) { + synchronized (NamespaceServiceGrpc.class) { + if ((getCreateNamespaceMethod = NamespaceServiceGrpc.getCreateNamespaceMethod) == null) { + NamespaceServiceGrpc.getCreateNamespaceMethod = getCreateNamespaceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNamespace")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.getDefaultInstance())) + .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("CreateNamespace")) + .build(); + } + } + } + return getCreateNamespaceMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateNamespaceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateNamespace", + requestType = io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.class, + responseType = io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateNamespaceMethod() { + io.grpc.MethodDescriptor getUpdateNamespaceMethod; + if ((getUpdateNamespaceMethod = NamespaceServiceGrpc.getUpdateNamespaceMethod) == null) { + synchronized (NamespaceServiceGrpc.class) { + if ((getUpdateNamespaceMethod = NamespaceServiceGrpc.getUpdateNamespaceMethod) == null) { + NamespaceServiceGrpc.getUpdateNamespaceMethod = getUpdateNamespaceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNamespace")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.getDefaultInstance())) + .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("UpdateNamespace")) + .build(); + } + } + } + return getUpdateNamespaceMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeactivateNamespaceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeactivateNamespace", + requestType = io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.class, + responseType = io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeactivateNamespaceMethod() { + io.grpc.MethodDescriptor getDeactivateNamespaceMethod; + if ((getDeactivateNamespaceMethod = NamespaceServiceGrpc.getDeactivateNamespaceMethod) == null) { + synchronized (NamespaceServiceGrpc.class) { + if ((getDeactivateNamespaceMethod = NamespaceServiceGrpc.getDeactivateNamespaceMethod) == null) { + NamespaceServiceGrpc.getDeactivateNamespaceMethod = getDeactivateNamespaceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeactivateNamespace")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.getDefaultInstance())) + .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("DeactivateNamespace")) + .build(); + } + } + } + return getDeactivateNamespaceMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static NamespaceServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NamespaceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NamespaceServiceStub(channel, callOptions); + } + }; + return NamespaceServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static NamespaceServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NamespaceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NamespaceServiceBlockingStub(channel, callOptions); + } + }; + return NamespaceServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static NamespaceServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NamespaceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NamespaceServiceFutureStub(channel, callOptions); + } + }; + return NamespaceServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + */ + default void getNamespace(io.opentdf.platform.policy.namespaces.GetNamespaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNamespaceMethod(), responseObserver); + } + + /** + */ + default void listNamespaces(io.opentdf.platform.policy.namespaces.ListNamespacesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNamespacesMethod(), responseObserver); + } + + /** + */ + default void createNamespace(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNamespaceMethod(), responseObserver); + } + + /** + */ + default void updateNamespace(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNamespaceMethod(), responseObserver); + } + + /** + */ + default void deactivateNamespace(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeactivateNamespaceMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service NamespaceService. + */ + public static abstract class NamespaceServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return NamespaceServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service NamespaceService. + */ + public static final class NamespaceServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private NamespaceServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NamespaceServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NamespaceServiceStub(channel, callOptions); + } + + /** + */ + public void getNamespace(io.opentdf.platform.policy.namespaces.GetNamespaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNamespaceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listNamespaces(io.opentdf.platform.policy.namespaces.ListNamespacesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNamespacesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void createNamespace(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void updateNamespace(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateNamespaceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deactivateNamespace(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeactivateNamespaceMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service NamespaceService. + */ + public static final class NamespaceServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private NamespaceServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NamespaceServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NamespaceServiceBlockingStub(channel, callOptions); + } + + /** + */ + public io.opentdf.platform.policy.namespaces.GetNamespaceResponse getNamespace(io.opentdf.platform.policy.namespaces.GetNamespaceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNamespaceMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.namespaces.ListNamespacesResponse listNamespaces(io.opentdf.platform.policy.namespaces.ListNamespacesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNamespacesMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse createNamespace(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNamespaceMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse updateNamespace(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateNamespaceMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse deactivateNamespace(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeactivateNamespaceMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service NamespaceService. + */ + public static final class NamespaceServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private NamespaceServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NamespaceServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NamespaceServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getNamespace( + io.opentdf.platform.policy.namespaces.GetNamespaceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNamespaceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listNamespaces( + io.opentdf.platform.policy.namespaces.ListNamespacesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNamespacesMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createNamespace( + io.opentdf.platform.policy.namespaces.CreateNamespaceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateNamespace( + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateNamespaceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deactivateNamespace( + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeactivateNamespaceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_NAMESPACE = 0; + private static final int METHODID_LIST_NAMESPACES = 1; + private static final int METHODID_CREATE_NAMESPACE = 2; + private static final int METHODID_UPDATE_NAMESPACE = 3; + private static final int METHODID_DEACTIVATE_NAMESPACE = 4; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_NAMESPACE: + serviceImpl.getNamespace((io.opentdf.platform.policy.namespaces.GetNamespaceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_NAMESPACES: + serviceImpl.listNamespaces((io.opentdf.platform.policy.namespaces.ListNamespacesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_NAMESPACE: + serviceImpl.createNamespace((io.opentdf.platform.policy.namespaces.CreateNamespaceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_NAMESPACE: + serviceImpl.updateNamespace((io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEACTIVATE_NAMESPACE: + serviceImpl.deactivateNamespace((io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetNamespaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.namespaces.GetNamespaceRequest, + io.opentdf.platform.policy.namespaces.GetNamespaceResponse>( + service, METHODID_GET_NAMESPACE))) + .addMethod( + getListNamespacesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.namespaces.ListNamespacesRequest, + io.opentdf.platform.policy.namespaces.ListNamespacesResponse>( + service, METHODID_LIST_NAMESPACES))) + .addMethod( + getCreateNamespaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.namespaces.CreateNamespaceRequest, + io.opentdf.platform.policy.namespaces.CreateNamespaceResponse>( + service, METHODID_CREATE_NAMESPACE))) + .addMethod( + getUpdateNamespaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest, + io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse>( + service, METHODID_UPDATE_NAMESPACE))) + .addMethod( + getDeactivateNamespaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest, + io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse>( + service, METHODID_DEACTIVATE_NAMESPACE))) + .build(); + } + + private static abstract class NamespaceServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + NamespaceServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("NamespaceService"); + } + } + + private static final class NamespaceServiceFileDescriptorSupplier + extends NamespaceServiceBaseDescriptorSupplier { + NamespaceServiceFileDescriptorSupplier() {} + } + + private static final class NamespaceServiceMethodDescriptorSupplier + extends NamespaceServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + NamespaceServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (NamespaceServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new NamespaceServiceFileDescriptorSupplier()) + .addMethod(getGetNamespaceMethod()) + .addMethod(getListNamespacesMethod()) + .addMethod(getCreateNamespaceMethod()) + .addMethod(getUpdateNamespaceMethod()) + .addMethod(getDeactivateNamespaceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespacesProto.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespacesProto.java new file mode 100644 index 00000000..3aa3713d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespacesProto.java @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public final class NamespacesProto { + private NamespacesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_GetNamespaceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_GetNamespaceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_GetNamespaceResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_GetNamespaceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_ListNamespacesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_ListNamespacesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_ListNamespacesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_ListNamespacesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_CreateNamespaceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_CreateNamespaceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_CreateNamespaceResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_CreateNamespaceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_UpdateNamespaceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_UpdateNamespaceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_DeactivateNamespaceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_namespaces_DeactivateNamespaceResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"policy/namespaces/namespaces.proto\022\021po" + + "licy.namespaces\032\033buf/validate/validate.p" + + "roto\032\034google/api/annotations.proto\032\023comm" + + "on/common.proto\032\024policy/objects.proto\"-\n" + + "\023GetNamespaceRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001" + + "R\002id\"G\n\024GetNamespaceResponse\022/\n\tnamespac" + + "e\030\001 \001(\0132\021.policy.NamespaceR\tnamespace\"F\n" + + "\025ListNamespacesRequest\022-\n\005state\030\001 \001(\0162\027." + + "common.ActiveStateEnumR\005state\"K\n\026ListNam" + + "espacesResponse\0221\n\nnamespaces\030\001 \003(\0132\021.po" + + "licy.NamespaceR\nnamespaces\"\307\004\n\026CreateNam" + + "espaceRequest\022\367\003\n\004name\030\001 \001(\tB\342\003\272H\336\003r\003\030\375\001" + + "\272\001\322\003\n\020namespace_format\022\352\002Namespace must " + + "be a valid hostname. It should include a" + + "t least one dot, with each segment (labe" + + "l) starting and ending with an alphanume" + + "ric character. Each label must be 1 to 6" + + "3 characters long, allowing hyphens but " + + "not as the first or last character. The " + + "top-level domain (the last segment after" + + " the final dot) must consist of at least" + + " two alphabetic characters.\032Qthis.matche" + + "s(\'^([a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-" + + "zA-Z0-9])?\\\\.)+[a-zA-Z]{2,}$\')\310\001\001R\004name\022" + + "3\n\010metadata\030d \001(\0132\027.common.MetadataMutab" + + "leR\010metadata\"J\n\027CreateNamespaceResponse\022" + + "/\n\tnamespace\030\001 \001(\0132\021.policy.NamespaceR\tn" + + "amespace\"\273\001\n\026UpdateNamespaceRequest\022\026\n\002i" + + "d\030\001 \001(\tB\006\272H\003\310\001\001R\002id\0223\n\010metadata\030d \001(\0132\027." + + "common.MetadataMutableR\010metadata\022T\n\030meta" + + "data_update_behavior\030e \001(\0162\032.common.Meta" + + "dataUpdateEnumR\026metadataUpdateBehavior\"J" + + "\n\027UpdateNamespaceResponse\022/\n\tnamespace\030\001" + + " \001(\0132\021.policy.NamespaceR\tnamespace\"4\n\032De" + + "activateNamespaceRequest\022\026\n\002id\030\001 \001(\tB\006\272H" + + "\003\310\001\001R\002id\"\035\n\033DeactivateNamespaceResponse2" + + "\336\005\n\020NamespaceService\022\204\001\n\014GetNamespace\022&." + + "policy.namespaces.GetNamespaceRequest\032\'." + + "policy.namespaces.GetNamespaceResponse\"#" + + "\202\323\344\223\002\035\022\033/attributes/namespaces/{id}\022\205\001\n\016" + + "ListNamespaces\022(.policy.namespaces.ListN" + + "amespacesRequest\032).policy.namespaces.Lis" + + "tNamespacesResponse\"\036\202\323\344\223\002\030\022\026/attributes" + + "/namespaces\022\213\001\n\017CreateNamespace\022).policy" + + ".namespaces.CreateNamespaceRequest\032*.pol" + + "icy.namespaces.CreateNamespaceResponse\"!" + + "\202\323\344\223\002\033\"\026/attributes/namespaces:\001*\022\220\001\n\017Up" + + "dateNamespace\022).policy.namespaces.Update" + + "NamespaceRequest\032*.policy.namespaces.Upd" + + "ateNamespaceResponse\"&\202\323\344\223\002 2\033/attribute" + + "s/namespaces/{id}:\001*\022\231\001\n\023DeactivateNames" + + "pace\022-.policy.namespaces.DeactivateNames" + + "paceRequest\032..policy.namespaces.Deactiva" + + "teNamespaceResponse\"#\202\323\344\223\002\035*\033/attributes" + + "/namespaces/{id}B\235\001\n%io.opentdf.platform" + + ".policy.namespacesB\017NamespacesProtoP\001\242\002\003" + + "PNX\252\002\021Policy.Namespaces\312\002\021Policy\\Namespa" + + "ces\342\002\035Policy\\Namespaces\\GPBMetadata\352\002\022Po" + + "licy::Namespacesb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + build.buf.validate.ValidateProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + io.opentdf.platform.common.CommonProto.getDescriptor(), + io.opentdf.platform.policy.ObjectsProto.getDescriptor(), + }); + internal_static_policy_namespaces_GetNamespaceRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_policy_namespaces_GetNamespaceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_GetNamespaceRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_namespaces_GetNamespaceResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_policy_namespaces_GetNamespaceResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_GetNamespaceResponse_descriptor, + new java.lang.String[] { "Namespace", }); + internal_static_policy_namespaces_ListNamespacesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_policy_namespaces_ListNamespacesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_ListNamespacesRequest_descriptor, + new java.lang.String[] { "State", }); + internal_static_policy_namespaces_ListNamespacesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_policy_namespaces_ListNamespacesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_ListNamespacesResponse_descriptor, + new java.lang.String[] { "Namespaces", }); + internal_static_policy_namespaces_CreateNamespaceRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_policy_namespaces_CreateNamespaceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_CreateNamespaceRequest_descriptor, + new java.lang.String[] { "Name", "Metadata", }); + internal_static_policy_namespaces_CreateNamespaceResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_policy_namespaces_CreateNamespaceResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_CreateNamespaceResponse_descriptor, + new java.lang.String[] { "Namespace", }); + internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_policy_namespaces_UpdateNamespaceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor, + new java.lang.String[] { "Id", "Metadata", "MetadataUpdateBehavior", }); + internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_policy_namespaces_UpdateNamespaceResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor, + new java.lang.String[] { "Namespace", }); + internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_policy_namespaces_DeactivateNamespaceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_policy_namespaces_DeactivateNamespaceResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor, + new java.lang.String[] { }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(build.buf.validate.ValidateProto.field); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + build.buf.validate.ValidateProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + io.opentdf.platform.common.CommonProto.getDescriptor(); + io.opentdf.platform.policy.ObjectsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequest.java new file mode 100644 index 00000000..32f8ec7d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequest.java @@ -0,0 +1,905 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.UpdateNamespaceRequest} + */ +public final class UpdateNamespaceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.UpdateNamespaceRequest) + UpdateNamespaceRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateNamespaceRequest.newBuilder() to construct. + private UpdateNamespaceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateNamespaceRequest() { + id_ = ""; + metadataUpdateBehavior_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateNamespaceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(101, metadataUpdateBehavior_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest other = (io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.UpdateNamespaceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.UpdateNamespaceRequest) + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest build() { + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest buildPartial() { + io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest result = new io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest) { + return mergeFrom((io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest other) { + if (other == io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 808 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000004); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.UpdateNamespaceRequest) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.UpdateNamespaceRequest) + private static final io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest(); + } + + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateNamespaceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequestOrBuilder.java new file mode 100644 index 00000000..957e4d67 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequestOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface UpdateNamespaceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.UpdateNamespaceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponse.java new file mode 100644 index 00000000..ca787ac8 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +/** + * Protobuf type {@code policy.namespaces.UpdateNamespaceResponse} + */ +public final class UpdateNamespaceResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.namespaces.UpdateNamespaceResponse) + UpdateNamespaceResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateNamespaceResponse.newBuilder() to construct. + private UpdateNamespaceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateNamespaceResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateNamespaceResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.Builder.class); + } + + private int bitField0_; + public static final int NAMESPACE_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.Namespace namespace_; + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + @java.lang.Override + public boolean hasNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + @java.lang.Override + public io.opentdf.platform.policy.Namespace getNamespace() { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getNamespace()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getNamespace()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse other = (io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse) obj; + + if (hasNamespace() != other.hasNamespace()) return false; + if (hasNamespace()) { + if (!getNamespace() + .equals(other.getNamespace())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNamespace()) { + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.namespaces.UpdateNamespaceResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.namespaces.UpdateNamespaceResponse) + io.opentdf.platform.policy.namespaces.UpdateNamespaceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNamespaceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + namespace_ = null; + if (namespaceBuilder_ != null) { + namespaceBuilder_.dispose(); + namespaceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse build() { + io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse buildPartial() { + io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse result = new io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.namespace_ = namespaceBuilder_ == null + ? namespace_ + : namespaceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse) { + return mergeFrom((io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse other) { + if (other == io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.getDefaultInstance()) return this; + if (other.hasNamespace()) { + mergeNamespace(other.getNamespace()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getNamespaceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.Namespace namespace_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespaceBuilder_; + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + public boolean hasNamespace() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + public io.opentdf.platform.policy.Namespace getNamespace() { + if (namespaceBuilder_ == null) { + return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } else { + return namespaceBuilder_.getMessage(); + } + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder setNamespace(io.opentdf.platform.policy.Namespace value) { + if (namespaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + namespace_ = value; + } else { + namespaceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder setNamespace( + io.opentdf.platform.policy.Namespace.Builder builderForValue) { + if (namespaceBuilder_ == null) { + namespace_ = builderForValue.build(); + } else { + namespaceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder mergeNamespace(io.opentdf.platform.policy.Namespace value) { + if (namespaceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + namespace_ != null && + namespace_ != io.opentdf.platform.policy.Namespace.getDefaultInstance()) { + getNamespaceBuilder().mergeFrom(value); + } else { + namespace_ = value; + } + } else { + namespaceBuilder_.mergeFrom(value); + } + if (namespace_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public Builder clearNamespace() { + bitField0_ = (bitField0_ & ~0x00000001); + namespace_ = null; + if (namespaceBuilder_ != null) { + namespaceBuilder_.dispose(); + namespaceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public io.opentdf.platform.policy.Namespace.Builder getNamespaceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getNamespaceFieldBuilder().getBuilder(); + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { + if (namespaceBuilder_ != null) { + return namespaceBuilder_.getMessageOrBuilder(); + } else { + return namespace_ == null ? + io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; + } + } + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> + getNamespaceFieldBuilder() { + if (namespaceBuilder_ == null) { + namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( + getNamespace(), + getParentForChildren(), + isClean()); + namespace_ = null; + } + return namespaceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.namespaces.UpdateNamespaceResponse) + } + + // @@protoc_insertion_point(class_scope:policy.namespaces.UpdateNamespaceResponse) + private static final io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse(); + } + + public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateNamespaceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponseOrBuilder.java new file mode 100644 index 00000000..6745a99b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/namespaces/namespaces.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.namespaces; + +public interface UpdateNamespaceResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.namespaces.UpdateNamespaceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return Whether the namespace field is set. + */ + boolean hasNamespace(); + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + * @return The namespace. + */ + io.opentdf.platform.policy.Namespace getNamespace(); + /** + * .policy.Namespace namespace = 1 [json_name = "namespace"]; + */ + io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequest.java new file mode 100644 index 00000000..439e9e9b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequest.java @@ -0,0 +1,1060 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + *
+ *
+ *### Request
+ *
+ *grpcurl -plaintext -d @ localhost:9000 policy.resourcemapping.ResourceMappingService/CreateResourceMapping <<EOM
+ *{
+ *"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"]
+ *}
+ *}
+ * 
+ * + * Protobuf type {@code policy.resourcemapping.CreateResourceMappingRequest} + */ +public final class CreateResourceMappingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.CreateResourceMappingRequest) + CreateResourceMappingRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateResourceMappingRequest.newBuilder() to construct. + private CreateResourceMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateResourceMappingRequest() { + attributeValueId_ = ""; + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateResourceMappingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object attributeValueId_ = ""; + /** + *
+   * Required
+   * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + @java.lang.Override + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValueId_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERMS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @return A list containing the terms. + */ + public com.google.protobuf.ProtocolStringList + getTermsList() { + return terms_; + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @return The count of terms. + */ + public int getTermsCount() { + return terms_.size(); + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param index The index of the element to return. + * @return The terms at the given index. + */ + public java.lang.String getTerms(int index) { + return terms_.get(index); + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + public com.google.protobuf.ByteString + getTermsBytes(int index) { + return terms_.getByteString(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeValueId_); + } + for (int i = 0; i < terms_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, terms_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeValueId_); + } + { + int dataSize = 0; + for (int i = 0; i < terms_.size(); i++) { + dataSize += computeStringSizeNoTag(terms_.getRaw(i)); + } + size += dataSize; + size += 1 * getTermsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest other = (io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest) obj; + + if (!getAttributeValueId() + .equals(other.getAttributeValueId())) return false; + if (!getTermsList() + .equals(other.getTermsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValueId().hashCode(); + if (getTermsCount() > 0) { + hash = (37 * hash) + TERMS_FIELD_NUMBER; + hash = (53 * hash) + getTermsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   *
+   *### Request
+   *
+   *grpcurl -plaintext -d @ localhost:9000 policy.resourcemapping.ResourceMappingService/CreateResourceMapping <<EOM
+   *{
+   *"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"]
+   *}
+   *}
+   * 
+ * + * Protobuf type {@code policy.resourcemapping.CreateResourceMappingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.CreateResourceMappingRequest) + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeValueId_ = ""; + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest build() { + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest buildPartial() { + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest result = new io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeValueId_ = attributeValueId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + terms_.makeImmutable(); + result.terms_ = terms_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest other) { + if (other == io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.getDefaultInstance()) return this; + if (!other.getAttributeValueId().isEmpty()) { + attributeValueId_ = other.attributeValueId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.terms_.isEmpty()) { + if (terms_.isEmpty()) { + terms_ = other.terms_; + bitField0_ |= 0x00000002; + } else { + ensureTermsIsMutable(); + terms_.addAll(other.terms_); + } + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + attributeValueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTermsIsMutable(); + terms_.add(s); + break; + } // case 18 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object attributeValueId_ = ""; + /** + *
+     * Required
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @param value The attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attributeValueId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearAttributeValueId() { + attributeValueId_ = getDefaultInstance().getAttributeValueId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @param value The bytes for attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attributeValueId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureTermsIsMutable() { + if (!terms_.isModifiable()) { + terms_ = new com.google.protobuf.LazyStringArrayList(terms_); + } + bitField0_ |= 0x00000002; + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @return A list containing the terms. + */ + public com.google.protobuf.ProtocolStringList + getTermsList() { + terms_.makeImmutable(); + return terms_; + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @return The count of terms. + */ + public int getTermsCount() { + return terms_.size(); + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param index The index of the element to return. + * @return The terms at the given index. + */ + public java.lang.String getTerms(int index) { + return terms_.get(index); + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + public com.google.protobuf.ByteString + getTermsBytes(int index) { + return terms_.getByteString(index); + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param index The index to set the value at. + * @param value The terms to set. + * @return This builder for chaining. + */ + public Builder setTerms( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTermsIsMutable(); + terms_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param value The terms to add. + * @return This builder for chaining. + */ + public Builder addTerms( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTermsIsMutable(); + terms_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param values The terms to add. + * @return This builder for chaining. + */ + public Builder addAllTerms( + java.lang.Iterable values) { + ensureTermsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, terms_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearTerms() { + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param value The bytes of the terms to add. + * @return This builder for chaining. + */ + public Builder addTermsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureTermsIsMutable(); + terms_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.CreateResourceMappingRequest) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.CreateResourceMappingRequest) + private static final io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest(); + } + + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateResourceMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequestOrBuilder.java new file mode 100644 index 00000000..78bd1af6 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequestOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface CreateResourceMappingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.CreateResourceMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + java.lang.String getAttributeValueId(); + /** + *
+   * Required
+   * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + com.google.protobuf.ByteString + getAttributeValueIdBytes(); + + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @return A list containing the terms. + */ + java.util.List + getTermsList(); + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @return The count of terms. + */ + int getTermsCount(); + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param index The index of the element to return. + * @return The terms at the given index. + */ + java.lang.String getTerms(int index); + /** + * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + com.google.protobuf.ByteString + getTermsBytes(int index); + + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponse.java new file mode 100644 index 00000000..129b58a5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.CreateResourceMappingResponse} + */ +public final class CreateResourceMappingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.CreateResourceMappingResponse) + CreateResourceMappingResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateResourceMappingResponse.newBuilder() to construct. + private CreateResourceMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateResourceMappingResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateResourceMappingResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.Builder.class); + } + + private int bitField0_; + public static final int RESOURCE_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.ResourceMapping resourceMapping_; + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + @java.lang.Override + public boolean hasResourceMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getResourceMapping()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getResourceMapping()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse other = (io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse) obj; + + if (hasResourceMapping() != other.hasResourceMapping()) return false; + if (hasResourceMapping()) { + if (!getResourceMapping() + .equals(other.getResourceMapping())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasResourceMapping()) { + hash = (37 * hash) + RESOURCE_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getResourceMapping().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.CreateResourceMappingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.CreateResourceMappingResponse) + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResourceMappingFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceMapping_ = null; + if (resourceMappingBuilder_ != null) { + resourceMappingBuilder_.dispose(); + resourceMappingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse build() { + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse buildPartial() { + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse result = new io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceMapping_ = resourceMappingBuilder_ == null + ? resourceMapping_ + : resourceMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse other) { + if (other == io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.getDefaultInstance()) return this; + if (other.hasResourceMapping()) { + mergeResourceMapping(other.getResourceMapping()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getResourceMappingFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.ResourceMapping resourceMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingBuilder_; + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + public boolean hasResourceMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { + if (resourceMappingBuilder_ == null) { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } else { + return resourceMappingBuilder_.getMessage(); + } + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder setResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceMapping_ = value; + } else { + resourceMappingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder setResourceMapping( + io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { + if (resourceMappingBuilder_ == null) { + resourceMapping_ = builderForValue.build(); + } else { + resourceMappingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder mergeResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + resourceMapping_ != null && + resourceMapping_ != io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) { + getResourceMappingBuilder().mergeFrom(value); + } else { + resourceMapping_ = value; + } + } else { + resourceMappingBuilder_.mergeFrom(value); + } + if (resourceMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder clearResourceMapping() { + bitField0_ = (bitField0_ & ~0x00000001); + resourceMapping_ = null; + if (resourceMappingBuilder_ != null) { + resourceMappingBuilder_.dispose(); + resourceMappingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getResourceMappingFieldBuilder().getBuilder(); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { + if (resourceMappingBuilder_ != null) { + return resourceMappingBuilder_.getMessageOrBuilder(); + } else { + return resourceMapping_ == null ? + io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> + getResourceMappingFieldBuilder() { + if (resourceMappingBuilder_ == null) { + resourceMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( + getResourceMapping(), + getParentForChildren(), + isClean()); + resourceMapping_ = null; + } + return resourceMappingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.CreateResourceMappingResponse) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.CreateResourceMappingResponse) + private static final io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse(); + } + + public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateResourceMappingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponseOrBuilder.java new file mode 100644 index 00000000..48a98fb8 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface CreateResourceMappingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.CreateResourceMappingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + boolean hasResourceMapping(); + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + io.opentdf.platform.policy.ResourceMapping getResourceMapping(); + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequest.java new file mode 100644 index 00000000..72094ff5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.DeleteResourceMappingRequest} + */ +public final class DeleteResourceMappingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.DeleteResourceMappingRequest) + DeleteResourceMappingRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteResourceMappingRequest.newBuilder() to construct. + private DeleteResourceMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteResourceMappingRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteResourceMappingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest other = (io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.DeleteResourceMappingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.DeleteResourceMappingRequest) + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest build() { + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest buildPartial() { + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest result = new io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest other) { + if (other == io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.DeleteResourceMappingRequest) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.DeleteResourceMappingRequest) + private static final io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest(); + } + + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteResourceMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequestOrBuilder.java new file mode 100644 index 00000000..5534d378 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface DeleteResourceMappingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.DeleteResourceMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponse.java new file mode 100644 index 00000000..452bdbdf --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.DeleteResourceMappingResponse} + */ +public final class DeleteResourceMappingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.DeleteResourceMappingResponse) + DeleteResourceMappingResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteResourceMappingResponse.newBuilder() to construct. + private DeleteResourceMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteResourceMappingResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteResourceMappingResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.Builder.class); + } + + private int bitField0_; + public static final int RESOURCE_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.ResourceMapping resourceMapping_; + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + @java.lang.Override + public boolean hasResourceMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getResourceMapping()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getResourceMapping()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse other = (io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse) obj; + + if (hasResourceMapping() != other.hasResourceMapping()) return false; + if (hasResourceMapping()) { + if (!getResourceMapping() + .equals(other.getResourceMapping())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasResourceMapping()) { + hash = (37 * hash) + RESOURCE_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getResourceMapping().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.DeleteResourceMappingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.DeleteResourceMappingResponse) + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResourceMappingFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceMapping_ = null; + if (resourceMappingBuilder_ != null) { + resourceMappingBuilder_.dispose(); + resourceMappingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse build() { + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse buildPartial() { + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse result = new io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceMapping_ = resourceMappingBuilder_ == null + ? resourceMapping_ + : resourceMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse other) { + if (other == io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.getDefaultInstance()) return this; + if (other.hasResourceMapping()) { + mergeResourceMapping(other.getResourceMapping()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getResourceMappingFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.ResourceMapping resourceMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingBuilder_; + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + public boolean hasResourceMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { + if (resourceMappingBuilder_ == null) { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } else { + return resourceMappingBuilder_.getMessage(); + } + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder setResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceMapping_ = value; + } else { + resourceMappingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder setResourceMapping( + io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { + if (resourceMappingBuilder_ == null) { + resourceMapping_ = builderForValue.build(); + } else { + resourceMappingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder mergeResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + resourceMapping_ != null && + resourceMapping_ != io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) { + getResourceMappingBuilder().mergeFrom(value); + } else { + resourceMapping_ = value; + } + } else { + resourceMappingBuilder_.mergeFrom(value); + } + if (resourceMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder clearResourceMapping() { + bitField0_ = (bitField0_ & ~0x00000001); + resourceMapping_ = null; + if (resourceMappingBuilder_ != null) { + resourceMappingBuilder_.dispose(); + resourceMappingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getResourceMappingFieldBuilder().getBuilder(); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { + if (resourceMappingBuilder_ != null) { + return resourceMappingBuilder_.getMessageOrBuilder(); + } else { + return resourceMapping_ == null ? + io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> + getResourceMappingFieldBuilder() { + if (resourceMappingBuilder_ == null) { + resourceMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( + getResourceMapping(), + getParentForChildren(), + isClean()); + resourceMapping_ = null; + } + return resourceMappingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.DeleteResourceMappingResponse) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.DeleteResourceMappingResponse) + private static final io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse(); + } + + public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteResourceMappingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponseOrBuilder.java new file mode 100644 index 00000000..e2c24617 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface DeleteResourceMappingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.DeleteResourceMappingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + boolean hasResourceMapping(); + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + io.opentdf.platform.policy.ResourceMapping getResourceMapping(); + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequest.java new file mode 100644 index 00000000..4bff27c8 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.GetResourceMappingRequest} + */ +public final class GetResourceMappingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.GetResourceMappingRequest) + GetResourceMappingRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetResourceMappingRequest.newBuilder() to construct. + private GetResourceMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetResourceMappingRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetResourceMappingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest other = (io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.GetResourceMappingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.GetResourceMappingRequest) + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest build() { + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest buildPartial() { + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest result = new io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest other) { + if (other == io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.GetResourceMappingRequest) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.GetResourceMappingRequest) + private static final io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest(); + } + + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetResourceMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequestOrBuilder.java new file mode 100644 index 00000000..4108468f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface GetResourceMappingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.GetResourceMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponse.java new file mode 100644 index 00000000..7833c469 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.GetResourceMappingResponse} + */ +public final class GetResourceMappingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.GetResourceMappingResponse) + GetResourceMappingResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetResourceMappingResponse.newBuilder() to construct. + private GetResourceMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetResourceMappingResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetResourceMappingResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.Builder.class); + } + + private int bitField0_; + public static final int RESOURCE_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.ResourceMapping resourceMapping_; + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + @java.lang.Override + public boolean hasResourceMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getResourceMapping()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getResourceMapping()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse other = (io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse) obj; + + if (hasResourceMapping() != other.hasResourceMapping()) return false; + if (hasResourceMapping()) { + if (!getResourceMapping() + .equals(other.getResourceMapping())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasResourceMapping()) { + hash = (37 * hash) + RESOURCE_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getResourceMapping().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.GetResourceMappingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.GetResourceMappingResponse) + io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResourceMappingFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceMapping_ = null; + if (resourceMappingBuilder_ != null) { + resourceMappingBuilder_.dispose(); + resourceMappingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse build() { + io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse buildPartial() { + io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse result = new io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceMapping_ = resourceMappingBuilder_ == null + ? resourceMapping_ + : resourceMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse other) { + if (other == io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.getDefaultInstance()) return this; + if (other.hasResourceMapping()) { + mergeResourceMapping(other.getResourceMapping()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getResourceMappingFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.ResourceMapping resourceMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingBuilder_; + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + public boolean hasResourceMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { + if (resourceMappingBuilder_ == null) { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } else { + return resourceMappingBuilder_.getMessage(); + } + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder setResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceMapping_ = value; + } else { + resourceMappingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder setResourceMapping( + io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { + if (resourceMappingBuilder_ == null) { + resourceMapping_ = builderForValue.build(); + } else { + resourceMappingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder mergeResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + resourceMapping_ != null && + resourceMapping_ != io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) { + getResourceMappingBuilder().mergeFrom(value); + } else { + resourceMapping_ = value; + } + } else { + resourceMappingBuilder_.mergeFrom(value); + } + if (resourceMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder clearResourceMapping() { + bitField0_ = (bitField0_ & ~0x00000001); + resourceMapping_ = null; + if (resourceMappingBuilder_ != null) { + resourceMappingBuilder_.dispose(); + resourceMappingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getResourceMappingFieldBuilder().getBuilder(); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { + if (resourceMappingBuilder_ != null) { + return resourceMappingBuilder_.getMessageOrBuilder(); + } else { + return resourceMapping_ == null ? + io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> + getResourceMappingFieldBuilder() { + if (resourceMappingBuilder_ == null) { + resourceMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( + getResourceMapping(), + getParentForChildren(), + isClean()); + resourceMapping_ = null; + } + return resourceMappingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.GetResourceMappingResponse) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.GetResourceMappingResponse) + private static final io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse(); + } + + public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetResourceMappingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponseOrBuilder.java new file mode 100644 index 00000000..bcd8e324 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface GetResourceMappingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.GetResourceMappingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + boolean hasResourceMapping(); + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + io.opentdf.platform.policy.ResourceMapping getResourceMapping(); + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequest.java new file mode 100644 index 00000000..6e1c10c1 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequest.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.ListResourceMappingsRequest} + */ +public final class ListResourceMappingsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.ListResourceMappingsRequest) + ListResourceMappingsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListResourceMappingsRequest.newBuilder() to construct. + private ListResourceMappingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListResourceMappingsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListResourceMappingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.class, io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest other = (io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.ListResourceMappingsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.ListResourceMappingsRequest) + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.class, io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest build() { + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest buildPartial() { + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest result = new io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest other) { + if (other == io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.ListResourceMappingsRequest) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.ListResourceMappingsRequest) + private static final io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest(); + } + + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListResourceMappingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequestOrBuilder.java new file mode 100644 index 00000000..de7c470a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequestOrBuilder.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface ListResourceMappingsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.ListResourceMappingsRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponse.java new file mode 100644 index 00000000..bc85a9c0 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.ListResourceMappingsResponse} + */ +public final class ListResourceMappingsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.ListResourceMappingsResponse) + ListResourceMappingsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListResourceMappingsResponse.newBuilder() to construct. + private ListResourceMappingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListResourceMappingsResponse() { + resourceMappings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListResourceMappingsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.class, io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.Builder.class); + } + + public static final int RESOURCE_MAPPINGS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List resourceMappings_; + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + @java.lang.Override + public java.util.List getResourceMappingsList() { + return resourceMappings_; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + @java.lang.Override + public java.util.List + getResourceMappingsOrBuilderList() { + return resourceMappings_; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + @java.lang.Override + public int getResourceMappingsCount() { + return resourceMappings_.size(); + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping getResourceMappings(int index) { + return resourceMappings_.get(index); + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingsOrBuilder( + int index) { + return resourceMappings_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < resourceMappings_.size(); i++) { + output.writeMessage(1, resourceMappings_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resourceMappings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, resourceMappings_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse other = (io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse) obj; + + if (!getResourceMappingsList() + .equals(other.getResourceMappingsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourceMappingsCount() > 0) { + hash = (37 * hash) + RESOURCE_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getResourceMappingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.ListResourceMappingsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.ListResourceMappingsResponse) + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.class, io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resourceMappingsBuilder_ == null) { + resourceMappings_ = java.util.Collections.emptyList(); + } else { + resourceMappings_ = null; + resourceMappingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse build() { + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse buildPartial() { + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse result = new io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse result) { + if (resourceMappingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceMappings_ = java.util.Collections.unmodifiableList(resourceMappings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceMappings_ = resourceMappings_; + } else { + result.resourceMappings_ = resourceMappingsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse other) { + if (other == io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.getDefaultInstance()) return this; + if (resourceMappingsBuilder_ == null) { + if (!other.resourceMappings_.isEmpty()) { + if (resourceMappings_.isEmpty()) { + resourceMappings_ = other.resourceMappings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceMappingsIsMutable(); + resourceMappings_.addAll(other.resourceMappings_); + } + onChanged(); + } + } else { + if (!other.resourceMappings_.isEmpty()) { + if (resourceMappingsBuilder_.isEmpty()) { + resourceMappingsBuilder_.dispose(); + resourceMappingsBuilder_ = null; + resourceMappings_ = other.resourceMappings_; + bitField0_ = (bitField0_ & ~0x00000001); + resourceMappingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResourceMappingsFieldBuilder() : null; + } else { + resourceMappingsBuilder_.addAllMessages(other.resourceMappings_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.ResourceMapping m = + input.readMessage( + io.opentdf.platform.policy.ResourceMapping.parser(), + extensionRegistry); + if (resourceMappingsBuilder_ == null) { + ensureResourceMappingsIsMutable(); + resourceMappings_.add(m); + } else { + resourceMappingsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List resourceMappings_ = + java.util.Collections.emptyList(); + private void ensureResourceMappingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceMappings_ = new java.util.ArrayList(resourceMappings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingsBuilder_; + + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public java.util.List getResourceMappingsList() { + if (resourceMappingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceMappings_); + } else { + return resourceMappingsBuilder_.getMessageList(); + } + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public int getResourceMappingsCount() { + if (resourceMappingsBuilder_ == null) { + return resourceMappings_.size(); + } else { + return resourceMappingsBuilder_.getCount(); + } + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public io.opentdf.platform.policy.ResourceMapping getResourceMappings(int index) { + if (resourceMappingsBuilder_ == null) { + return resourceMappings_.get(index); + } else { + return resourceMappingsBuilder_.getMessage(index); + } + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder setResourceMappings( + int index, io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceMappingsIsMutable(); + resourceMappings_.set(index, value); + onChanged(); + } else { + resourceMappingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder setResourceMappings( + int index, io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { + if (resourceMappingsBuilder_ == null) { + ensureResourceMappingsIsMutable(); + resourceMappings_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceMappingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder addResourceMappings(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceMappingsIsMutable(); + resourceMappings_.add(value); + onChanged(); + } else { + resourceMappingsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder addResourceMappings( + int index, io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceMappingsIsMutable(); + resourceMappings_.add(index, value); + onChanged(); + } else { + resourceMappingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder addResourceMappings( + io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { + if (resourceMappingsBuilder_ == null) { + ensureResourceMappingsIsMutable(); + resourceMappings_.add(builderForValue.build()); + onChanged(); + } else { + resourceMappingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder addResourceMappings( + int index, io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { + if (resourceMappingsBuilder_ == null) { + ensureResourceMappingsIsMutable(); + resourceMappings_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceMappingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder addAllResourceMappings( + java.lang.Iterable values) { + if (resourceMappingsBuilder_ == null) { + ensureResourceMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resourceMappings_); + onChanged(); + } else { + resourceMappingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder clearResourceMappings() { + if (resourceMappingsBuilder_ == null) { + resourceMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourceMappingsBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public Builder removeResourceMappings(int index) { + if (resourceMappingsBuilder_ == null) { + ensureResourceMappingsIsMutable(); + resourceMappings_.remove(index); + onChanged(); + } else { + resourceMappingsBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingsBuilder( + int index) { + return getResourceMappingsFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingsOrBuilder( + int index) { + if (resourceMappingsBuilder_ == null) { + return resourceMappings_.get(index); } else { + return resourceMappingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public java.util.List + getResourceMappingsOrBuilderList() { + if (resourceMappingsBuilder_ != null) { + return resourceMappingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceMappings_); + } + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public io.opentdf.platform.policy.ResourceMapping.Builder addResourceMappingsBuilder() { + return getResourceMappingsFieldBuilder().addBuilder( + io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()); + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public io.opentdf.platform.policy.ResourceMapping.Builder addResourceMappingsBuilder( + int index) { + return getResourceMappingsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()); + } + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + public java.util.List + getResourceMappingsBuilderList() { + return getResourceMappingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> + getResourceMappingsFieldBuilder() { + if (resourceMappingsBuilder_ == null) { + resourceMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( + resourceMappings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + resourceMappings_ = null; + } + return resourceMappingsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.ListResourceMappingsResponse) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.ListResourceMappingsResponse) + private static final io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse(); + } + + public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListResourceMappingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponseOrBuilder.java new file mode 100644 index 00000000..9a5ef92e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface ListResourceMappingsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.ListResourceMappingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + java.util.List + getResourceMappingsList(); + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + io.opentdf.platform.policy.ResourceMapping getResourceMappings(int index); + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + int getResourceMappingsCount(); + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + java.util.List + getResourceMappingsOrBuilderList(); + /** + * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; + */ + io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingsOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingProto.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingProto.java new file mode 100644 index 00000000..86d7e8a3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingProto.java @@ -0,0 +1,217 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public final class ResourceMappingProto { + private ResourceMappingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_ListResourceMappingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_ListResourceMappingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_GetResourceMappingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_GetResourceMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_CreateResourceMappingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_CreateResourceMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_UpdateResourceMappingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_UpdateResourceMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_DeleteResourceMappingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_resourcemapping_DeleteResourceMappingResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n-policy/resourcemapping/resource_mappin" + + "g.proto\022\026policy.resourcemapping\032\033buf/val" + + "idate/validate.proto\032\034google/api/annotat" + + "ions.proto\032\023common/common.proto\032\024policy/" + + "objects.proto\"\035\n\033ListResourceMappingsReq" + + "uest\"d\n\034ListResourceMappingsResponse\022D\n\021" + + "resource_mappings\030\001 \003(\0132\027.policy.Resourc" + + "eMappingR\020resourceMappings\"3\n\031GetResourc" + + "eMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"" + + "`\n\032GetResourceMappingResponse\022B\n\020resourc" + + "e_mapping\030\001 \001(\0132\027.policy.ResourceMapping" + + "R\017resourceMapping\"\247\001\n\034CreateResourceMapp" + + "ingRequest\0224\n\022attribute_value_id\030\001 \001(\tB\006" + + "\272H\003\310\001\001R\020attributeValueId\022\034\n\005terms\030\002 \003(\tB" + + "\006\272H\003\310\001\001R\005terms\0223\n\010metadata\030d \001(\0132\027.commo" + + "n.MetadataMutableR\010metadata\"c\n\035CreateRes" + + "ourceMappingResponse\022B\n\020resource_mapping" + + "\030\001 \001(\0132\027.policy.ResourceMappingR\017resourc" + + "eMapping\"\205\002\n\034UpdateResourceMappingReques" + + "t\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022,\n\022attribute_v" + + "alue_id\030\004 \001(\tR\020attributeValueId\022\024\n\005terms" + + "\030\005 \003(\tR\005terms\0223\n\010metadata\030d \001(\0132\027.common" + + ".MetadataMutableR\010metadata\022T\n\030metadata_u" + + "pdate_behavior\030e \001(\0162\032.common.MetadataUp" + + "dateEnumR\026metadataUpdateBehavior\"c\n\035Upda" + + "teResourceMappingResponse\022B\n\020resource_ma" + + "pping\030\001 \001(\0132\027.policy.ResourceMappingR\017re" + + "sourceMapping\"6\n\034DeleteResourceMappingRe" + + "quest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"c\n\035DeleteR" + + "esourceMappingResponse\022B\n\020resource_mappi" + + "ng\030\001 \001(\0132\027.policy.ResourceMappingR\017resou" + + "rceMapping2\320\006\n\026ResourceMappingService\022\235\001" + + "\n\024ListResourceMappings\0223.policy.resource" + + "mapping.ListResourceMappingsRequest\0324.po" + + "licy.resourcemapping.ListResourceMapping" + + "sResponse\"\032\202\323\344\223\002\024\022\022/resource-mappings\022\234\001" + + "\n\022GetResourceMapping\0221.policy.resourcema" + + "pping.GetResourceMappingRequest\0322.policy" + + ".resourcemapping.GetResourceMappingRespo" + + "nse\"\037\202\323\344\223\002\031\022\027/resource-mappings/{id}\022\243\001\n" + + "\025CreateResourceMapping\0224.policy.resource" + + "mapping.CreateResourceMappingRequest\0325.p" + + "olicy.resourcemapping.CreateResourceMapp" + + "ingResponse\"\035\202\323\344\223\002\027\"\022/resource-mappings:" + + "\001*\022\250\001\n\025UpdateResourceMapping\0224.policy.re" + + "sourcemapping.UpdateResourceMappingReque" + + "st\0325.policy.resourcemapping.UpdateResour" + + "ceMappingResponse\"\"\202\323\344\223\002\034\"\027/resource-map" + + "pings/{id}:\001*\022\245\001\n\025DeleteResourceMapping\022" + + "4.policy.resourcemapping.DeleteResourceM" + + "appingRequest\0325.policy.resourcemapping.D" + + "eleteResourceMappingResponse\"\037\202\323\344\223\002\031*\027/r" + + "esource-mappings/{id}B\273\001\n*io.opentdf.pla" + + "tform.policy.resourcemappingB\024ResourceMa" + + "ppingProtoP\001\242\002\003PRX\252\002\026Policy.Resourcemapp" + + "ing\312\002\026Policy\\Resourcemapping\342\002\"Policy\\Re" + + "sourcemapping\\GPBMetadata\352\002\027Policy::Reso" + + "urcemappingb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + build.buf.validate.ValidateProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + io.opentdf.platform.common.CommonProto.getDescriptor(), + io.opentdf.platform.policy.ObjectsProto.getDescriptor(), + }); + internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_policy_resourcemapping_ListResourceMappingsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor, + new java.lang.String[] { }); + internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_policy_resourcemapping_ListResourceMappingsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor, + new java.lang.String[] { "ResourceMappings", }); + internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_policy_resourcemapping_GetResourceMappingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_policy_resourcemapping_GetResourceMappingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor, + new java.lang.String[] { "ResourceMapping", }); + internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_policy_resourcemapping_CreateResourceMappingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor, + new java.lang.String[] { "AttributeValueId", "Terms", "Metadata", }); + internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_policy_resourcemapping_CreateResourceMappingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor, + new java.lang.String[] { "ResourceMapping", }); + internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_policy_resourcemapping_UpdateResourceMappingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor, + new java.lang.String[] { "Id", "AttributeValueId", "Terms", "Metadata", "MetadataUpdateBehavior", }); + internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_policy_resourcemapping_UpdateResourceMappingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor, + new java.lang.String[] { "ResourceMapping", }); + internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_policy_resourcemapping_DeleteResourceMappingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_policy_resourcemapping_DeleteResourceMappingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor, + new java.lang.String[] { "ResourceMapping", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(build.buf.validate.ValidateProto.field); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + build.buf.validate.ValidateProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + io.opentdf.platform.common.CommonProto.getDescriptor(); + io.opentdf.platform.policy.ObjectsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingServiceGrpc.java new file mode 100644 index 00000000..5fed62e1 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingServiceGrpc.java @@ -0,0 +1,1363 @@ +package io.opentdf.platform.policy.resourcemapping; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ *Resource Mappings
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.61.1)", + comments = "Source: policy/resourcemapping/resource_mapping.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ResourceMappingServiceGrpc { + + private ResourceMappingServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "policy.resourcemapping.ResourceMappingService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListResourceMappingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListResourceMappings", + requestType = io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.class, + responseType = io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListResourceMappingsMethod() { + io.grpc.MethodDescriptor getListResourceMappingsMethod; + if ((getListResourceMappingsMethod = ResourceMappingServiceGrpc.getListResourceMappingsMethod) == null) { + synchronized (ResourceMappingServiceGrpc.class) { + if ((getListResourceMappingsMethod = ResourceMappingServiceGrpc.getListResourceMappingsMethod) == null) { + ResourceMappingServiceGrpc.getListResourceMappingsMethod = getListResourceMappingsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListResourceMappings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("ListResourceMappings")) + .build(); + } + } + } + return getListResourceMappingsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetResourceMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetResourceMapping", + requestType = io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.class, + responseType = io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetResourceMappingMethod() { + io.grpc.MethodDescriptor getGetResourceMappingMethod; + if ((getGetResourceMappingMethod = ResourceMappingServiceGrpc.getGetResourceMappingMethod) == null) { + synchronized (ResourceMappingServiceGrpc.class) { + if ((getGetResourceMappingMethod = ResourceMappingServiceGrpc.getGetResourceMappingMethod) == null) { + ResourceMappingServiceGrpc.getGetResourceMappingMethod = getGetResourceMappingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetResourceMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.getDefaultInstance())) + .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("GetResourceMapping")) + .build(); + } + } + } + return getGetResourceMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateResourceMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateResourceMapping", + requestType = io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.class, + responseType = io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateResourceMappingMethod() { + io.grpc.MethodDescriptor getCreateResourceMappingMethod; + if ((getCreateResourceMappingMethod = ResourceMappingServiceGrpc.getCreateResourceMappingMethod) == null) { + synchronized (ResourceMappingServiceGrpc.class) { + if ((getCreateResourceMappingMethod = ResourceMappingServiceGrpc.getCreateResourceMappingMethod) == null) { + ResourceMappingServiceGrpc.getCreateResourceMappingMethod = getCreateResourceMappingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateResourceMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.getDefaultInstance())) + .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("CreateResourceMapping")) + .build(); + } + } + } + return getCreateResourceMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateResourceMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateResourceMapping", + requestType = io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.class, + responseType = io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateResourceMappingMethod() { + io.grpc.MethodDescriptor getUpdateResourceMappingMethod; + if ((getUpdateResourceMappingMethod = ResourceMappingServiceGrpc.getUpdateResourceMappingMethod) == null) { + synchronized (ResourceMappingServiceGrpc.class) { + if ((getUpdateResourceMappingMethod = ResourceMappingServiceGrpc.getUpdateResourceMappingMethod) == null) { + ResourceMappingServiceGrpc.getUpdateResourceMappingMethod = getUpdateResourceMappingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateResourceMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.getDefaultInstance())) + .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("UpdateResourceMapping")) + .build(); + } + } + } + return getUpdateResourceMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteResourceMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteResourceMapping", + requestType = io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.class, + responseType = io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteResourceMappingMethod() { + io.grpc.MethodDescriptor getDeleteResourceMappingMethod; + if ((getDeleteResourceMappingMethod = ResourceMappingServiceGrpc.getDeleteResourceMappingMethod) == null) { + synchronized (ResourceMappingServiceGrpc.class) { + if ((getDeleteResourceMappingMethod = ResourceMappingServiceGrpc.getDeleteResourceMappingMethod) == null) { + ResourceMappingServiceGrpc.getDeleteResourceMappingMethod = getDeleteResourceMappingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteResourceMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.getDefaultInstance())) + .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("DeleteResourceMapping")) + .build(); + } + } + } + return getDeleteResourceMappingMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ResourceMappingServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ResourceMappingServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ResourceMappingServiceStub(channel, callOptions); + } + }; + return ResourceMappingServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ResourceMappingServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ResourceMappingServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ResourceMappingServiceBlockingStub(channel, callOptions); + } + }; + return ResourceMappingServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ResourceMappingServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ResourceMappingServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ResourceMappingServiceFutureStub(channel, callOptions); + } + }; + return ResourceMappingServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   *Resource Mappings
+   * 
+ */ + public interface AsyncService { + + /** + *
+     *Request Example:
+     *- empty body
+     *Response Example:
+     *{
+     *"resource_mappings": [
+     *{
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *]
+     *}
+     * 
+ */ + default void listResourceMappings(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListResourceMappingsMethod(), responseObserver); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + default void getResourceMapping(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetResourceMappingMethod(), responseObserver); + } + + /** + *
+     *Request Example:
+     *{
+     *"resource_mapping": {
+     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *]
+     *}
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + default void createResourceMapping(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateResourceMappingMethod(), responseObserver); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"resource_mapping": {
+     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *"NEWTERM"
+     *]
+     *}
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + default void updateResourceMapping(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateResourceMappingMethod(), responseObserver); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + default void deleteResourceMapping(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteResourceMappingMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service ResourceMappingService. + *
+   *Resource Mappings
+   * 
+ */ + public static abstract class ResourceMappingServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return ResourceMappingServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service ResourceMappingService. + *
+   *Resource Mappings
+   * 
+ */ + public static final class ResourceMappingServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ResourceMappingServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ResourceMappingServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ResourceMappingServiceStub(channel, callOptions); + } + + /** + *
+     *Request Example:
+     *- empty body
+     *Response Example:
+     *{
+     *"resource_mappings": [
+     *{
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *]
+     *}
+     * 
+ */ + public void listResourceMappings(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListResourceMappingsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public void getResourceMapping(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetResourceMappingMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     *Request Example:
+     *{
+     *"resource_mapping": {
+     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *]
+     *}
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public void createResourceMapping(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateResourceMappingMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"resource_mapping": {
+     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *"NEWTERM"
+     *]
+     *}
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public void updateResourceMapping(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateResourceMappingMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public void deleteResourceMapping(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteResourceMappingMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service ResourceMappingService. + *
+   *Resource Mappings
+   * 
+ */ + public static final class ResourceMappingServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ResourceMappingServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ResourceMappingServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ResourceMappingServiceBlockingStub(channel, callOptions); + } + + /** + *
+     *Request Example:
+     *- empty body
+     *Response Example:
+     *{
+     *"resource_mappings": [
+     *{
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *]
+     *}
+     * 
+ */ + public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse listResourceMappings(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListResourceMappingsMethod(), getCallOptions(), request); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse getResourceMapping(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetResourceMappingMethod(), getCallOptions(), request); + } + + /** + *
+     *Request Example:
+     *{
+     *"resource_mapping": {
+     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *]
+     *}
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse createResourceMapping(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateResourceMappingMethod(), getCallOptions(), request); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"resource_mapping": {
+     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *"NEWTERM"
+     *]
+     *}
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse updateResourceMapping(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateResourceMappingMethod(), getCallOptions(), request); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse deleteResourceMapping(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteResourceMappingMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ResourceMappingService. + *
+   *Resource Mappings
+   * 
+ */ + public static final class ResourceMappingServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ResourceMappingServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ResourceMappingServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ResourceMappingServiceFutureStub(channel, callOptions); + } + + /** + *
+     *Request Example:
+     *- empty body
+     *Response Example:
+     *{
+     *"resource_mappings": [
+     *{
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *]
+     *}
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listResourceMappings( + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListResourceMappingsMethod(), getCallOptions()), request); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getResourceMapping( + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetResourceMappingMethod(), getCallOptions()), request); + } + + /** + *
+     *Request Example:
+     *{
+     *"resource_mapping": {
+     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *]
+     *}
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createResourceMapping( + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateResourceMappingMethod(), getCallOptions()), request); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"resource_mapping": {
+     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *"NEWTERM"
+     *]
+     *}
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateResourceMapping( + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateResourceMappingMethod(), getCallOptions()), request); + } + + /** + *
+     *Request Example:
+     *{
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
+     *}
+     *Response Example:
+     *{
+     *"resource_mapping": {
+     *"terms": [
+     *"TOPSECRET",
+     *"TS",
+     *],
+     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
+     *"metadata": {
+     *"labels": [],
+     *"created_at": {
+     *"seconds": "1706103276",
+     *"nanos": 510718000
+     *},
+     *"updated_at": {
+     *"seconds": "1706107873",
+     *"nanos": 399786000
+     *},
+     *"description": ""
+     *},
+     *"attribute_value": {
+     *"members": [],
+     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
+     *"metadata": null,
+     *"attribute_id": "",
+     *"value": "value1"
+     *}
+     *}
+     *}
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteResourceMapping( + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteResourceMappingMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_RESOURCE_MAPPINGS = 0; + private static final int METHODID_GET_RESOURCE_MAPPING = 1; + private static final int METHODID_CREATE_RESOURCE_MAPPING = 2; + private static final int METHODID_UPDATE_RESOURCE_MAPPING = 3; + private static final int METHODID_DELETE_RESOURCE_MAPPING = 4; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_RESOURCE_MAPPINGS: + serviceImpl.listResourceMappings((io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RESOURCE_MAPPING: + serviceImpl.getResourceMapping((io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_RESOURCE_MAPPING: + serviceImpl.createResourceMapping((io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_RESOURCE_MAPPING: + serviceImpl.updateResourceMapping((io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_RESOURCE_MAPPING: + serviceImpl.deleteResourceMapping((io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListResourceMappingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest, + io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse>( + service, METHODID_LIST_RESOURCE_MAPPINGS))) + .addMethod( + getGetResourceMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest, + io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse>( + service, METHODID_GET_RESOURCE_MAPPING))) + .addMethod( + getCreateResourceMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest, + io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse>( + service, METHODID_CREATE_RESOURCE_MAPPING))) + .addMethod( + getUpdateResourceMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest, + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse>( + service, METHODID_UPDATE_RESOURCE_MAPPING))) + .addMethod( + getDeleteResourceMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest, + io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse>( + service, METHODID_DELETE_RESOURCE_MAPPING))) + .build(); + } + + private static abstract class ResourceMappingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ResourceMappingServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ResourceMappingService"); + } + } + + private static final class ResourceMappingServiceFileDescriptorSupplier + extends ResourceMappingServiceBaseDescriptorSupplier { + ResourceMappingServiceFileDescriptorSupplier() {} + } + + private static final class ResourceMappingServiceMethodDescriptorSupplier + extends ResourceMappingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ResourceMappingServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ResourceMappingServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ResourceMappingServiceFileDescriptorSupplier()) + .addMethod(getListResourceMappingsMethod()) + .addMethod(getGetResourceMappingMethod()) + .addMethod(getCreateResourceMappingMethod()) + .addMethod(getUpdateResourceMappingMethod()) + .addMethod(getDeleteResourceMappingMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequest.java new file mode 100644 index 00000000..24e9eea0 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequest.java @@ -0,0 +1,1258 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.UpdateResourceMappingRequest} + */ +public final class UpdateResourceMappingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.UpdateResourceMappingRequest) + UpdateResourceMappingRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateResourceMappingRequest.newBuilder() to construct. + private UpdateResourceMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateResourceMappingRequest() { + id_ = ""; + attributeValueId_ = ""; + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + metadataUpdateBehavior_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateResourceMappingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object attributeValueId_ = ""; + /** + *
+   * Optional
+   * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @return The attributeValueId. + */ + @java.lang.Override + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValueId_ = s; + return s; + } + } + /** + *
+   * Optional
+   * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @return The bytes for attributeValueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERMS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string terms = 5 [json_name = "terms"]; + * @return A list containing the terms. + */ + public com.google.protobuf.ProtocolStringList + getTermsList() { + return terms_; + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @return The count of terms. + */ + public int getTermsCount() { + return terms_.size(); + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param index The index of the element to return. + * @return The terms at the given index. + */ + public java.lang.String getTerms(int index) { + return terms_.get(index); + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + public com.google.protobuf.ByteString + getTermsBytes(int index) { + return terms_.getByteString(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Common Metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Common Metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Common Metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, attributeValueId_); + } + for (int i = 0; i < terms_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, terms_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, attributeValueId_); + } + { + int dataSize = 0; + for (int i = 0; i < terms_.size(); i++) { + dataSize += computeStringSizeNoTag(terms_.getRaw(i)); + } + size += dataSize; + size += 1 * getTermsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(101, metadataUpdateBehavior_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest other = (io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getAttributeValueId() + .equals(other.getAttributeValueId())) return false; + if (!getTermsList() + .equals(other.getTermsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValueId().hashCode(); + if (getTermsCount() > 0) { + hash = (37 * hash) + TERMS_FIELD_NUMBER; + hash = (53 * hash) + getTermsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.UpdateResourceMappingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.UpdateResourceMappingRequest) + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + attributeValueId_ = ""; + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest build() { + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest buildPartial() { + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest result = new io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributeValueId_ = attributeValueId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + terms_.makeImmutable(); + result.terms_ = terms_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest other) { + if (other == io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAttributeValueId().isEmpty()) { + attributeValueId_ = other.attributeValueId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.terms_.isEmpty()) { + if (terms_.isEmpty()) { + terms_ = other.terms_; + bitField0_ |= 0x00000004; + } else { + ensureTermsIsMutable(); + terms_.addAll(other.terms_); + } + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 34: { + attributeValueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTermsIsMutable(); + terms_.add(s); + break; + } // case 42 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 808 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object attributeValueId_ = ""; + /** + *
+     * Optional
+     * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @return The attributeValueId. + */ + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional
+     * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @return The bytes for attributeValueId. + */ + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional
+     * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @param value The attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attributeValueId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @return This builder for chaining. + */ + public Builder clearAttributeValueId() { + attributeValueId_ = getDefaultInstance().getAttributeValueId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @param value The bytes for attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attributeValueId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureTermsIsMutable() { + if (!terms_.isModifiable()) { + terms_ = new com.google.protobuf.LazyStringArrayList(terms_); + } + bitField0_ |= 0x00000004; + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @return A list containing the terms. + */ + public com.google.protobuf.ProtocolStringList + getTermsList() { + terms_.makeImmutable(); + return terms_; + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @return The count of terms. + */ + public int getTermsCount() { + return terms_.size(); + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param index The index of the element to return. + * @return The terms at the given index. + */ + public java.lang.String getTerms(int index) { + return terms_.get(index); + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + public com.google.protobuf.ByteString + getTermsBytes(int index) { + return terms_.getByteString(index); + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param index The index to set the value at. + * @param value The terms to set. + * @return This builder for chaining. + */ + public Builder setTerms( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTermsIsMutable(); + terms_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param value The terms to add. + * @return This builder for chaining. + */ + public Builder addTerms( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTermsIsMutable(); + terms_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param values The terms to add. + * @return This builder for chaining. + */ + public Builder addAllTerms( + java.lang.Iterable values) { + ensureTermsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, terms_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @return This builder for chaining. + */ + public Builder clearTerms() { + terms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004);; + onChanged(); + return this; + } + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param value The bytes of the terms to add. + * @return This builder for chaining. + */ + public Builder addTermsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureTermsIsMutable(); + terms_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common Metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000010); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.UpdateResourceMappingRequest) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.UpdateResourceMappingRequest) + private static final io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest(); + } + + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateResourceMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequestOrBuilder.java new file mode 100644 index 00000000..2a1a6ea2 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequestOrBuilder.java @@ -0,0 +1,113 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface UpdateResourceMappingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.UpdateResourceMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional
+   * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @return The attributeValueId. + */ + java.lang.String getAttributeValueId(); + /** + *
+   * Optional
+   * 
+ * + * string attribute_value_id = 4 [json_name = "attributeValueId"]; + * @return The bytes for attributeValueId. + */ + com.google.protobuf.ByteString + getAttributeValueIdBytes(); + + /** + * repeated string terms = 5 [json_name = "terms"]; + * @return A list containing the terms. + */ + java.util.List + getTermsList(); + /** + * repeated string terms = 5 [json_name = "terms"]; + * @return The count of terms. + */ + int getTermsCount(); + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param index The index of the element to return. + * @return The terms at the given index. + */ + java.lang.String getTerms(int index); + /** + * repeated string terms = 5 [json_name = "terms"]; + * @param index The index of the value to return. + * @return The bytes of the terms at the given index. + */ + com.google.protobuf.ByteString + getTermsBytes(int index); + + /** + *
+   * Common Metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common Metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Common Metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponse.java new file mode 100644 index 00000000..e008eff9 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +/** + * Protobuf type {@code policy.resourcemapping.UpdateResourceMappingResponse} + */ +public final class UpdateResourceMappingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.resourcemapping.UpdateResourceMappingResponse) + UpdateResourceMappingResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateResourceMappingResponse.newBuilder() to construct. + private UpdateResourceMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateResourceMappingResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateResourceMappingResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.Builder.class); + } + + private int bitField0_; + public static final int RESOURCE_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.ResourceMapping resourceMapping_; + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + @java.lang.Override + public boolean hasResourceMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getResourceMapping()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getResourceMapping()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse other = (io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse) obj; + + if (hasResourceMapping() != other.hasResourceMapping()) return false; + if (hasResourceMapping()) { + if (!getResourceMapping() + .equals(other.getResourceMapping())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasResourceMapping()) { + hash = (37 * hash) + RESOURCE_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getResourceMapping().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.resourcemapping.UpdateResourceMappingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.resourcemapping.UpdateResourceMappingResponse) + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResourceMappingFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceMapping_ = null; + if (resourceMappingBuilder_ != null) { + resourceMappingBuilder_.dispose(); + resourceMappingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse build() { + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse buildPartial() { + io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse result = new io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceMapping_ = resourceMappingBuilder_ == null + ? resourceMapping_ + : resourceMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse) { + return mergeFrom((io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse other) { + if (other == io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.getDefaultInstance()) return this; + if (other.hasResourceMapping()) { + mergeResourceMapping(other.getResourceMapping()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getResourceMappingFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.ResourceMapping resourceMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingBuilder_; + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + public boolean hasResourceMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { + if (resourceMappingBuilder_ == null) { + return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } else { + return resourceMappingBuilder_.getMessage(); + } + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder setResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceMapping_ = value; + } else { + resourceMappingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder setResourceMapping( + io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { + if (resourceMappingBuilder_ == null) { + resourceMapping_ = builderForValue.build(); + } else { + resourceMappingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder mergeResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { + if (resourceMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + resourceMapping_ != null && + resourceMapping_ != io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) { + getResourceMappingBuilder().mergeFrom(value); + } else { + resourceMapping_ = value; + } + } else { + resourceMappingBuilder_.mergeFrom(value); + } + if (resourceMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public Builder clearResourceMapping() { + bitField0_ = (bitField0_ & ~0x00000001); + resourceMapping_ = null; + if (resourceMappingBuilder_ != null) { + resourceMappingBuilder_.dispose(); + resourceMappingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getResourceMappingFieldBuilder().getBuilder(); + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { + if (resourceMappingBuilder_ != null) { + return resourceMappingBuilder_.getMessageOrBuilder(); + } else { + return resourceMapping_ == null ? + io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; + } + } + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> + getResourceMappingFieldBuilder() { + if (resourceMappingBuilder_ == null) { + resourceMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( + getResourceMapping(), + getParentForChildren(), + isClean()); + resourceMapping_ = null; + } + return resourceMappingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.resourcemapping.UpdateResourceMappingResponse) + } + + // @@protoc_insertion_point(class_scope:policy.resourcemapping.UpdateResourceMappingResponse) + private static final io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse(); + } + + public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateResourceMappingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponseOrBuilder.java new file mode 100644 index 00000000..42050b6f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/resourcemapping/resource_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.resourcemapping; + +public interface UpdateResourceMappingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.resourcemapping.UpdateResourceMappingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return Whether the resourceMapping field is set. + */ + boolean hasResourceMapping(); + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + * @return The resourceMapping. + */ + io.opentdf.platform.policy.ResourceMapping getResourceMapping(); + /** + * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; + */ + io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java new file mode 100644 index 00000000..96414f00 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.CreateSubjectConditionSetRequest} + */ +public final class CreateSubjectConditionSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectConditionSetRequest) + CreateSubjectConditionSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateSubjectConditionSetRequest.newBuilder() to construct. + private CreateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateSubjectConditionSetRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateSubjectConditionSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate subjectConditionSet_; + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectConditionSet()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectConditionSet()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.CreateSubjectConditionSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectConditionSetRequest) + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest build() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectConditionSetRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectConditionSetRequest) + private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubjectConditionSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java new file mode 100644 index 00000000..cc271966 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface CreateSubjectConditionSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectConditionSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java new file mode 100644 index 00000000..65fef415 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.CreateSubjectConditionSetResponse} + */ +public final class CreateSubjectConditionSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectConditionSetResponse) + CreateSubjectConditionSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateSubjectConditionSetResponse.newBuilder() to construct. + private CreateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateSubjectConditionSetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateSubjectConditionSetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectConditionSet()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectConditionSet()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.CreateSubjectConditionSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectConditionSetResponse) + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse build() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectConditionSetResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectConditionSetResponse) + private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubjectConditionSetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java new file mode 100644 index 00000000..72b28076 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface CreateSubjectConditionSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectConditionSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java new file mode 100644 index 00000000..e95512a0 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java @@ -0,0 +1,1669 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.CreateSubjectMappingRequest} + */ +public final class CreateSubjectMappingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectMappingRequest) + CreateSubjectMappingRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateSubjectMappingRequest.newBuilder() to construct. + private CreateSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateSubjectMappingRequest() { + attributeValueId_ = ""; + actions_ = java.util.Collections.emptyList(); + existingSubjectConditionSetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateSubjectMappingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object attributeValueId_ = ""; + /** + *
+   * Required
+   * Attribute Value to be mapped to
+   * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + @java.lang.Override + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValueId_ = s; + return s; + } + } + /** + *
+   * Required
+   * Attribute Value to be mapped to
+   * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIONS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List actions_; + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.Action getActions(int index) { + return actions_.get(index); + } + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(index); + } + + public static final int EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object existingSubjectConditionSetId_ = ""; + /** + *
+   * Either of the following:
+   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+   * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. + */ + @java.lang.Override + public java.lang.String getExistingSubjectConditionSetId() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + existingSubjectConditionSetId_ = s; + return s; + } + } + /** + *
+   * Either of the following:
+   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+   * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExistingSubjectConditionSetIdBytes() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + existingSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER = 4; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; + /** + *
+   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+   * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasNewSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+   * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } + /** + *
+   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+   * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeValueId_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(2, actions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingSubjectConditionSetId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getNewSubjectConditionSet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeValueId_); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, actions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, existingSubjectConditionSetId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getNewSubjectConditionSet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest) obj; + + if (!getAttributeValueId() + .equals(other.getAttributeValueId())) return false; + if (!getActionsList() + .equals(other.getActionsList())) return false; + if (!getExistingSubjectConditionSetId() + .equals(other.getExistingSubjectConditionSetId())) return false; + if (hasNewSubjectConditionSet() != other.hasNewSubjectConditionSet()) return false; + if (hasNewSubjectConditionSet()) { + if (!getNewSubjectConditionSet() + .equals(other.getNewSubjectConditionSet())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValueId().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + hash = (37 * hash) + EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getExistingSubjectConditionSetId().hashCode(); + if (hasNewSubjectConditionSet()) { + hash = (37 * hash) + NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getNewSubjectConditionSet().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.CreateSubjectMappingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectMappingRequest) + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getActionsFieldBuilder(); + getNewSubjectConditionSetFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeValueId_ = ""; + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + existingSubjectConditionSetId_ = ""; + newSubjectConditionSet_ = null; + if (newSubjectConditionSetBuilder_ != null) { + newSubjectConditionSetBuilder_.dispose(); + newSubjectConditionSetBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest build() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeValueId_ = attributeValueId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.existingSubjectConditionSetId_ = existingSubjectConditionSetId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.newSubjectConditionSet_ = newSubjectConditionSetBuilder_ == null + ? newSubjectConditionSet_ + : newSubjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.getDefaultInstance()) return this; + if (!other.getAttributeValueId().isEmpty()) { + attributeValueId_ = other.attributeValueId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000002); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionsFieldBuilder() : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + if (!other.getExistingSubjectConditionSetId().isEmpty()) { + existingSubjectConditionSetId_ = other.existingSubjectConditionSetId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasNewSubjectConditionSet()) { + mergeNewSubjectConditionSet(other.getNewSubjectConditionSet()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + attributeValueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.opentdf.platform.policy.Action m = + input.readMessage( + io.opentdf.platform.policy.Action.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + existingSubjectConditionSetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getNewSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object attributeValueId_ = ""; + /** + *
+     * Required
+     * Attribute Value to be mapped to
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * Attribute Value to be mapped to
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * Attribute Value to be mapped to
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @param value The attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attributeValueId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * Attribute Value to be mapped to
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearAttributeValueId() { + attributeValueId_ = getDefaultInstance().getAttributeValueId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * Attribute Value to be mapped to
+     * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @param value The bytes for attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attributeValueId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionsBuilder_; + + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder setActions( + int index, io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder setActions( + int index, io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addActions(io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addActions( + int index, io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addActions( + io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addActions( + int index, io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Action.Builder getActionsBuilder( + int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( + io.opentdf.platform.policy.Action.getDefaultInstance()); + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.Action.Builder addActionsBuilder( + int index) { + return getActionsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Action.getDefaultInstance()); + } + /** + *
+     * The actions permitted by subjects in this mapping
+     * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( + actions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + private java.lang.Object existingSubjectConditionSetId_ = ""; + /** + *
+     * Either of the following:
+     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+     * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. + */ + public java.lang.String getExistingSubjectConditionSetId() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + existingSubjectConditionSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Either of the following:
+     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+     * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. + */ + public com.google.protobuf.ByteString + getExistingSubjectConditionSetIdBytes() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + existingSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Either of the following:
+     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+     * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @param value The existingSubjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setExistingSubjectConditionSetId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + existingSubjectConditionSetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Either of the following:
+     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+     * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return This builder for chaining. + */ + public Builder clearExistingSubjectConditionSetId() { + existingSubjectConditionSetId_ = getDefaultInstance().getExistingSubjectConditionSetId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Either of the following:
+     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+     * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @param value The bytes for existingSubjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setExistingSubjectConditionSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + existingSubjectConditionSetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> newSubjectConditionSetBuilder_; + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. + */ + public boolean hasNewSubjectConditionSet() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { + if (newSubjectConditionSetBuilder_ == null) { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } else { + return newSubjectConditionSetBuilder_.getMessage(); + } + } + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder setNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (newSubjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newSubjectConditionSet_ = value; + } else { + newSubjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder setNewSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { + if (newSubjectConditionSetBuilder_ == null) { + newSubjectConditionSet_ = builderForValue.build(); + } else { + newSubjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder mergeNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (newSubjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + newSubjectConditionSet_ != null && + newSubjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { + getNewSubjectConditionSetBuilder().mergeFrom(value); + } else { + newSubjectConditionSet_ = value; + } + } else { + newSubjectConditionSetBuilder_.mergeFrom(value); + } + if (newSubjectConditionSet_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder clearNewSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000008); + newSubjectConditionSet_ = null; + if (newSubjectConditionSetBuilder_ != null) { + newSubjectConditionSetBuilder_.dispose(); + newSubjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getNewSubjectConditionSetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNewSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { + if (newSubjectConditionSetBuilder_ != null) { + return newSubjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return newSubjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } + } + /** + *
+     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+     * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> + getNewSubjectConditionSetFieldBuilder() { + if (newSubjectConditionSetBuilder_ == null) { + newSubjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( + getNewSubjectConditionSet(), + getParentForChildren(), + isClean()); + newSubjectConditionSet_ = null; + } + return newSubjectConditionSetBuilder_; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Optional
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectMappingRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectMappingRequest) + private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubjectMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java new file mode 100644 index 00000000..ebe8524f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java @@ -0,0 +1,152 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface CreateSubjectMappingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * Attribute Value to be mapped to
+   * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + java.lang.String getAttributeValueId(); + /** + *
+   * Required
+   * Attribute Value to be mapped to
+   * 
+ * + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + com.google.protobuf.ByteString + getAttributeValueIdBytes(); + + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + java.util.List + getActionsList(); + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.Action getActions(int index); + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + int getActionsCount(); + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + java.util.List + getActionsOrBuilderList(); + /** + *
+   * The actions permitted by subjects in this mapping
+   * 
+ * + * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index); + + /** + *
+   * Either of the following:
+   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+   * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. + */ + java.lang.String getExistingSubjectConditionSetId(); + /** + *
+   * Either of the following:
+   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
+   * 
+ * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. + */ + com.google.protobuf.ByteString + getExistingSubjectConditionSetIdBytes(); + + /** + *
+   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+   * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. + */ + boolean hasNewSubjectConditionSet(); + /** + *
+   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+   * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet(); + /** + *
+   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
+   * 
+ * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder(); + + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Optional
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java new file mode 100644 index 00000000..048034a7 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.CreateSubjectMappingResponse} + */ +public final class CreateSubjectMappingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectMappingResponse) + CreateSubjectMappingResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateSubjectMappingResponse.newBuilder() to construct. + private CreateSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateSubjectMappingResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateSubjectMappingResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.SubjectMapping subjectMapping_; + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + @java.lang.Override + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectMapping()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectMapping()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse) obj; + + if (hasSubjectMapping() != other.hasSubjectMapping()) return false; + if (hasSubjectMapping()) { + if (!getSubjectMapping() + .equals(other.getSubjectMapping())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectMapping()) { + hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMapping().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.CreateSubjectMappingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectMappingResponse) + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectMappingFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse build() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectMapping_ = subjectMappingBuilder_ == null + ? subjectMapping_ + : subjectMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.getDefaultInstance()) return this; + if (other.hasSubjectMapping()) { + mergeSubjectMapping(other.getSubjectMapping()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectMappingFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.SubjectMapping subjectMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingBuilder_; + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { + if (subjectMappingBuilder_ == null) { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } else { + return subjectMappingBuilder_.getMessage(); + } + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder setSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectMapping_ = value; + } else { + subjectMappingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder setSubjectMapping( + io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingBuilder_ == null) { + subjectMapping_ = builderForValue.build(); + } else { + subjectMappingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder mergeSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectMapping_ != null && + subjectMapping_ != io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) { + getSubjectMappingBuilder().mergeFrom(value); + } else { + subjectMapping_ = value; + } + } else { + subjectMappingBuilder_.mergeFrom(value); + } + if (subjectMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder clearSubjectMapping() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectMappingFieldBuilder().getBuilder(); + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + if (subjectMappingBuilder_ != null) { + return subjectMappingBuilder_.getMessageOrBuilder(); + } else { + return subjectMapping_ == null ? + io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> + getSubjectMappingFieldBuilder() { + if (subjectMappingBuilder_ == null) { + subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( + getSubjectMapping(), + getParentForChildren(), + isClean()); + subjectMapping_ = null; + } + return subjectMappingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectMappingResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectMappingResponse) + private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubjectMappingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java new file mode 100644 index 00000000..3f868566 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface CreateSubjectMappingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectMappingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + boolean hasSubjectMapping(); + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + io.opentdf.platform.policy.SubjectMapping getSubjectMapping(); + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java new file mode 100644 index 00000000..f2b5e6e3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.DeleteSubjectConditionSetRequest} + */ +public final class DeleteSubjectConditionSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectConditionSetRequest) + DeleteSubjectConditionSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteSubjectConditionSetRequest.newBuilder() to construct. + private DeleteSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteSubjectConditionSetRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteSubjectConditionSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.DeleteSubjectConditionSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectConditionSetRequest) + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest build() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectConditionSetRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectConditionSetRequest) + private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSubjectConditionSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java new file mode 100644 index 00000000..485be1e2 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface DeleteSubjectConditionSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectConditionSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java new file mode 100644 index 00000000..dcdc849b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java @@ -0,0 +1,647 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.DeleteSubjectConditionSetResponse} + */ +public final class DeleteSubjectConditionSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectConditionSetResponse) + DeleteSubjectConditionSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteSubjectConditionSetResponse.newBuilder() to construct. + private DeleteSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteSubjectConditionSetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteSubjectConditionSetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + /** + *
+   * Only ID of deleted Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Only ID of deleted Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + *
+   * Only ID of deleted Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectConditionSet()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectConditionSet()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.DeleteSubjectConditionSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectConditionSetResponse) + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse build() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + *
+     * Only ID of deleted Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectConditionSetResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectConditionSetResponse) + private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSubjectConditionSetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java new file mode 100644 index 00000000..29b3401e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface DeleteSubjectConditionSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectConditionSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Only ID of deleted Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + *
+   * Only ID of deleted Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); + /** + *
+   * Only ID of deleted Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequest.java new file mode 100644 index 00000000..2b6c01ee --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.DeleteSubjectMappingRequest} + */ +public final class DeleteSubjectMappingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectMappingRequest) + DeleteSubjectMappingRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteSubjectMappingRequest.newBuilder() to construct. + private DeleteSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteSubjectMappingRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteSubjectMappingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.DeleteSubjectMappingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectMappingRequest) + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest build() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectMappingRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectMappingRequest) + private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSubjectMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequestOrBuilder.java new file mode 100644 index 00000000..e2e8f8de --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface DeleteSubjectMappingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java new file mode 100644 index 00000000..4eb3a8c3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java @@ -0,0 +1,647 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.DeleteSubjectMappingResponse} + */ +public final class DeleteSubjectMappingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectMappingResponse) + DeleteSubjectMappingResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteSubjectMappingResponse.newBuilder() to construct. + private DeleteSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteSubjectMappingResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteSubjectMappingResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.SubjectMapping subjectMapping_; + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + @java.lang.Override + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectMapping()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectMapping()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse) obj; + + if (hasSubjectMapping() != other.hasSubjectMapping()) return false; + if (hasSubjectMapping()) { + if (!getSubjectMapping() + .equals(other.getSubjectMapping())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectMapping()) { + hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMapping().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.DeleteSubjectMappingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectMappingResponse) + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectMappingFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse build() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectMapping_ = subjectMappingBuilder_ == null + ? subjectMapping_ + : subjectMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.getDefaultInstance()) return this; + if (other.hasSubjectMapping()) { + mergeSubjectMapping(other.getSubjectMapping()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectMappingFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.SubjectMapping subjectMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingBuilder_; + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { + if (subjectMappingBuilder_ == null) { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } else { + return subjectMappingBuilder_.getMessage(); + } + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder setSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectMapping_ = value; + } else { + subjectMappingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder setSubjectMapping( + io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingBuilder_ == null) { + subjectMapping_ = builderForValue.build(); + } else { + subjectMappingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder mergeSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectMapping_ != null && + subjectMapping_ != io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) { + getSubjectMappingBuilder().mergeFrom(value); + } else { + subjectMapping_ = value; + } + } else { + subjectMappingBuilder_.mergeFrom(value); + } + if (subjectMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder clearSubjectMapping() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectMappingFieldBuilder().getBuilder(); + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + if (subjectMappingBuilder_ != null) { + return subjectMappingBuilder_.getMessageOrBuilder(); + } else { + return subjectMapping_ == null ? + io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> + getSubjectMappingFieldBuilder() { + if (subjectMappingBuilder_ == null) { + subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( + getSubjectMapping(), + getParentForChildren(), + isClean()); + subjectMapping_ = null; + } + return subjectMappingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectMappingResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectMappingResponse) + private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSubjectMappingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java new file mode 100644 index 00000000..97231f85 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface DeleteSubjectMappingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectMappingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + boolean hasSubjectMapping(); + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + io.opentdf.platform.policy.SubjectMapping getSubjectMapping(); + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java new file mode 100644 index 00000000..d39484b8 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.GetSubjectConditionSetRequest} + */ +public final class GetSubjectConditionSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectConditionSetRequest) + GetSubjectConditionSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetSubjectConditionSetRequest.newBuilder() to construct. + private GetSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetSubjectConditionSetRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetSubjectConditionSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.GetSubjectConditionSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectConditionSetRequest) + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest build() { + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectConditionSetRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectConditionSetRequest) + private static final io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubjectConditionSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java new file mode 100644 index 00000000..f6c76435 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface GetSubjectConditionSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectConditionSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java new file mode 100644 index 00000000..2b4d78d5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java @@ -0,0 +1,1046 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.GetSubjectConditionSetResponse} + */ +public final class GetSubjectConditionSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectConditionSetResponse) + GetSubjectConditionSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetSubjectConditionSetResponse.newBuilder() to construct. + private GetSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetSubjectConditionSetResponse() { + associatedSubjectMappings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetSubjectConditionSetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + public static final int ASSOCIATED_SUBJECT_MAPPINGS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List associatedSubjectMappings_; + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public java.util.List getAssociatedSubjectMappingsList() { + return associatedSubjectMappings_; + } + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public java.util.List + getAssociatedSubjectMappingsOrBuilderList() { + return associatedSubjectMappings_; + } + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public int getAssociatedSubjectMappingsCount() { + return associatedSubjectMappings_.size(); + } + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getAssociatedSubjectMappings(int index) { + return associatedSubjectMappings_.get(index); + } + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( + int index) { + return associatedSubjectMappings_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectConditionSet()); + } + for (int i = 0; i < associatedSubjectMappings_.size(); i++) { + output.writeMessage(2, associatedSubjectMappings_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectConditionSet()); + } + for (int i = 0; i < associatedSubjectMappings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, associatedSubjectMappings_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } + if (!getAssociatedSubjectMappingsList() + .equals(other.getAssociatedSubjectMappingsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + if (getAssociatedSubjectMappingsCount() > 0) { + hash = (37 * hash) + ASSOCIATED_SUBJECT_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getAssociatedSubjectMappingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.GetSubjectConditionSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectConditionSetResponse) + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + getAssociatedSubjectMappingsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + if (associatedSubjectMappingsBuilder_ == null) { + associatedSubjectMappings_ = java.util.Collections.emptyList(); + } else { + associatedSubjectMappings_ = null; + associatedSubjectMappingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse build() { + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result) { + if (associatedSubjectMappingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + associatedSubjectMappings_ = java.util.Collections.unmodifiableList(associatedSubjectMappings_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.associatedSubjectMappings_ = associatedSubjectMappings_; + } else { + result.associatedSubjectMappings_ = associatedSubjectMappingsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + if (associatedSubjectMappingsBuilder_ == null) { + if (!other.associatedSubjectMappings_.isEmpty()) { + if (associatedSubjectMappings_.isEmpty()) { + associatedSubjectMappings_ = other.associatedSubjectMappings_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.addAll(other.associatedSubjectMappings_); + } + onChanged(); + } + } else { + if (!other.associatedSubjectMappings_.isEmpty()) { + if (associatedSubjectMappingsBuilder_.isEmpty()) { + associatedSubjectMappingsBuilder_.dispose(); + associatedSubjectMappingsBuilder_ = null; + associatedSubjectMappings_ = other.associatedSubjectMappings_; + bitField0_ = (bitField0_ & ~0x00000002); + associatedSubjectMappingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAssociatedSubjectMappingsFieldBuilder() : null; + } else { + associatedSubjectMappingsBuilder_.addAllMessages(other.associatedSubjectMappings_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.opentdf.platform.policy.SubjectMapping m = + input.readMessage( + io.opentdf.platform.policy.SubjectMapping.parser(), + extensionRegistry); + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(m); + } else { + associatedSubjectMappingsBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + + private java.util.List associatedSubjectMappings_ = + java.util.Collections.emptyList(); + private void ensureAssociatedSubjectMappingsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + associatedSubjectMappings_ = new java.util.ArrayList(associatedSubjectMappings_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> associatedSubjectMappingsBuilder_; + + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public java.util.List getAssociatedSubjectMappingsList() { + if (associatedSubjectMappingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(associatedSubjectMappings_); + } else { + return associatedSubjectMappingsBuilder_.getMessageList(); + } + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public int getAssociatedSubjectMappingsCount() { + if (associatedSubjectMappingsBuilder_ == null) { + return associatedSubjectMappings_.size(); + } else { + return associatedSubjectMappingsBuilder_.getCount(); + } + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping getAssociatedSubjectMappings(int index) { + if (associatedSubjectMappingsBuilder_ == null) { + return associatedSubjectMappings_.get(index); + } else { + return associatedSubjectMappingsBuilder_.getMessage(index); + } + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder setAssociatedSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping value) { + if (associatedSubjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.set(index, value); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder setAssociatedSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.set(index, builderForValue.build()); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAssociatedSubjectMappings(io.opentdf.platform.policy.SubjectMapping value) { + if (associatedSubjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(value); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAssociatedSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping value) { + if (associatedSubjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(index, value); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAssociatedSubjectMappings( + io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(builderForValue.build()); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAssociatedSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(index, builderForValue.build()); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAllAssociatedSubjectMappings( + java.lang.Iterable values) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, associatedSubjectMappings_); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder clearAssociatedSubjectMappings() { + if (associatedSubjectMappingsBuilder_ == null) { + associatedSubjectMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.clear(); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder removeAssociatedSubjectMappings(int index) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.remove(index); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.remove(index); + } + return this; + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder getAssociatedSubjectMappingsBuilder( + int index) { + return getAssociatedSubjectMappingsFieldBuilder().getBuilder(index); + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( + int index) { + if (associatedSubjectMappingsBuilder_ == null) { + return associatedSubjectMappings_.get(index); } else { + return associatedSubjectMappingsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public java.util.List + getAssociatedSubjectMappingsOrBuilderList() { + if (associatedSubjectMappingsBuilder_ != null) { + return associatedSubjectMappingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(associatedSubjectMappings_); + } + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder addAssociatedSubjectMappingsBuilder() { + return getAssociatedSubjectMappingsFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder addAssociatedSubjectMappingsBuilder( + int index) { + return getAssociatedSubjectMappingsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); + } + /** + *
+     * contextualized Subject Mappings associated with this SubjectConditionSet
+     * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public java.util.List + getAssociatedSubjectMappingsBuilderList() { + return getAssociatedSubjectMappingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> + getAssociatedSubjectMappingsFieldBuilder() { + if (associatedSubjectMappingsBuilder_ == null) { + associatedSubjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( + associatedSubjectMappings_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + associatedSubjectMappings_ = null; + } + return associatedSubjectMappingsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectConditionSetResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectConditionSetResponse) + private static final io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubjectConditionSetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java new file mode 100644 index 00000000..5664becb --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface GetSubjectConditionSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectConditionSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); + /** + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); + + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + java.util.List + getAssociatedSubjectMappingsList(); + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + io.opentdf.platform.policy.SubjectMapping getAssociatedSubjectMappings(int index); + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + int getAssociatedSubjectMappingsCount(); + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + java.util.List + getAssociatedSubjectMappingsOrBuilderList(); + /** + *
+   * contextualized Subject Mappings associated with this SubjectConditionSet
+   * 
+ * + * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + io.opentdf.platform.policy.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequest.java new file mode 100644 index 00000000..f2398e3f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequest.java @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.GetSubjectMappingRequest} + */ +public final class GetSubjectMappingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectMappingRequest) + GetSubjectMappingRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetSubjectMappingRequest.newBuilder() to construct. + private GetSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetSubjectMappingRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetSubjectMappingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.GetSubjectMappingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectMappingRequest) + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest build() { + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectMappingRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectMappingRequest) + private static final io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubjectMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequestOrBuilder.java new file mode 100644 index 00000000..10b89afb --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequestOrBuilder.java @@ -0,0 +1,22 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface GetSubjectMappingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponse.java new file mode 100644 index 00000000..2d2eb573 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.GetSubjectMappingResponse} + */ +public final class GetSubjectMappingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectMappingResponse) + GetSubjectMappingResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetSubjectMappingResponse.newBuilder() to construct. + private GetSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetSubjectMappingResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetSubjectMappingResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.SubjectMapping subjectMapping_; + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + @java.lang.Override + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectMapping()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectMapping()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse) obj; + + if (hasSubjectMapping() != other.hasSubjectMapping()) return false; + if (hasSubjectMapping()) { + if (!getSubjectMapping() + .equals(other.getSubjectMapping())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectMapping()) { + hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMapping().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.GetSubjectMappingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectMappingResponse) + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectMappingFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse build() { + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse result = new io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectMapping_ = subjectMappingBuilder_ == null + ? subjectMapping_ + : subjectMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.getDefaultInstance()) return this; + if (other.hasSubjectMapping()) { + mergeSubjectMapping(other.getSubjectMapping()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectMappingFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.SubjectMapping subjectMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingBuilder_; + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { + if (subjectMappingBuilder_ == null) { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } else { + return subjectMappingBuilder_.getMessage(); + } + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder setSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectMapping_ = value; + } else { + subjectMappingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder setSubjectMapping( + io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingBuilder_ == null) { + subjectMapping_ = builderForValue.build(); + } else { + subjectMappingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder mergeSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectMapping_ != null && + subjectMapping_ != io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) { + getSubjectMappingBuilder().mergeFrom(value); + } else { + subjectMapping_ = value; + } + } else { + subjectMappingBuilder_.mergeFrom(value); + } + if (subjectMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder clearSubjectMapping() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectMappingFieldBuilder().getBuilder(); + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + if (subjectMappingBuilder_ != null) { + return subjectMappingBuilder_.getMessageOrBuilder(); + } else { + return subjectMapping_ == null ? + io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + } + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> + getSubjectMappingFieldBuilder() { + if (subjectMappingBuilder_ == null) { + subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( + getSubjectMapping(), + getParentForChildren(), + isClean()); + subjectMapping_ = null; + } + return subjectMappingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectMappingResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectMappingResponse) + private static final io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubjectMappingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponseOrBuilder.java new file mode 100644 index 00000000..9bff6891 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface GetSubjectMappingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectMappingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + boolean hasSubjectMapping(); + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + io.opentdf.platform.policy.SubjectMapping getSubjectMapping(); + /** + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java new file mode 100644 index 00000000..6a488af5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.ListSubjectConditionSetsRequest} + */ +public final class ListSubjectConditionSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectConditionSetsRequest) + ListSubjectConditionSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListSubjectConditionSetsRequest.newBuilder() to construct. + private ListSubjectConditionSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListSubjectConditionSetsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListSubjectConditionSetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest other = (io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.ListSubjectConditionSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectConditionSetsRequest) + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest build() { + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest result = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectConditionSetsRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectConditionSetsRequest) + private static final io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubjectConditionSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java new file mode 100644 index 00000000..1a55d0e6 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface ListSubjectConditionSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectConditionSetsRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java new file mode 100644 index 00000000..b073dfed --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.ListSubjectConditionSetsResponse} + */ +public final class ListSubjectConditionSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectConditionSetsResponse) + ListSubjectConditionSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListSubjectConditionSetsResponse.newBuilder() to construct. + private ListSubjectConditionSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListSubjectConditionSetsResponse() { + subjectConditionSets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListSubjectConditionSetsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.Builder.class); + } + + public static final int SUBJECT_CONDITION_SETS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List subjectConditionSets_; + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public java.util.List getSubjectConditionSetsList() { + return subjectConditionSets_; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public java.util.List + getSubjectConditionSetsOrBuilderList() { + return subjectConditionSets_; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public int getSubjectConditionSetsCount() { + return subjectConditionSets_.size(); + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSets(int index) { + return subjectConditionSets_.get(index); + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( + int index) { + return subjectConditionSets_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < subjectConditionSets_.size(); i++) { + output.writeMessage(1, subjectConditionSets_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < subjectConditionSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, subjectConditionSets_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse other = (io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse) obj; + + if (!getSubjectConditionSetsList() + .equals(other.getSubjectConditionSetsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSubjectConditionSetsCount() > 0) { + hash = (37 * hash) + SUBJECT_CONDITION_SETS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSetsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.ListSubjectConditionSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectConditionSetsResponse) + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSets_ = java.util.Collections.emptyList(); + } else { + subjectConditionSets_ = null; + subjectConditionSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse build() { + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result) { + if (subjectConditionSetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subjectConditionSets_ = java.util.Collections.unmodifiableList(subjectConditionSets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subjectConditionSets_ = subjectConditionSets_; + } else { + result.subjectConditionSets_ = subjectConditionSetsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance()) return this; + if (subjectConditionSetsBuilder_ == null) { + if (!other.subjectConditionSets_.isEmpty()) { + if (subjectConditionSets_.isEmpty()) { + subjectConditionSets_ = other.subjectConditionSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.addAll(other.subjectConditionSets_); + } + onChanged(); + } + } else { + if (!other.subjectConditionSets_.isEmpty()) { + if (subjectConditionSetsBuilder_.isEmpty()) { + subjectConditionSetsBuilder_.dispose(); + subjectConditionSetsBuilder_ = null; + subjectConditionSets_ = other.subjectConditionSets_; + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectConditionSetsFieldBuilder() : null; + } else { + subjectConditionSetsBuilder_.addAllMessages(other.subjectConditionSets_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.SubjectConditionSet m = + input.readMessage( + io.opentdf.platform.policy.SubjectConditionSet.parser(), + extensionRegistry); + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(m); + } else { + subjectConditionSetsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List subjectConditionSets_ = + java.util.Collections.emptyList(); + private void ensureSubjectConditionSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subjectConditionSets_ = new java.util.ArrayList(subjectConditionSets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetsBuilder_; + + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public java.util.List getSubjectConditionSetsList() { + if (subjectConditionSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectConditionSets_); + } else { + return subjectConditionSetsBuilder_.getMessageList(); + } + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public int getSubjectConditionSetsCount() { + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.size(); + } else { + return subjectConditionSetsBuilder_.getCount(); + } + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSets(int index) { + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.get(index); + } else { + return subjectConditionSetsBuilder_.getMessage(index); + } + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder setSubjectConditionSets( + int index, io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.set(index, value); + onChanged(); + } else { + subjectConditionSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder setSubjectConditionSets( + int index, io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectConditionSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addSubjectConditionSets(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(value); + onChanged(); + } else { + subjectConditionSetsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addSubjectConditionSets( + int index, io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(index, value); + onChanged(); + } else { + subjectConditionSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addSubjectConditionSets( + io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(builderForValue.build()); + onChanged(); + } else { + subjectConditionSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addSubjectConditionSets( + int index, io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectConditionSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addAllSubjectConditionSets( + java.lang.Iterable values) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectConditionSets_); + onChanged(); + } else { + subjectConditionSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder clearSubjectConditionSets() { + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subjectConditionSetsBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder removeSubjectConditionSets(int index) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.remove(index); + onChanged(); + } else { + subjectConditionSetsBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetsBuilder( + int index) { + return getSubjectConditionSetsFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( + int index) { + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.get(index); } else { + return subjectConditionSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public java.util.List + getSubjectConditionSetsOrBuilderList() { + if (subjectConditionSetsBuilder_ != null) { + return subjectConditionSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectConditionSets_); + } + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet.Builder addSubjectConditionSetsBuilder() { + return getSubjectConditionSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()); + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet.Builder addSubjectConditionSetsBuilder( + int index) { + return getSubjectConditionSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()); + } + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public java.util.List + getSubjectConditionSetsBuilderList() { + return getSubjectConditionSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> + getSubjectConditionSetsFieldBuilder() { + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( + subjectConditionSets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + subjectConditionSets_ = null; + } + return subjectConditionSetsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectConditionSetsResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectConditionSetsResponse) + private static final io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubjectConditionSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java new file mode 100644 index 00000000..9d833c1c --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface ListSubjectConditionSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectConditionSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + java.util.List + getSubjectConditionSetsList(); + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSets(int index); + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + int getSubjectConditionSetsCount(); + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + java.util.List + getSubjectConditionSetsOrBuilderList(); + /** + * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequest.java new file mode 100644 index 00000000..061831b3 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequest.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.ListSubjectMappingsRequest} + */ +public final class ListSubjectMappingsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectMappingsRequest) + ListSubjectMappingsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListSubjectMappingsRequest.newBuilder() to construct. + private ListSubjectMappingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListSubjectMappingsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListSubjectMappingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest other = (io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.ListSubjectMappingsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectMappingsRequest) + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest build() { + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest result = new io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectMappingsRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectMappingsRequest) + private static final io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubjectMappingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequestOrBuilder.java new file mode 100644 index 00000000..e3fa9269 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequestOrBuilder.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface ListSubjectMappingsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectMappingsRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponse.java new file mode 100644 index 00000000..71cd08da --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.ListSubjectMappingsResponse} + */ +public final class ListSubjectMappingsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectMappingsResponse) + ListSubjectMappingsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListSubjectMappingsResponse.newBuilder() to construct. + private ListSubjectMappingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListSubjectMappingsResponse() { + subjectMappings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListSubjectMappingsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.Builder.class); + } + + public static final int SUBJECT_MAPPINGS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List subjectMappings_; + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public java.util.List getSubjectMappingsList() { + return subjectMappings_; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public java.util.List + getSubjectMappingsOrBuilderList() { + return subjectMappings_; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public int getSubjectMappingsCount() { + return subjectMappings_.size(); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { + return subjectMappings_.get(index); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index) { + return subjectMappings_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < subjectMappings_.size(); i++) { + output.writeMessage(1, subjectMappings_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < subjectMappings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, subjectMappings_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse other = (io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse) obj; + + if (!getSubjectMappingsList() + .equals(other.getSubjectMappingsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSubjectMappingsCount() > 0) { + hash = (37 * hash) + SUBJECT_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMappingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.ListSubjectMappingsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectMappingsResponse) + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subjectMappingsBuilder_ == null) { + subjectMappings_ = java.util.Collections.emptyList(); + } else { + subjectMappings_ = null; + subjectMappingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse build() { + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse result = new io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse result) { + if (subjectMappingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subjectMappings_ = java.util.Collections.unmodifiableList(subjectMappings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subjectMappings_ = subjectMappings_; + } else { + result.subjectMappings_ = subjectMappingsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.getDefaultInstance()) return this; + if (subjectMappingsBuilder_ == null) { + if (!other.subjectMappings_.isEmpty()) { + if (subjectMappings_.isEmpty()) { + subjectMappings_ = other.subjectMappings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubjectMappingsIsMutable(); + subjectMappings_.addAll(other.subjectMappings_); + } + onChanged(); + } + } else { + if (!other.subjectMappings_.isEmpty()) { + if (subjectMappingsBuilder_.isEmpty()) { + subjectMappingsBuilder_.dispose(); + subjectMappingsBuilder_ = null; + subjectMappings_ = other.subjectMappings_; + bitField0_ = (bitField0_ & ~0x00000001); + subjectMappingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectMappingsFieldBuilder() : null; + } else { + subjectMappingsBuilder_.addAllMessages(other.subjectMappings_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.SubjectMapping m = + input.readMessage( + io.opentdf.platform.policy.SubjectMapping.parser(), + extensionRegistry); + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(m); + } else { + subjectMappingsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List subjectMappings_ = + java.util.Collections.emptyList(); + private void ensureSubjectMappingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subjectMappings_ = new java.util.ArrayList(subjectMappings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingsBuilder_; + + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public java.util.List getSubjectMappingsList() { + if (subjectMappingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectMappings_); + } else { + return subjectMappingsBuilder_.getMessageList(); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public int getSubjectMappingsCount() { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.size(); + } else { + return subjectMappingsBuilder_.getCount(); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.get(index); + } else { + return subjectMappingsBuilder_.getMessage(index); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder setSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.set(index, value); + onChanged(); + } else { + subjectMappingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder setSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(value); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(index, value); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addAllSubjectMappings( + java.lang.Iterable values) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectMappings_); + onChanged(); + } else { + subjectMappingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder clearSubjectMappings() { + if (subjectMappingsBuilder_ == null) { + subjectMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subjectMappingsBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder removeSubjectMappings(int index) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.remove(index); + onChanged(); + } else { + subjectMappingsBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingsBuilder( + int index) { + return getSubjectMappingsFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index) { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.get(index); } else { + return subjectMappingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public java.util.List + getSubjectMappingsOrBuilderList() { + if (subjectMappingsBuilder_ != null) { + return subjectMappingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectMappings_); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder() { + return getSubjectMappingsFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder( + int index) { + return getSubjectMappingsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public java.util.List + getSubjectMappingsBuilderList() { + return getSubjectMappingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> + getSubjectMappingsFieldBuilder() { + if (subjectMappingsBuilder_ == null) { + subjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( + subjectMappings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + subjectMappings_ = null; + } + return subjectMappingsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectMappingsResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectMappingsResponse) + private static final io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubjectMappingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponseOrBuilder.java new file mode 100644 index 00000000..cb1ee117 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface ListSubjectMappingsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectMappingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + java.util.List + getSubjectMappingsList(); + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index); + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + int getSubjectMappingsCount(); + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + java.util.List + getSubjectMappingsOrBuilderList(); + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java new file mode 100644 index 00000000..b797ff70 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java @@ -0,0 +1,788 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + *
+ * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned
+ * if there is any single condition found among the structures that matches for one of the provided properties:
+ * 1. The external field, external value, and an IN operator
+ * 2. The external field, _no_ external value, and a NOT_IN operator
+ *
+ * Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping
+ * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no
+ * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum
+ * initial filter.
+ *
+ * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.
+ * 
+ * + * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsRequest} + */ +public final class MatchSubjectMappingsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.MatchSubjectMappingsRequest) + MatchSubjectMappingsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use MatchSubjectMappingsRequest.newBuilder() to construct. + private MatchSubjectMappingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MatchSubjectMappingsRequest() { + subjectProperties_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MatchSubjectMappingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.Builder.class); + } + + public static final int SUBJECT_PROPERTIES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List subjectProperties_; + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public java.util.List getSubjectPropertiesList() { + return subjectProperties_; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public java.util.List + getSubjectPropertiesOrBuilderList() { + return subjectProperties_; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public int getSubjectPropertiesCount() { + return subjectProperties_.size(); + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectProperty getSubjectProperties(int index) { + return subjectProperties_.get(index); + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index) { + return subjectProperties_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < subjectProperties_.size(); i++) { + output.writeMessage(1, subjectProperties_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < subjectProperties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, subjectProperties_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest other = (io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) obj; + + if (!getSubjectPropertiesList() + .equals(other.getSubjectPropertiesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSubjectPropertiesCount() > 0) { + hash = (37 * hash) + SUBJECT_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getSubjectPropertiesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned
+   * if there is any single condition found among the structures that matches for one of the provided properties:
+   * 1. The external field, external value, and an IN operator
+   * 2. The external field, _no_ external value, and a NOT_IN operator
+   *
+   * Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping
+   * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no
+   * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum
+   * initial filter.
+   *
+   * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.
+   * 
+ * + * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.MatchSubjectMappingsRequest) + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subjectPropertiesBuilder_ == null) { + subjectProperties_ = java.util.Collections.emptyList(); + } else { + subjectProperties_ = null; + subjectPropertiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest build() { + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result) { + if (subjectPropertiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subjectProperties_ = java.util.Collections.unmodifiableList(subjectProperties_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subjectProperties_ = subjectProperties_; + } else { + result.subjectProperties_ = subjectPropertiesBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.getDefaultInstance()) return this; + if (subjectPropertiesBuilder_ == null) { + if (!other.subjectProperties_.isEmpty()) { + if (subjectProperties_.isEmpty()) { + subjectProperties_ = other.subjectProperties_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.addAll(other.subjectProperties_); + } + onChanged(); + } + } else { + if (!other.subjectProperties_.isEmpty()) { + if (subjectPropertiesBuilder_.isEmpty()) { + subjectPropertiesBuilder_.dispose(); + subjectPropertiesBuilder_ = null; + subjectProperties_ = other.subjectProperties_; + bitField0_ = (bitField0_ & ~0x00000001); + subjectPropertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectPropertiesFieldBuilder() : null; + } else { + subjectPropertiesBuilder_.addAllMessages(other.subjectProperties_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.SubjectProperty m = + input.readMessage( + io.opentdf.platform.policy.SubjectProperty.parser(), + extensionRegistry); + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(m); + } else { + subjectPropertiesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List subjectProperties_ = + java.util.Collections.emptyList(); + private void ensureSubjectPropertiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subjectProperties_ = new java.util.ArrayList(subjectProperties_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectProperty, io.opentdf.platform.policy.SubjectProperty.Builder, io.opentdf.platform.policy.SubjectPropertyOrBuilder> subjectPropertiesBuilder_; + + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public java.util.List getSubjectPropertiesList() { + if (subjectPropertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectProperties_); + } else { + return subjectPropertiesBuilder_.getMessageList(); + } + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public int getSubjectPropertiesCount() { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.size(); + } else { + return subjectPropertiesBuilder_.getCount(); + } + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.SubjectProperty getSubjectProperties(int index) { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.get(index); + } else { + return subjectPropertiesBuilder_.getMessage(index); + } + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder setSubjectProperties( + int index, io.opentdf.platform.policy.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectPropertiesIsMutable(); + subjectProperties_.set(index, value); + onChanged(); + } else { + subjectPropertiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder setSubjectProperties( + int index, io.opentdf.platform.policy.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectPropertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addSubjectProperties(io.opentdf.platform.policy.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(value); + onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addSubjectProperties( + int index, io.opentdf.platform.policy.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(index, value); + onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addSubjectProperties( + io.opentdf.platform.policy.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(builderForValue.build()); + onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addSubjectProperties( + int index, io.opentdf.platform.policy.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addAllSubjectProperties( + java.lang.Iterable values) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectProperties_); + onChanged(); + } else { + subjectPropertiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder clearSubjectProperties() { + if (subjectPropertiesBuilder_ == null) { + subjectProperties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subjectPropertiesBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder removeSubjectProperties(int index) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.remove(index); + onChanged(); + } else { + subjectPropertiesBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.SubjectProperty.Builder getSubjectPropertiesBuilder( + int index) { + return getSubjectPropertiesFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index) { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.get(index); } else { + return subjectPropertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public java.util.List + getSubjectPropertiesOrBuilderList() { + if (subjectPropertiesBuilder_ != null) { + return subjectPropertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectProperties_); + } + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.SubjectProperty.Builder addSubjectPropertiesBuilder() { + return getSubjectPropertiesFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectProperty.getDefaultInstance()); + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.SubjectProperty.Builder addSubjectPropertiesBuilder( + int index) { + return getSubjectPropertiesFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectProperty.getDefaultInstance()); + } + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public java.util.List + getSubjectPropertiesBuilderList() { + return getSubjectPropertiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectProperty, io.opentdf.platform.policy.SubjectProperty.Builder, io.opentdf.platform.policy.SubjectPropertyOrBuilder> + getSubjectPropertiesFieldBuilder() { + if (subjectPropertiesBuilder_ == null) { + subjectPropertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectProperty, io.opentdf.platform.policy.SubjectProperty.Builder, io.opentdf.platform.policy.SubjectPropertyOrBuilder>( + subjectProperties_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + subjectProperties_ = null; + } + return subjectPropertiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.MatchSubjectMappingsRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.MatchSubjectMappingsRequest) + private static final io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchSubjectMappingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java new file mode 100644 index 00000000..cd06bdd5 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface MatchSubjectMappingsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.MatchSubjectMappingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + java.util.List + getSubjectPropertiesList(); + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + io.opentdf.platform.policy.SubjectProperty getSubjectProperties(int index); + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + int getSubjectPropertiesCount(); + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + java.util.List + getSubjectPropertiesOrBuilderList(); + /** + * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + io.opentdf.platform.policy.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponse.java new file mode 100644 index 00000000..7d48cd8b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponse.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsResponse} + */ +public final class MatchSubjectMappingsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.MatchSubjectMappingsResponse) + MatchSubjectMappingsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use MatchSubjectMappingsResponse.newBuilder() to construct. + private MatchSubjectMappingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MatchSubjectMappingsResponse() { + subjectMappings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MatchSubjectMappingsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.Builder.class); + } + + public static final int SUBJECT_MAPPINGS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List subjectMappings_; + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public java.util.List getSubjectMappingsList() { + return subjectMappings_; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public java.util.List + getSubjectMappingsOrBuilderList() { + return subjectMappings_; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public int getSubjectMappingsCount() { + return subjectMappings_.size(); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { + return subjectMappings_.get(index); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index) { + return subjectMappings_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < subjectMappings_.size(); i++) { + output.writeMessage(1, subjectMappings_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < subjectMappings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, subjectMappings_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse other = (io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse) obj; + + if (!getSubjectMappingsList() + .equals(other.getSubjectMappingsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSubjectMappingsCount() > 0) { + hash = (37 * hash) + SUBJECT_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMappingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.MatchSubjectMappingsResponse) + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subjectMappingsBuilder_ == null) { + subjectMappings_ = java.util.Collections.emptyList(); + } else { + subjectMappings_ = null; + subjectMappingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse build() { + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse result = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse result) { + if (subjectMappingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subjectMappings_ = java.util.Collections.unmodifiableList(subjectMappings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subjectMappings_ = subjectMappings_; + } else { + result.subjectMappings_ = subjectMappingsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.getDefaultInstance()) return this; + if (subjectMappingsBuilder_ == null) { + if (!other.subjectMappings_.isEmpty()) { + if (subjectMappings_.isEmpty()) { + subjectMappings_ = other.subjectMappings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubjectMappingsIsMutable(); + subjectMappings_.addAll(other.subjectMappings_); + } + onChanged(); + } + } else { + if (!other.subjectMappings_.isEmpty()) { + if (subjectMappingsBuilder_.isEmpty()) { + subjectMappingsBuilder_.dispose(); + subjectMappingsBuilder_ = null; + subjectMappings_ = other.subjectMappings_; + bitField0_ = (bitField0_ & ~0x00000001); + subjectMappingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectMappingsFieldBuilder() : null; + } else { + subjectMappingsBuilder_.addAllMessages(other.subjectMappings_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.SubjectMapping m = + input.readMessage( + io.opentdf.platform.policy.SubjectMapping.parser(), + extensionRegistry); + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(m); + } else { + subjectMappingsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List subjectMappings_ = + java.util.Collections.emptyList(); + private void ensureSubjectMappingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subjectMappings_ = new java.util.ArrayList(subjectMappings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingsBuilder_; + + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public java.util.List getSubjectMappingsList() { + if (subjectMappingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectMappings_); + } else { + return subjectMappingsBuilder_.getMessageList(); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public int getSubjectMappingsCount() { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.size(); + } else { + return subjectMappingsBuilder_.getCount(); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.get(index); + } else { + return subjectMappingsBuilder_.getMessage(index); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder setSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.set(index, value); + onChanged(); + } else { + subjectMappingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder setSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(value); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(index, value); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addSubjectMappings( + int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectMappingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder addAllSubjectMappings( + java.lang.Iterable values) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectMappings_); + onChanged(); + } else { + subjectMappingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder clearSubjectMappings() { + if (subjectMappingsBuilder_ == null) { + subjectMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subjectMappingsBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public Builder removeSubjectMappings(int index) { + if (subjectMappingsBuilder_ == null) { + ensureSubjectMappingsIsMutable(); + subjectMappings_.remove(index); + onChanged(); + } else { + subjectMappingsBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingsBuilder( + int index) { + return getSubjectMappingsFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index) { + if (subjectMappingsBuilder_ == null) { + return subjectMappings_.get(index); } else { + return subjectMappingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public java.util.List + getSubjectMappingsOrBuilderList() { + if (subjectMappingsBuilder_ != null) { + return subjectMappingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectMappings_); + } + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder() { + return getSubjectMappingsFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder( + int index) { + return getSubjectMappingsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); + } + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + public java.util.List + getSubjectMappingsBuilderList() { + return getSubjectMappingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> + getSubjectMappingsFieldBuilder() { + if (subjectMappingsBuilder_ == null) { + subjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( + subjectMappings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + subjectMappings_ = null; + } + return subjectMappingsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.MatchSubjectMappingsResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.MatchSubjectMappingsResponse) + private static final io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchSubjectMappingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponseOrBuilder.java new file mode 100644 index 00000000..971ad22a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponseOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface MatchSubjectMappingsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.MatchSubjectMappingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + java.util.List + getSubjectMappingsList(); + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index); + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + int getSubjectMappingsCount(); + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + java.util.List + getSubjectMappingsOrBuilderList(); + /** + * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; + */ + io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( + int index); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java new file mode 100644 index 00000000..0b3b837c --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java @@ -0,0 +1,1106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.SubjectConditionSetCreate} + */ +public final class SubjectConditionSetCreate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectConditionSetCreate) + SubjectConditionSetCreateOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectConditionSetCreate.newBuilder() to construct. + private SubjectConditionSetCreate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectConditionSetCreate() { + subjectSets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectConditionSetCreate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_SETS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List subjectSets_; + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getSubjectSetsList() { + return subjectSets_; + } + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getSubjectSetsOrBuilderList() { + return subjectSets_; + } + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getSubjectSetsCount() { + return subjectSets_.size(); + } + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { + return subjectSets_.get(index); + } + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + return subjectSets_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Optional
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Optional
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Optional
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < subjectSets_.size(); i++) { + output.writeMessage(1, subjectSets_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < subjectSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, subjectSets_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate other = (io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate) obj; + + if (!getSubjectSetsList() + .equals(other.getSubjectSetsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSubjectSetsCount() > 0) { + hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectSetsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.SubjectConditionSetCreate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectConditionSetCreate) + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectSetsFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + } else { + subjectSets_ = null; + subjectSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate build() { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate buildPartial() { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { + if (subjectSetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subjectSets_ = subjectSets_; + } else { + result.subjectSets_ = subjectSetsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate other) { + if (other == io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) return this; + if (subjectSetsBuilder_ == null) { + if (!other.subjectSets_.isEmpty()) { + if (subjectSets_.isEmpty()) { + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubjectSetsIsMutable(); + subjectSets_.addAll(other.subjectSets_); + } + onChanged(); + } + } else { + if (!other.subjectSets_.isEmpty()) { + if (subjectSetsBuilder_.isEmpty()) { + subjectSetsBuilder_.dispose(); + subjectSetsBuilder_ = null; + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000001); + subjectSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectSetsFieldBuilder() : null; + } else { + subjectSetsBuilder_.addAllMessages(other.subjectSets_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.opentdf.platform.policy.SubjectSet m = + input.readMessage( + io.opentdf.platform.policy.SubjectSet.parser(), + extensionRegistry); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(m); + } else { + subjectSetsBuilder_.addMessage(m); + } + break; + } // case 10 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 802 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List subjectSets_ = + java.util.Collections.emptyList(); + private void ensureSubjectSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subjectSets_ = new java.util.ArrayList(subjectSets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> subjectSetsBuilder_; + + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List getSubjectSetsList() { + if (subjectSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectSets_); + } else { + return subjectSetsBuilder_.getMessageList(); + } + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public int getSubjectSetsCount() { + if (subjectSetsBuilder_ == null) { + return subjectSets_.size(); + } else { + return subjectSetsBuilder_.getCount(); + } + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); + } else { + return subjectSetsBuilder_.getMessage(index); + } + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder setSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, value); + onChanged(); + } else { + subjectSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder setSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addSubjectSets(io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.add(value); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, value); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addSubjectSets( + io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder addAllSubjectSets( + java.lang.Iterable values) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectSets_); + onChanged(); + } else { + subjectSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder clearSubjectSets() { + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subjectSetsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder removeSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.remove(index); + onChanged(); + } else { + subjectSetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSet.Builder getSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); } else { + return subjectSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List + getSubjectSetsOrBuilderList() { + if (subjectSetsBuilder_ != null) { + return subjectSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectSets_); + } + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder() { + return getSubjectSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); + } + /** + *
+     * Required
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List + getSubjectSetsBuilderList() { + return getSubjectSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> + getSubjectSetsFieldBuilder() { + if (subjectSetsBuilder_ == null) { + subjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder>( + subjectSets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + subjectSets_ = null; + } + return subjectSetsBuilder_; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Optional
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.SubjectConditionSetCreate) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectConditionSetCreate) + private static final io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate(); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectConditionSetCreate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java new file mode 100644 index 00000000..ef75044b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface SubjectConditionSetCreateOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectConditionSetCreate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getSubjectSetsList(); + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.SubjectSet getSubjectSets(int index); + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + int getSubjectSetsCount(); + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getSubjectSetsOrBuilderList(); + /** + *
+   * Required
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index); + + /** + *
+   * Optional
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Optional
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Optional
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java new file mode 100644 index 00000000..4b9a7389 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java @@ -0,0 +1,431 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public final class SubjectMappingProto { + private SubjectMappingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n+policy/subjectmapping/subject_mapping." + + "proto\022\025policy.subjectmapping\032\033buf/valida" + + "te/validate.proto\032\034google/api/annotation" + + "s.proto\032\023common/common.proto\032\024policy/obj" + + "ects.proto\"e\n\033MatchSubjectMappingsReques" + + "t\022F\n\022subject_properties\030\001 \003(\0132\027.policy.S" + + "ubjectPropertyR\021subjectProperties\"a\n\034Mat" + + "chSubjectMappingsResponse\022A\n\020subject_map" + + "pings\030\001 \003(\0132\026.policy.SubjectMappingR\017sub" + + "jectMappings\"2\n\030GetSubjectMappingRequest" + + "\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\\\n\031GetSubjectMa" + + "ppingResponse\022?\n\017subject_mapping\030\001 \001(\0132\026" + + ".policy.SubjectMappingR\016subjectMapping\"\034" + + "\n\032ListSubjectMappingsRequest\"`\n\033ListSubj" + + "ectMappingsResponse\022A\n\020subject_mappings\030" + + "\001 \003(\0132\026.policy.SubjectMappingR\017subjectMa" + + "ppings\"\363\002\n\033CreateSubjectMappingRequest\0224" + + "\n\022attribute_value_id\030\001 \001(\tB\006\272H\003\310\001\001R\020attr" + + "ibuteValueId\0222\n\007actions\030\002 \003(\0132\016.policy.A" + + "ctionB\010\272H\005\222\001\002\010\001R\007actions\022H\n!existing_sub" + + "ject_condition_set_id\030\003 \001(\tR\035existingSub" + + "jectConditionSetId\022k\n\031new_subject_condit" + + "ion_set\030\004 \001(\01320.policy.subjectmapping.Su" + + "bjectConditionSetCreateR\026newSubjectCondi" + + "tionSet\0223\n\010metadata\030d \001(\0132\027.common.Metad" + + "ataMutableR\010metadata\"_\n\034CreateSubjectMap" + + "pingResponse\022?\n\017subject_mapping\030\001 \001(\0132\026." + + "policy.SubjectMappingR\016subjectMapping\"\243\002" + + "\n\033UpdateSubjectMappingRequest\022\026\n\002id\030\001 \001(" + + "\tB\006\272H\003\310\001\001R\002id\0227\n\030subject_condition_set_i" + + "d\030\002 \001(\tR\025subjectConditionSetId\022(\n\007action" + + "s\030\003 \003(\0132\016.policy.ActionR\007actions\0223\n\010meta" + + "data\030d \001(\0132\027.common.MetadataMutableR\010met" + + "adata\022T\n\030metadata_update_behavior\030e \001(\0162" + + "\032.common.MetadataUpdateEnumR\026metadataUpd" + + "ateBehavior\"_\n\034UpdateSubjectMappingRespo" + + "nse\022?\n\017subject_mapping\030\001 \001(\0132\026.policy.Su" + + "bjectMappingR\016subjectMapping\"5\n\033DeleteSu" + + "bjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R" + + "\002id\"_\n\034DeleteSubjectMappingResponse\022?\n\017s" + + "ubject_mapping\030\001 \001(\0132\026.policy.SubjectMap" + + "pingR\016subjectMapping\"7\n\035GetSubjectCondit" + + "ionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\311\001" + + "\n\036GetSubjectConditionSetResponse\022O\n\025subj" + + "ect_condition_set\030\001 \001(\0132\033.policy.Subject" + + "ConditionSetR\023subjectConditionSet\022V\n\033ass" + + "ociated_subject_mappings\030\002 \003(\0132\026.policy." + + "SubjectMappingR\031associatedSubjectMapping" + + "s\"!\n\037ListSubjectConditionSetsRequest\"u\n " + + "ListSubjectConditionSetsResponse\022Q\n\026subj" + + "ect_condition_sets\030\001 \003(\0132\033.policy.Subjec" + + "tConditionSetR\024subjectConditionSets\"\221\001\n\031" + + "SubjectConditionSetCreate\022?\n\014subject_set" + + "s\030\001 \003(\0132\022.policy.SubjectSetB\010\272H\005\222\001\002\010\001R\013s" + + "ubjectSets\0223\n\010metadata\030d \001(\0132\027.common.Me" + + "tadataMutableR\010metadata\"\210\001\n CreateSubjec" + + "tConditionSetRequest\022d\n\025subject_conditio" + + "n_set\030\001 \001(\01320.policy.subjectmapping.Subj" + + "ectConditionSetCreateR\023subjectConditionS" + + "et\"t\n!CreateSubjectConditionSetResponse\022" + + "O\n\025subject_condition_set\030\001 \001(\0132\033.policy." + + "SubjectConditionSetR\023subjectConditionSet" + + "\"\374\001\n UpdateSubjectConditionSetRequest\022\026\n" + + "\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\0225\n\014subject_sets\030\002 " + + "\003(\0132\022.policy.SubjectSetR\013subjectSets\0223\n\010" + + "metadata\030d \001(\0132\027.common.MetadataMutableR" + + "\010metadata\022T\n\030metadata_update_behavior\030e " + + "\001(\0162\032.common.MetadataUpdateEnumR\026metadat" + + "aUpdateBehavior\"t\n!UpdateSubjectConditio" + + "nSetResponse\022O\n\025subject_condition_set\030\001 " + + "\001(\0132\033.policy.SubjectConditionSetR\023subjec" + + "tConditionSet\":\n DeleteSubjectConditionS" + + "etRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"t\n!Del" + + "eteSubjectConditionSetResponse\022O\n\025subjec" + + "t_condition_set\030\001 \001(\0132\033.policy.SubjectCo" + + "nditionSetR\023subjectConditionSet2\353\016\n\025Subj" + + "ectMappingService\022\264\001\n\024MatchSubjectMappin" + + "gs\0222.policy.subjectmapping.MatchSubjectM" + + "appingsRequest\0323.policy.subjectmapping.M" + + "atchSubjectMappingsResponse\"3\202\323\344\223\002-\"\027/su" + + "bject-mappings/match:\022subject_properties" + + "\022\227\001\n\023ListSubjectMappings\0221.policy.subjec" + + "tmapping.ListSubjectMappingsRequest\0322.po" + + "licy.subjectmapping.ListSubjectMappingsR" + + "esponse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021G" + + "etSubjectMapping\022/.policy.subjectmapping" + + ".GetSubjectMappingRequest\0320.policy.subje" + + "ctmapping.GetSubjectMappingResponse\"\036\202\323\344" + + "\223\002\030\022\026/subject-mappings/{id}\022\235\001\n\024CreateSu" + + "bjectMapping\0222.policy.subjectmapping.Cre" + + "ateSubjectMappingRequest\0323.policy.subjec" + + "tmapping.CreateSubjectMappingResponse\"\034\202" + + "\323\344\223\002\026\"\021/subject-mappings:\001*\022\242\001\n\024UpdateSu" + + "bjectMapping\0222.policy.subjectmapping.Upd" + + "ateSubjectMappingRequest\0323.policy.subjec" + + "tmapping.UpdateSubjectMappingResponse\"!\202" + + "\323\344\223\002\0332\026/subject-mappings/{id}:\001*\022\237\001\n\024Del" + + "eteSubjectMapping\0222.policy.subjectmappin" + + "g.DeleteSubjectMappingRequest\0323.policy.s" + + "ubjectmapping.DeleteSubjectMappingRespon" + + "se\"\036\202\323\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n\030L" + + "istSubjectConditionSets\0226.policy.subject" + + "mapping.ListSubjectConditionSetsRequest\032" + + "7.policy.subjectmapping.ListSubjectCondi" + + "tionSetsResponse\"\037\202\323\344\223\002\031\022\027/subject-condi" + + "tion-sets\022\253\001\n\026GetSubjectConditionSet\0224.p" + + "olicy.subjectmapping.GetSubjectCondition" + + "SetRequest\0325.policy.subjectmapping.GetSu" + + "bjectConditionSetResponse\"$\202\323\344\223\002\036\022\034/subj" + + "ect-condition-sets/{id}\022\262\001\n\031CreateSubjec" + + "tConditionSet\0227.policy.subjectmapping.Cr" + + "eateSubjectConditionSetRequest\0328.policy." + + "subjectmapping.CreateSubjectConditionSet" + + "Response\"\"\202\323\344\223\002\034\"\027/subject-condition-set" + + "s:\001*\022\267\001\n\031UpdateSubjectConditionSet\0227.pol" + + "icy.subjectmapping.UpdateSubjectConditio" + + "nSetRequest\0328.policy.subjectmapping.Upda" + + "teSubjectConditionSetResponse\"\'\202\323\344\223\002!2\034/" + + "subject-condition-sets/{id}:\001*\022\264\001\n\031Delet" + + "eSubjectConditionSet\0227.policy.subjectmap" + + "ping.DeleteSubjectConditionSetRequest\0328." + + "policy.subjectmapping.DeleteSubjectCondi" + + "tionSetResponse\"$\202\323\344\223\002\036*\034/subject-condit" + + "ion-sets/{id}B\265\001\n)io.opentdf.platform.po" + + "licy.subjectmappingB\023SubjectMappingProto" + + "P\001\242\002\003PSX\252\002\025Policy.Subjectmapping\312\002\025Polic" + + "y\\Subjectmapping\342\002!Policy\\Subjectmapping" + + "\\GPBMetadata\352\002\026Policy::Subjectmappingb\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + build.buf.validate.ValidateProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + io.opentdf.platform.common.CommonProto.getDescriptor(), + io.opentdf.platform.policy.ObjectsProto.getDescriptor(), + }); + internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor, + new java.lang.String[] { "SubjectProperties", }); + internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor, + new java.lang.String[] { "SubjectMappings", }); + internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor, + new java.lang.String[] { "SubjectMapping", }); + internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor, + new java.lang.String[] { }); + internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor, + new java.lang.String[] { "SubjectMappings", }); + internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor, + new java.lang.String[] { "AttributeValueId", "Actions", "ExistingSubjectConditionSetId", "NewSubjectConditionSet", "Metadata", }); + internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor, + new java.lang.String[] { "SubjectMapping", }); + internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor, + new java.lang.String[] { "Id", "SubjectConditionSetId", "Actions", "Metadata", "MetadataUpdateBehavior", }); + internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor, + new java.lang.String[] { "SubjectMapping", }); + internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor, + new java.lang.String[] { "SubjectMapping", }); + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor, + new java.lang.String[] { "SubjectConditionSet", "AssociatedSubjectMappings", }); + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor, + new java.lang.String[] { }); + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor, + new java.lang.String[] { "SubjectConditionSets", }); + internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor, + new java.lang.String[] { "SubjectSets", "Metadata", }); + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor, + new java.lang.String[] { "SubjectConditionSet", }); + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor, + new java.lang.String[] { "SubjectConditionSet", }); + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor, + new java.lang.String[] { "Id", "SubjectSets", "Metadata", "MetadataUpdateBehavior", }); + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor, + new java.lang.String[] { "SubjectConditionSet", }); + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor, + new java.lang.String[] { "SubjectConditionSet", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(build.buf.validate.ValidateProto.field); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + build.buf.validate.ValidateProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + io.opentdf.platform.common.CommonProto.getDescriptor(); + io.opentdf.platform.policy.ObjectsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java new file mode 100644 index 00000000..7ee3b155 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java @@ -0,0 +1,1045 @@ +package io.opentdf.platform.policy.subjectmapping; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.61.1)", + comments = "Source: policy/subjectmapping/subject_mapping.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SubjectMappingServiceGrpc { + + private SubjectMappingServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "policy.subjectmapping.SubjectMappingService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getMatchSubjectMappingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "MatchSubjectMappings", + requestType = io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getMatchSubjectMappingsMethod() { + io.grpc.MethodDescriptor getMatchSubjectMappingsMethod; + if ((getMatchSubjectMappingsMethod = SubjectMappingServiceGrpc.getMatchSubjectMappingsMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getMatchSubjectMappingsMethod = SubjectMappingServiceGrpc.getMatchSubjectMappingsMethod) == null) { + SubjectMappingServiceGrpc.getMatchSubjectMappingsMethod = getMatchSubjectMappingsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MatchSubjectMappings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("MatchSubjectMappings")) + .build(); + } + } + } + return getMatchSubjectMappingsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListSubjectMappingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSubjectMappings", + requestType = io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSubjectMappingsMethod() { + io.grpc.MethodDescriptor getListSubjectMappingsMethod; + if ((getListSubjectMappingsMethod = SubjectMappingServiceGrpc.getListSubjectMappingsMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getListSubjectMappingsMethod = SubjectMappingServiceGrpc.getListSubjectMappingsMethod) == null) { + SubjectMappingServiceGrpc.getListSubjectMappingsMethod = getListSubjectMappingsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSubjectMappings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("ListSubjectMappings")) + .build(); + } + } + } + return getListSubjectMappingsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetSubjectMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSubjectMapping", + requestType = io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSubjectMappingMethod() { + io.grpc.MethodDescriptor getGetSubjectMappingMethod; + if ((getGetSubjectMappingMethod = SubjectMappingServiceGrpc.getGetSubjectMappingMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getGetSubjectMappingMethod = SubjectMappingServiceGrpc.getGetSubjectMappingMethod) == null) { + SubjectMappingServiceGrpc.getGetSubjectMappingMethod = getGetSubjectMappingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubjectMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("GetSubjectMapping")) + .build(); + } + } + } + return getGetSubjectMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateSubjectMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSubjectMapping", + requestType = io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateSubjectMappingMethod() { + io.grpc.MethodDescriptor getCreateSubjectMappingMethod; + if ((getCreateSubjectMappingMethod = SubjectMappingServiceGrpc.getCreateSubjectMappingMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getCreateSubjectMappingMethod = SubjectMappingServiceGrpc.getCreateSubjectMappingMethod) == null) { + SubjectMappingServiceGrpc.getCreateSubjectMappingMethod = getCreateSubjectMappingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSubjectMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("CreateSubjectMapping")) + .build(); + } + } + } + return getCreateSubjectMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateSubjectMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSubjectMapping", + requestType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateSubjectMappingMethod() { + io.grpc.MethodDescriptor getUpdateSubjectMappingMethod; + if ((getUpdateSubjectMappingMethod = SubjectMappingServiceGrpc.getUpdateSubjectMappingMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getUpdateSubjectMappingMethod = SubjectMappingServiceGrpc.getUpdateSubjectMappingMethod) == null) { + SubjectMappingServiceGrpc.getUpdateSubjectMappingMethod = getUpdateSubjectMappingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSubjectMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("UpdateSubjectMapping")) + .build(); + } + } + } + return getUpdateSubjectMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteSubjectMappingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSubjectMapping", + requestType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteSubjectMappingMethod() { + io.grpc.MethodDescriptor getDeleteSubjectMappingMethod; + if ((getDeleteSubjectMappingMethod = SubjectMappingServiceGrpc.getDeleteSubjectMappingMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getDeleteSubjectMappingMethod = SubjectMappingServiceGrpc.getDeleteSubjectMappingMethod) == null) { + SubjectMappingServiceGrpc.getDeleteSubjectMappingMethod = getDeleteSubjectMappingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubjectMapping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("DeleteSubjectMapping")) + .build(); + } + } + } + return getDeleteSubjectMappingMethod; + } + + private static volatile io.grpc.MethodDescriptor getListSubjectConditionSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSubjectConditionSets", + requestType = io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSubjectConditionSetsMethod() { + io.grpc.MethodDescriptor getListSubjectConditionSetsMethod; + if ((getListSubjectConditionSetsMethod = SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getListSubjectConditionSetsMethod = SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod) == null) { + SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod = getListSubjectConditionSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSubjectConditionSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("ListSubjectConditionSets")) + .build(); + } + } + } + return getListSubjectConditionSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetSubjectConditionSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSubjectConditionSet", + requestType = io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSubjectConditionSetMethod() { + io.grpc.MethodDescriptor getGetSubjectConditionSetMethod; + if ((getGetSubjectConditionSetMethod = SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getGetSubjectConditionSetMethod = SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod) == null) { + SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod = getGetSubjectConditionSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubjectConditionSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("GetSubjectConditionSet")) + .build(); + } + } + } + return getGetSubjectConditionSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSubjectConditionSet", + requestType = io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod() { + io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod; + if ((getCreateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getCreateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod) == null) { + SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod = getCreateSubjectConditionSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSubjectConditionSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("CreateSubjectConditionSet")) + .build(); + } + } + } + return getCreateSubjectConditionSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSubjectConditionSet", + requestType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod() { + io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod; + if ((getUpdateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getUpdateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod) == null) { + SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod = getUpdateSubjectConditionSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSubjectConditionSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("UpdateSubjectConditionSet")) + .build(); + } + } + } + return getUpdateSubjectConditionSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSubjectConditionSet", + requestType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod() { + io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod; + if ((getDeleteSubjectConditionSetMethod = SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getDeleteSubjectConditionSetMethod = SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod) == null) { + SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod = getDeleteSubjectConditionSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubjectConditionSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("DeleteSubjectConditionSet")) + .build(); + } + } + } + return getDeleteSubjectConditionSetMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static SubjectMappingServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SubjectMappingServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SubjectMappingServiceStub(channel, callOptions); + } + }; + return SubjectMappingServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SubjectMappingServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SubjectMappingServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SubjectMappingServiceBlockingStub(channel, callOptions); + } + }; + return SubjectMappingServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static SubjectMappingServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SubjectMappingServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SubjectMappingServiceFutureStub(channel, callOptions); + } + }; + return SubjectMappingServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + *
+     * Find matching Subject Mappings for a given Subject
+     * 
+ */ + default void matchSubjectMappings(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMatchSubjectMappingsMethod(), responseObserver); + } + + /** + */ + default void listSubjectMappings(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSubjectMappingsMethod(), responseObserver); + } + + /** + */ + default void getSubjectMapping(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubjectMappingMethod(), responseObserver); + } + + /** + */ + default void createSubjectMapping(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSubjectMappingMethod(), responseObserver); + } + + /** + */ + default void updateSubjectMapping(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSubjectMappingMethod(), responseObserver); + } + + /** + */ + default void deleteSubjectMapping(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubjectMappingMethod(), responseObserver); + } + + /** + */ + default void listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSubjectConditionSetsMethod(), responseObserver); + } + + /** + */ + default void getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubjectConditionSetMethod(), responseObserver); + } + + /** + */ + default void createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSubjectConditionSetMethod(), responseObserver); + } + + /** + */ + default void updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSubjectConditionSetMethod(), responseObserver); + } + + /** + */ + default void deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubjectConditionSetMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service SubjectMappingService. + */ + public static abstract class SubjectMappingServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return SubjectMappingServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service SubjectMappingService. + */ + public static final class SubjectMappingServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private SubjectMappingServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SubjectMappingServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SubjectMappingServiceStub(channel, callOptions); + } + + /** + *
+     * Find matching Subject Mappings for a given Subject
+     * 
+ */ + public void matchSubjectMappings(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getMatchSubjectMappingsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listSubjectMappings(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSubjectMappingsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getSubjectMapping(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSubjectMappingMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void createSubjectMapping(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSubjectMappingMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void updateSubjectMapping(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSubjectMappingMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteSubjectMapping(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSubjectMappingMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSubjectConditionSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service SubjectMappingService. + */ + public static final class SubjectMappingServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SubjectMappingServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SubjectMappingServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SubjectMappingServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * Find matching Subject Mappings for a given Subject
+     * 
+ */ + public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse matchSubjectMappings(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getMatchSubjectMappingsMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse listSubjectMappings(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSubjectMappingsMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse getSubjectMapping(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSubjectMappingMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse createSubjectMapping(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSubjectMappingMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse updateSubjectMapping(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSubjectMappingMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse deleteSubjectMapping(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSubjectMappingMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSubjectConditionSetsMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSubjectConditionSetMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSubjectConditionSetMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSubjectConditionSetMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSubjectConditionSetMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service SubjectMappingService. + */ + public static final class SubjectMappingServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SubjectMappingServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SubjectMappingServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SubjectMappingServiceFutureStub(channel, callOptions); + } + + /** + *
+     * Find matching Subject Mappings for a given Subject
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture matchSubjectMappings( + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getMatchSubjectMappingsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listSubjectMappings( + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSubjectMappingsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSubjectMapping( + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSubjectMappingMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createSubjectMapping( + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSubjectMappingMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateSubjectMapping( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSubjectMappingMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteSubjectMapping( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSubjectMappingMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listSubjectConditionSets( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSubjectConditionSetsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSubjectConditionSetMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSubjectConditionSetMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSubjectConditionSetMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSubjectConditionSetMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_MATCH_SUBJECT_MAPPINGS = 0; + private static final int METHODID_LIST_SUBJECT_MAPPINGS = 1; + private static final int METHODID_GET_SUBJECT_MAPPING = 2; + private static final int METHODID_CREATE_SUBJECT_MAPPING = 3; + private static final int METHODID_UPDATE_SUBJECT_MAPPING = 4; + private static final int METHODID_DELETE_SUBJECT_MAPPING = 5; + private static final int METHODID_LIST_SUBJECT_CONDITION_SETS = 6; + private static final int METHODID_GET_SUBJECT_CONDITION_SET = 7; + private static final int METHODID_CREATE_SUBJECT_CONDITION_SET = 8; + private static final int METHODID_UPDATE_SUBJECT_CONDITION_SET = 9; + private static final int METHODID_DELETE_SUBJECT_CONDITION_SET = 10; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_MATCH_SUBJECT_MAPPINGS: + serviceImpl.matchSubjectMappings((io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SUBJECT_MAPPINGS: + serviceImpl.listSubjectMappings((io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SUBJECT_MAPPING: + serviceImpl.getSubjectMapping((io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SUBJECT_MAPPING: + serviceImpl.createSubjectMapping((io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SUBJECT_MAPPING: + serviceImpl.updateSubjectMapping((io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SUBJECT_MAPPING: + serviceImpl.deleteSubjectMapping((io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SUBJECT_CONDITION_SETS: + serviceImpl.listSubjectConditionSets((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SUBJECT_CONDITION_SET: + serviceImpl.getSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SUBJECT_CONDITION_SET: + serviceImpl.createSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SUBJECT_CONDITION_SET: + serviceImpl.updateSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SUBJECT_CONDITION_SET: + serviceImpl.deleteSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getMatchSubjectMappingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest, + io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse>( + service, METHODID_MATCH_SUBJECT_MAPPINGS))) + .addMethod( + getListSubjectMappingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest, + io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse>( + service, METHODID_LIST_SUBJECT_MAPPINGS))) + .addMethod( + getGetSubjectMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest, + io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse>( + service, METHODID_GET_SUBJECT_MAPPING))) + .addMethod( + getCreateSubjectMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest, + io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse>( + service, METHODID_CREATE_SUBJECT_MAPPING))) + .addMethod( + getUpdateSubjectMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest, + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse>( + service, METHODID_UPDATE_SUBJECT_MAPPING))) + .addMethod( + getDeleteSubjectMappingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest, + io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse>( + service, METHODID_DELETE_SUBJECT_MAPPING))) + .addMethod( + getListSubjectConditionSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest, + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse>( + service, METHODID_LIST_SUBJECT_CONDITION_SETS))) + .addMethod( + getGetSubjectConditionSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest, + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse>( + service, METHODID_GET_SUBJECT_CONDITION_SET))) + .addMethod( + getCreateSubjectConditionSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest, + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse>( + service, METHODID_CREATE_SUBJECT_CONDITION_SET))) + .addMethod( + getUpdateSubjectConditionSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest, + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse>( + service, METHODID_UPDATE_SUBJECT_CONDITION_SET))) + .addMethod( + getDeleteSubjectConditionSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest, + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse>( + service, METHODID_DELETE_SUBJECT_CONDITION_SET))) + .build(); + } + + private static abstract class SubjectMappingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SubjectMappingServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SubjectMappingService"); + } + } + + private static final class SubjectMappingServiceFileDescriptorSupplier + extends SubjectMappingServiceBaseDescriptorSupplier { + SubjectMappingServiceFileDescriptorSupplier() {} + } + + private static final class SubjectMappingServiceMethodDescriptorSupplier + extends SubjectMappingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SubjectMappingServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SubjectMappingServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SubjectMappingServiceFileDescriptorSupplier()) + .addMethod(getMatchSubjectMappingsMethod()) + .addMethod(getListSubjectMappingsMethod()) + .addMethod(getGetSubjectMappingMethod()) + .addMethod(getCreateSubjectMappingMethod()) + .addMethod(getUpdateSubjectMappingMethod()) + .addMethod(getDeleteSubjectMappingMethod()) + .addMethod(getListSubjectConditionSetsMethod()) + .addMethod(getGetSubjectConditionSetMethod()) + .addMethod(getCreateSubjectConditionSetMethod()) + .addMethod(getUpdateSubjectConditionSetMethod()) + .addMethod(getDeleteSubjectConditionSetMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java new file mode 100644 index 00000000..2160334d --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java @@ -0,0 +1,1375 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.UpdateSubjectConditionSetRequest} + */ +public final class UpdateSubjectConditionSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectConditionSetRequest) + UpdateSubjectConditionSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateSubjectConditionSetRequest.newBuilder() to construct. + private UpdateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateSubjectConditionSetRequest() { + id_ = ""; + subjectSets_ = java.util.Collections.emptyList(); + metadataUpdateBehavior_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateSubjectConditionSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_SETS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List subjectSets_; + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + @java.lang.Override + public java.util.List getSubjectSetsList() { + return subjectSets_; + } + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + @java.lang.Override + public java.util.List + getSubjectSetsOrBuilderList() { + return subjectSets_; + } + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + @java.lang.Override + public int getSubjectSetsCount() { + return subjectSets_.size(); + } + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { + return subjectSets_.get(index); + } + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + return subjectSets_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + for (int i = 0; i < subjectSets_.size(); i++) { + output.writeMessage(2, subjectSets_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + for (int i = 0; i < subjectSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, subjectSets_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(101, metadataUpdateBehavior_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getSubjectSetsList() + .equals(other.getSubjectSetsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getSubjectSetsCount() > 0) { + hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectSetsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.UpdateSubjectConditionSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectConditionSetRequest) + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectSetsFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + } else { + subjectSets_ = null; + subjectSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest build() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { + if (subjectSetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.subjectSets_ = subjectSets_; + } else { + result.subjectSets_ = subjectSetsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (subjectSetsBuilder_ == null) { + if (!other.subjectSets_.isEmpty()) { + if (subjectSets_.isEmpty()) { + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSubjectSetsIsMutable(); + subjectSets_.addAll(other.subjectSets_); + } + onChanged(); + } + } else { + if (!other.subjectSets_.isEmpty()) { + if (subjectSetsBuilder_.isEmpty()) { + subjectSetsBuilder_.dispose(); + subjectSetsBuilder_ = null; + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000002); + subjectSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectSetsFieldBuilder() : null; + } else { + subjectSetsBuilder_.addAllMessages(other.subjectSets_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.opentdf.platform.policy.SubjectSet m = + input.readMessage( + io.opentdf.platform.policy.SubjectSet.parser(), + extensionRegistry); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(m); + } else { + subjectSetsBuilder_.addMessage(m); + } + break; + } // case 18 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 808 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List subjectSets_ = + java.util.Collections.emptyList(); + private void ensureSubjectSetsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + subjectSets_ = new java.util.ArrayList(subjectSets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> subjectSetsBuilder_; + + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public java.util.List getSubjectSetsList() { + if (subjectSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectSets_); + } else { + return subjectSetsBuilder_.getMessageList(); + } + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public int getSubjectSetsCount() { + if (subjectSetsBuilder_ == null) { + return subjectSets_.size(); + } else { + return subjectSetsBuilder_.getCount(); + } + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); + } else { + return subjectSetsBuilder_.getMessage(index); + } + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder setSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, value); + onChanged(); + } else { + subjectSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder setSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder addSubjectSets(io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.add(value); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder addSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, value); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder addSubjectSets( + io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder addSubjectSets( + int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder addAllSubjectSets( + java.lang.Iterable values) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectSets_); + onChanged(); + } else { + subjectSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder clearSubjectSets() { + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + subjectSetsBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public Builder removeSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.remove(index); + onChanged(); + } else { + subjectSetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.SubjectSet.Builder getSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().getBuilder(index); + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); } else { + return subjectSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public java.util.List + getSubjectSetsOrBuilderList() { + if (subjectSetsBuilder_ != null) { + return subjectSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectSets_); + } + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder() { + return getSubjectSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); + } + /** + *
+     * Optional
+     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+     * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + public java.util.List + getSubjectSetsBuilderList() { + return getSubjectSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> + getSubjectSetsFieldBuilder() { + if (subjectSetsBuilder_ == null) { + subjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder>( + subjectSets_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + subjectSets_ = null; + } + return subjectSetsBuilder_; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000008); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectConditionSetRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectConditionSetRequest) + private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSubjectConditionSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java new file mode 100644 index 00000000..f75f6798 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface UpdateSubjectConditionSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectConditionSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + java.util.List + getSubjectSetsList(); + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + io.opentdf.platform.policy.SubjectSet getSubjectSets(int index); + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + int getSubjectSetsCount(); + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + java.util.List + getSubjectSetsOrBuilderList(); + /** + *
+   * Optional
+   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
+   * 
+ * + * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; + */ + io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java new file mode 100644 index 00000000..632dbafd --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java @@ -0,0 +1,647 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.UpdateSubjectConditionSetResponse} + */ +public final class UpdateSubjectConditionSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectConditionSetResponse) + UpdateSubjectConditionSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateSubjectConditionSetResponse.newBuilder() to construct. + private UpdateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateSubjectConditionSetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateSubjectConditionSetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + /** + *
+   * Only ID of updated Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Only ID of updated Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + *
+   * Only ID of updated Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectConditionSet()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectConditionSet()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.UpdateSubjectConditionSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectConditionSetResponse) + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse build() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + *
+     * Only ID of updated Subject Condition Set provided
+     * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectConditionSetResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectConditionSetResponse) + private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSubjectConditionSetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java new file mode 100644 index 00000000..3898eeb4 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface UpdateSubjectConditionSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectConditionSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Only ID of updated Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + *
+   * Only ID of updated Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); + /** + *
+   * Only ID of updated Subject Condition Set provided
+   * 
+ * + * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java new file mode 100644 index 00000000..c74f594b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java @@ -0,0 +1,1523 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingRequest} + */ +public final class UpdateSubjectMappingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectMappingRequest) + UpdateSubjectMappingRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateSubjectMappingRequest.newBuilder() to construct. + private UpdateSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateSubjectMappingRequest() { + id_ = ""; + subjectConditionSetId_ = ""; + actions_ = java.util.Collections.emptyList(); + metadataUpdateBehavior_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateSubjectMappingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object subjectConditionSetId_ = ""; + /** + *
+   * Optional
+   * Replaces the existing SubjectConditionSet id with a new one
+   * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The subjectConditionSetId. + */ + @java.lang.Override + public java.lang.String getSubjectConditionSetId() { + java.lang.Object ref = subjectConditionSetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectConditionSetId_ = s; + return s; + } + } + /** + *
+   * Optional
+   * Replaces the existing SubjectConditionSet id with a new one
+   * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The bytes for subjectConditionSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectConditionSetIdBytes() { + java.lang.Object ref = subjectConditionSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIONS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List actions_; + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.Action getActions(int index) { + return actions_.get(index); + } + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectConditionSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subjectConditionSetId_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(3, actions_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectConditionSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subjectConditionSetId_); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, actions_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); + } + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(101, metadataUpdateBehavior_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getSubjectConditionSetId() + .equals(other.getSubjectConditionSetId())) return false; + if (!getActionsList() + .equals(other.getActionsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSetId().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectMappingRequest) + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getActionsFieldBuilder(); + getMetadataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + subjectConditionSetId_ = ""; + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest build() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subjectConditionSetId_ = subjectConditionSetId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSubjectConditionSetId().isEmpty()) { + subjectConditionSetId_ = other.subjectConditionSetId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000004); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionsFieldBuilder() : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + subjectConditionSetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.opentdf.platform.policy.Action m = + input.readMessage( + io.opentdf.platform.policy.Action.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 26 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 808 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required
+     * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object subjectConditionSetId_ = ""; + /** + *
+     * Optional
+     * Replaces the existing SubjectConditionSet id with a new one
+     * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The subjectConditionSetId. + */ + public java.lang.String getSubjectConditionSetId() { + java.lang.Object ref = subjectConditionSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectConditionSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional
+     * Replaces the existing SubjectConditionSet id with a new one
+     * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The bytes for subjectConditionSetId. + */ + public com.google.protobuf.ByteString + getSubjectConditionSetIdBytes() { + java.lang.Object ref = subjectConditionSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional
+     * Replaces the existing SubjectConditionSet id with a new one
+     * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @param value The subjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setSubjectConditionSetId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subjectConditionSetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional
+     * Replaces the existing SubjectConditionSet id with a new one
+     * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return This builder for chaining. + */ + public Builder clearSubjectConditionSetId() { + subjectConditionSetId_ = getDefaultInstance().getSubjectConditionSetId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional
+     * Replaces the existing SubjectConditionSet id with a new one
+     * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @param value The bytes for subjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setSubjectConditionSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subjectConditionSetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionsBuilder_; + + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder setActions( + int index, io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder setActions( + int index, io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder addActions(io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder addActions( + int index, io.opentdf.platform.policy.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder addActions( + io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder addActions( + int index, io.opentdf.platform.policy.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder getActionsBuilder( + int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( + io.opentdf.platform.policy.Action.getDefaultInstance()); + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public io.opentdf.platform.policy.Action.Builder addActionsBuilder( + int index) { + return getActionsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.Action.getDefaultInstance()); + } + /** + *
+     * Replaces entire list of actions permitted by subjects
+     * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( + actions_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + private io.opentdf.platform.common.MetadataMutable metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Common metadata
+     * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000010); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectMappingRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectMappingRequest) + private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSubjectMappingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java new file mode 100644 index 00000000..fd54087a --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface UpdateSubjectMappingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectMappingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Required
+   * 
+ * + * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional
+   * Replaces the existing SubjectConditionSet id with a new one
+   * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The subjectConditionSetId. + */ + java.lang.String getSubjectConditionSetId(); + /** + *
+   * Optional
+   * Replaces the existing SubjectConditionSet id with a new one
+   * 
+ * + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The bytes for subjectConditionSetId. + */ + com.google.protobuf.ByteString + getSubjectConditionSetIdBytes(); + + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + java.util.List + getActionsList(); + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + io.opentdf.platform.policy.Action getActions(int index); + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + int getActionsCount(); + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + java.util.List + getActionsOrBuilderList(); + /** + *
+   * Replaces entire list of actions permitted by subjects
+   * 
+ * + * repeated .policy.Action actions = 3 [json_name = "actions"]; + */ + io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( + int index); + + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
+   * Common metadata
+   * 
+ * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java new file mode 100644 index 00000000..9a637a25 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java @@ -0,0 +1,647 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +/** + * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingResponse} + */ +public final class UpdateSubjectMappingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectMappingResponse) + UpdateSubjectMappingResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateSubjectMappingResponse.newBuilder() to construct. + private UpdateSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateSubjectMappingResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateSubjectMappingResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.SubjectMapping subjectMapping_; + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + @java.lang.Override + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSubjectMapping()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSubjectMapping()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse) obj; + + if (hasSubjectMapping() != other.hasSubjectMapping()) return false; + if (hasSubjectMapping()) { + if (!getSubjectMapping() + .equals(other.getSubjectMapping())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubjectMapping()) { + hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMapping().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectMappingResponse) + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectMappingFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse build() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectMapping_ = subjectMappingBuilder_ == null + ? subjectMapping_ + : subjectMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.getDefaultInstance()) return this; + if (other.hasSubjectMapping()) { + mergeSubjectMapping(other.getSubjectMapping()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getSubjectMappingFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private io.opentdf.platform.policy.SubjectMapping subjectMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingBuilder_; + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { + if (subjectMappingBuilder_ == null) { + return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } else { + return subjectMappingBuilder_.getMessage(); + } + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder setSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectMapping_ = value; + } else { + subjectMappingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder setSubjectMapping( + io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { + if (subjectMappingBuilder_ == null) { + subjectMapping_ = builderForValue.build(); + } else { + subjectMappingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder mergeSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectMapping_ != null && + subjectMapping_ != io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) { + getSubjectMappingBuilder().mergeFrom(value); + } else { + subjectMapping_ = value; + } + } else { + subjectMappingBuilder_.mergeFrom(value); + } + if (subjectMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder clearSubjectMapping() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectMappingFieldBuilder().getBuilder(); + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + if (subjectMappingBuilder_ != null) { + return subjectMappingBuilder_.getMessageOrBuilder(); + } else { + return subjectMapping_ == null ? + io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + } + /** + *
+     * Only ID of the updated Subject Mapping provided
+     * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> + getSubjectMappingFieldBuilder() { + if (subjectMappingBuilder_ == null) { + subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( + getSubjectMapping(), + getParentForChildren(), + isClean()); + subjectMapping_ = null; + } + return subjectMappingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectMappingResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectMappingResponse) + private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSubjectMappingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java new file mode 100644 index 00000000..a7ff6687 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface UpdateSubjectMappingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectMappingResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. + */ + boolean hasSubjectMapping(); + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + io.opentdf.platform.policy.SubjectMapping getSubjectMapping(); + /** + *
+   * Only ID of the updated Subject Mapping provided
+   * 
+ * + * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequest.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequest.java new file mode 100644 index 00000000..6d47a9ff --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequest.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wellknownconfiguration/wellknown_configuration.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.wellknownconfiguration; + +/** + * Protobuf type {@code wellknownconfiguration.GetWellKnownConfigurationRequest} + */ +public final class GetWellKnownConfigurationRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:wellknownconfiguration.GetWellKnownConfigurationRequest) + GetWellKnownConfigurationRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetWellKnownConfigurationRequest.newBuilder() to construct. + private GetWellKnownConfigurationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetWellKnownConfigurationRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetWellKnownConfigurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.class, io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest)) { + return super.equals(obj); + } + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest other = (io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code wellknownconfiguration.GetWellKnownConfigurationRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:wellknownconfiguration.GetWellKnownConfigurationRequest) + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.class, io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.Builder.class); + } + + // Construct using io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest getDefaultInstanceForType() { + return io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest build() { + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest buildPartial() { + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest result = new io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest) { + return mergeFrom((io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest other) { + if (other == io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:wellknownconfiguration.GetWellKnownConfigurationRequest) + } + + // @@protoc_insertion_point(class_scope:wellknownconfiguration.GetWellKnownConfigurationRequest) + private static final io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest(); + } + + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetWellKnownConfigurationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequestOrBuilder.java new file mode 100644 index 00000000..cac3e4da --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequestOrBuilder.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wellknownconfiguration/wellknown_configuration.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.wellknownconfiguration; + +public interface GetWellKnownConfigurationRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:wellknownconfiguration.GetWellKnownConfigurationRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponse.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponse.java new file mode 100644 index 00000000..d0b17955 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponse.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wellknownconfiguration/wellknown_configuration.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.wellknownconfiguration; + +/** + * Protobuf type {@code wellknownconfiguration.GetWellKnownConfigurationResponse} + */ +public final class GetWellKnownConfigurationResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:wellknownconfiguration.GetWellKnownConfigurationResponse) + GetWellKnownConfigurationResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetWellKnownConfigurationResponse.newBuilder() to construct. + private GetWellKnownConfigurationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetWellKnownConfigurationResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetWellKnownConfigurationResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.class, io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.Builder.class); + } + + private int bitField0_; + public static final int CONFIGURATION_FIELD_NUMBER = 1; + private com.google.protobuf.Struct configuration_; + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + * @return Whether the configuration field is set. + */ + @java.lang.Override + public boolean hasConfiguration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + * @return The configuration. + */ + @java.lang.Override + public com.google.protobuf.Struct getConfiguration() { + return configuration_ == null ? com.google.protobuf.Struct.getDefaultInstance() : configuration_; + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getConfigurationOrBuilder() { + return configuration_ == null ? com.google.protobuf.Struct.getDefaultInstance() : configuration_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getConfiguration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConfiguration()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse)) { + return super.equals(obj); + } + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse other = (io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse) obj; + + if (hasConfiguration() != other.hasConfiguration()) return false; + if (hasConfiguration()) { + if (!getConfiguration() + .equals(other.getConfiguration())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConfiguration()) { + hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getConfiguration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code wellknownconfiguration.GetWellKnownConfigurationResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:wellknownconfiguration.GetWellKnownConfigurationResponse) + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.class, io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.Builder.class); + } + + // Construct using io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getConfigurationFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + configuration_ = null; + if (configurationBuilder_ != null) { + configurationBuilder_.dispose(); + configurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse getDefaultInstanceForType() { + return io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse build() { + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse buildPartial() { + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse result = new io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.configuration_ = configurationBuilder_ == null + ? configuration_ + : configurationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse) { + return mergeFrom((io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse other) { + if (other == io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.getDefaultInstance()) return this; + if (other.hasConfiguration()) { + mergeConfiguration(other.getConfiguration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getConfigurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Struct configuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> configurationBuilder_; + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + * @return Whether the configuration field is set. + */ + public boolean hasConfiguration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + * @return The configuration. + */ + public com.google.protobuf.Struct getConfiguration() { + if (configurationBuilder_ == null) { + return configuration_ == null ? com.google.protobuf.Struct.getDefaultInstance() : configuration_; + } else { + return configurationBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + public Builder setConfiguration(com.google.protobuf.Struct value) { + if (configurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configuration_ = value; + } else { + configurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + public Builder setConfiguration( + com.google.protobuf.Struct.Builder builderForValue) { + if (configurationBuilder_ == null) { + configuration_ = builderForValue.build(); + } else { + configurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + public Builder mergeConfiguration(com.google.protobuf.Struct value) { + if (configurationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + configuration_ != null && + configuration_ != com.google.protobuf.Struct.getDefaultInstance()) { + getConfigurationBuilder().mergeFrom(value); + } else { + configuration_ = value; + } + } else { + configurationBuilder_.mergeFrom(value); + } + if (configuration_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + public Builder clearConfiguration() { + bitField0_ = (bitField0_ & ~0x00000001); + configuration_ = null; + if (configurationBuilder_ != null) { + configurationBuilder_.dispose(); + configurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + public com.google.protobuf.Struct.Builder getConfigurationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConfigurationFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + public com.google.protobuf.StructOrBuilder getConfigurationOrBuilder() { + if (configurationBuilder_ != null) { + return configurationBuilder_.getMessageOrBuilder(); + } else { + return configuration_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : configuration_; + } + } + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getConfigurationFieldBuilder() { + if (configurationBuilder_ == null) { + configurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getConfiguration(), + getParentForChildren(), + isClean()); + configuration_ = null; + } + return configurationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:wellknownconfiguration.GetWellKnownConfigurationResponse) + } + + // @@protoc_insertion_point(class_scope:wellknownconfiguration.GetWellKnownConfigurationResponse) + private static final io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse(); + } + + public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetWellKnownConfigurationResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponseOrBuilder.java new file mode 100644 index 00000000..357a6a7f --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponseOrBuilder.java @@ -0,0 +1,25 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wellknownconfiguration/wellknown_configuration.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.wellknownconfiguration; + +public interface GetWellKnownConfigurationResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:wellknownconfiguration.GetWellKnownConfigurationResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + * @return Whether the configuration field is set. + */ + boolean hasConfiguration(); + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + * @return The configuration. + */ + com.google.protobuf.Struct getConfiguration(); + /** + * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; + */ + com.google.protobuf.StructOrBuilder getConfigurationOrBuilder(); +} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfig.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfig.java new file mode 100644 index 00000000..e271975b --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfig.java @@ -0,0 +1,712 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wellknownconfiguration/wellknown_configuration.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.wellknownconfiguration; + +/** + * Protobuf type {@code wellknownconfiguration.WellKnownConfig} + */ +public final class WellKnownConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:wellknownconfiguration.WellKnownConfig) + WellKnownConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use WellKnownConfig.newBuilder() to construct. + private WellKnownConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WellKnownConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WellKnownConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetConfiguration(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.wellknownconfiguration.WellKnownConfig.class, io.opentdf.platform.wellknownconfiguration.WellKnownConfig.Builder.class); + } + + public static final int CONFIGURATION_FIELD_NUMBER = 1; + private static final class ConfigurationDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Struct> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Struct.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Struct> configuration_; + private com.google.protobuf.MapField + internalGetConfiguration() { + if (configuration_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConfigurationDefaultEntryHolder.defaultEntry); + } + return configuration_; + } + public int getConfigurationCount() { + return internalGetConfiguration().getMap().size(); + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public boolean containsConfiguration( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfiguration().getMap().containsKey(key); + } + /** + * Use {@link #getConfigurationMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfiguration() { + return getConfigurationMap(); + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public java.util.Map getConfigurationMap() { + return internalGetConfiguration().getMap(); + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Struct getConfigurationOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Struct defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfiguration().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public com.google.protobuf.Struct getConfigurationOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetConfiguration().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetConfiguration(), + ConfigurationDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetConfiguration().getMap().entrySet()) { + com.google.protobuf.MapEntry + configuration__ = ConfigurationDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, configuration__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.wellknownconfiguration.WellKnownConfig)) { + return super.equals(obj); + } + io.opentdf.platform.wellknownconfiguration.WellKnownConfig other = (io.opentdf.platform.wellknownconfiguration.WellKnownConfig) obj; + + if (!internalGetConfiguration().equals( + other.internalGetConfiguration())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetConfiguration().getMap().isEmpty()) { + hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + internalGetConfiguration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.wellknownconfiguration.WellKnownConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code wellknownconfiguration.WellKnownConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:wellknownconfiguration.WellKnownConfig) + io.opentdf.platform.wellknownconfiguration.WellKnownConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetConfiguration(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableConfiguration(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.wellknownconfiguration.WellKnownConfig.class, io.opentdf.platform.wellknownconfiguration.WellKnownConfig.Builder.class); + } + + // Construct using io.opentdf.platform.wellknownconfiguration.WellKnownConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableConfiguration().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.WellKnownConfig getDefaultInstanceForType() { + return io.opentdf.platform.wellknownconfiguration.WellKnownConfig.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.WellKnownConfig build() { + io.opentdf.platform.wellknownconfiguration.WellKnownConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.WellKnownConfig buildPartial() { + io.opentdf.platform.wellknownconfiguration.WellKnownConfig result = new io.opentdf.platform.wellknownconfiguration.WellKnownConfig(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.wellknownconfiguration.WellKnownConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.configuration_ = internalGetConfiguration().build(ConfigurationDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.wellknownconfiguration.WellKnownConfig) { + return mergeFrom((io.opentdf.platform.wellknownconfiguration.WellKnownConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.wellknownconfiguration.WellKnownConfig other) { + if (other == io.opentdf.platform.wellknownconfiguration.WellKnownConfig.getDefaultInstance()) return this; + internalGetMutableConfiguration().mergeFrom( + other.internalGetConfiguration()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + configuration__ = input.readMessage( + ConfigurationDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableConfiguration().ensureBuilderMap().put( + configuration__.getKey(), configuration__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private static final class ConfigurationConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Struct build(com.google.protobuf.StructOrBuilder val) { + if (val instanceof com.google.protobuf.Struct) { return (com.google.protobuf.Struct) val; } + return ((com.google.protobuf.Struct.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ConfigurationDefaultEntryHolder.defaultEntry; + } + }; + private static final ConfigurationConverter configurationConverter = new ConfigurationConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.StructOrBuilder, com.google.protobuf.Struct, com.google.protobuf.Struct.Builder> configuration_; + private com.google.protobuf.MapFieldBuilder + internalGetConfiguration() { + if (configuration_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(configurationConverter); + } + return configuration_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableConfiguration() { + if (configuration_ == null) { + configuration_ = new com.google.protobuf.MapFieldBuilder<>(configurationConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return configuration_; + } + public int getConfigurationCount() { + return internalGetConfiguration().ensureBuilderMap().size(); + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public boolean containsConfiguration( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetConfiguration().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getConfigurationMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConfiguration() { + return getConfigurationMap(); + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public java.util.Map getConfigurationMap() { + return internalGetConfiguration().getImmutableMap(); + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Struct getConfigurationOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Struct defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableConfiguration().ensureBuilderMap(); + return map.containsKey(key) ? configurationConverter.build(map.get(key)) : defaultValue; + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + @java.lang.Override + public com.google.protobuf.Struct getConfigurationOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableConfiguration().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return configurationConverter.build(map.get(key)); + } + public Builder clearConfiguration() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableConfiguration().clear(); + return this; + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + public Builder removeConfiguration( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableConfiguration().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableConfiguration() { + bitField0_ |= 0x00000001; + return internalGetMutableConfiguration().ensureMessageMap(); + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + public Builder putConfiguration( + java.lang.String key, + com.google.protobuf.Struct value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableConfiguration().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + public Builder putAllConfiguration( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableConfiguration().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + public com.google.protobuf.Struct.Builder putConfigurationBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableConfiguration().ensureBuilderMap(); + com.google.protobuf.StructOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Struct.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Struct) { + entry = ((com.google.protobuf.Struct) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Struct.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:wellknownconfiguration.WellKnownConfig) + } + + // @@protoc_insertion_point(class_scope:wellknownconfiguration.WellKnownConfig) + private static final io.opentdf.platform.wellknownconfiguration.WellKnownConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.wellknownconfiguration.WellKnownConfig(); + } + + public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WellKnownConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.wellknownconfiguration.WellKnownConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfigOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfigOrBuilder.java new file mode 100644 index 00000000..3cd17c0e --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfigOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wellknownconfiguration/wellknown_configuration.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.wellknownconfiguration; + +public interface WellKnownConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:wellknownconfiguration.WellKnownConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + int getConfigurationCount(); + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + boolean containsConfiguration( + java.lang.String key); + /** + * Use {@link #getConfigurationMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getConfiguration(); + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + java.util.Map + getConfigurationMap(); + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + /* nullable */ +com.google.protobuf.Struct getConfigurationOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Struct defaultValue); + /** + * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; + */ + com.google.protobuf.Struct getConfigurationOrThrow( + java.lang.String key); +} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownServiceGrpc.java new file mode 100644 index 00000000..c2a22be7 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownServiceGrpc.java @@ -0,0 +1,293 @@ +package io.opentdf.platform.wellknownconfiguration; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.61.1)", + comments = "Source: wellknownconfiguration/wellknown_configuration.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class WellKnownServiceGrpc { + + private WellKnownServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "wellknownconfiguration.WellKnownService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetWellKnownConfigurationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetWellKnownConfiguration", + requestType = io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.class, + responseType = io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetWellKnownConfigurationMethod() { + io.grpc.MethodDescriptor getGetWellKnownConfigurationMethod; + if ((getGetWellKnownConfigurationMethod = WellKnownServiceGrpc.getGetWellKnownConfigurationMethod) == null) { + synchronized (WellKnownServiceGrpc.class) { + if ((getGetWellKnownConfigurationMethod = WellKnownServiceGrpc.getGetWellKnownConfigurationMethod) == null) { + WellKnownServiceGrpc.getGetWellKnownConfigurationMethod = getGetWellKnownConfigurationMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetWellKnownConfiguration")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.getDefaultInstance())) + .setSchemaDescriptor(new WellKnownServiceMethodDescriptorSupplier("GetWellKnownConfiguration")) + .build(); + } + } + } + return getGetWellKnownConfigurationMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static WellKnownServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WellKnownServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WellKnownServiceStub(channel, callOptions); + } + }; + return WellKnownServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static WellKnownServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WellKnownServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WellKnownServiceBlockingStub(channel, callOptions); + } + }; + return WellKnownServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static WellKnownServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WellKnownServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WellKnownServiceFutureStub(channel, callOptions); + } + }; + return WellKnownServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + */ + default void getWellKnownConfiguration(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetWellKnownConfigurationMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service WellKnownService. + */ + public static abstract class WellKnownServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return WellKnownServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service WellKnownService. + */ + public static final class WellKnownServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private WellKnownServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WellKnownServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WellKnownServiceStub(channel, callOptions); + } + + /** + */ + public void getWellKnownConfiguration(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetWellKnownConfigurationMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service WellKnownService. + */ + public static final class WellKnownServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private WellKnownServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WellKnownServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WellKnownServiceBlockingStub(channel, callOptions); + } + + /** + */ + public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse getWellKnownConfiguration(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetWellKnownConfigurationMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service WellKnownService. + */ + public static final class WellKnownServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private WellKnownServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WellKnownServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WellKnownServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getWellKnownConfiguration( + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetWellKnownConfigurationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_WELL_KNOWN_CONFIGURATION = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_WELL_KNOWN_CONFIGURATION: + serviceImpl.getWellKnownConfiguration((io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetWellKnownConfigurationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest, + io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse>( + service, METHODID_GET_WELL_KNOWN_CONFIGURATION))) + .build(); + } + + private static abstract class WellKnownServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + WellKnownServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("WellKnownService"); + } + } + + private static final class WellKnownServiceFileDescriptorSupplier + extends WellKnownServiceBaseDescriptorSupplier { + WellKnownServiceFileDescriptorSupplier() {} + } + + private static final class WellKnownServiceMethodDescriptorSupplier + extends WellKnownServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + WellKnownServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (WellKnownServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new WellKnownServiceFileDescriptorSupplier()) + .addMethod(getGetWellKnownConfigurationMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellknownConfigurationProto.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellknownConfigurationProto.java new file mode 100644 index 00000000..42c9a455 --- /dev/null +++ b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellknownConfigurationProto.java @@ -0,0 +1,111 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wellknownconfiguration/wellknown_configuration.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.wellknownconfiguration; + +public final class WellknownConfigurationProto { + private WellknownConfigurationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_wellknownconfiguration_WellKnownConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_wellknownconfiguration_WellKnownConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n4wellknownconfiguration/wellknown_confi" + + "guration.proto\022\026wellknownconfiguration\032\034" + + "google/api/annotations.proto\032\034google/pro" + + "tobuf/struct.proto\"\316\001\n\017WellKnownConfig\022`" + + "\n\rconfiguration\030\001 \003(\0132:.wellknownconfigu" + + "ration.WellKnownConfig.ConfigurationEntr" + + "yR\rconfiguration\032Y\n\022ConfigurationEntry\022\020" + + "\n\003key\030\001 \001(\tR\003key\022-\n\005value\030\002 \001(\0132\027.google" + + ".protobuf.StructR\005value:\0028\001\"\"\n GetWellKn" + + "ownConfigurationRequest\"b\n!GetWellKnownC" + + "onfigurationResponse\022=\n\rconfiguration\030\001 " + + "\001(\0132\027.google.protobuf.StructR\rconfigurat" + + "ion2\321\001\n\020WellKnownService\022\274\001\n\031GetWellKnow" + + "nConfiguration\0228.wellknownconfiguration." + + "GetWellKnownConfigurationRequest\0329.wellk" + + "nownconfiguration.GetWellKnownConfigurat" + + "ionResponse\"*\202\323\344\223\002$\022\"/.well-known/opentd" + + "f-configurationB\301\001\n*io.opentdf.platform." + + "wellknownconfigurationB\033WellknownConfigu" + + "rationProtoP\001\242\002\003WXX\252\002\026Wellknownconfigura" + + "tion\312\002\026Wellknownconfiguration\342\002\"Wellknow" + + "nconfiguration\\GPBMetadata\352\002\026Wellknownco" + + "nfigurationb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_wellknownconfiguration_WellKnownConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_wellknownconfiguration_WellKnownConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_wellknownconfiguration_WellKnownConfig_descriptor, + new java.lang.String[] { "Configuration", }); + internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_descriptor = + internal_static_wellknownconfiguration_WellKnownConfig_descriptor.getNestedTypes().get(0); + internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor, + new java.lang.String[] { }); + internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor, + new java.lang.String[] { "Configuration", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/sdk/pom.xml b/sdk/pom.xml index 9fc7edde..05b5e7cd 100644 --- a/sdk/pom.xml +++ b/sdk/pom.xml @@ -3,6 +3,7 @@ 4.0.0 + io.opentdf.platform sdk sdk @@ -21,5 +22,35 @@ org.junit.jupiter junit-jupiter-engine + + com.nimbusds + oauth2-oidc-sdk + 11.10.1 + + + io.grpc + grpc-protobuf + + + io.grpc + grpc-stub + + + io.grpc + grpc-okhttp + + + io.grpc + grpc-netty + + + io.grpc + grpc-netty-shaded + + + com.google.protobuf + protobuf-java + ${protobuf.version} + diff --git a/sdk/src/main/java/io/opentdf/platform/SDK.java b/sdk/src/main/java/io/opentdf/platform/SDK.java deleted file mode 100644 index 94d11907..00000000 --- a/sdk/src/main/java/io/opentdf/platform/SDK.java +++ /dev/null @@ -1,4 +0,0 @@ -package io.opentdf.platform; - -public class SDK { -} diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java new file mode 100644 index 00000000..ce7cd62c --- /dev/null +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java @@ -0,0 +1,221 @@ +package io.opentdf.platform.sdk; + +import java.io.IOException; +import java.time.Instant; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import com.nimbusds.oauth2.sdk.AuthorizationGrant; +import com.nimbusds.oauth2.sdk.ClientCredentialsGrant; +import com.nimbusds.oauth2.sdk.ErrorObject; +import com.nimbusds.oauth2.sdk.GeneralException; +import com.nimbusds.oauth2.sdk.TokenRequest; +import com.nimbusds.oauth2.sdk.TokenResponse; +import com.nimbusds.oauth2.sdk.auth.ClientAuthentication; +import com.nimbusds.oauth2.sdk.auth.ClientSecretBasic; +import com.nimbusds.oauth2.sdk.auth.Secret; +import com.nimbusds.oauth2.sdk.dpop.DPoPProofFactory; +import com.nimbusds.oauth2.sdk.dpop.DefaultDPoPProofFactory; +import com.nimbusds.oauth2.sdk.http.HTTPRequest; +import com.nimbusds.oauth2.sdk.http.HTTPResponse; +import com.nimbusds.oauth2.sdk.id.ClientID; +import com.nimbusds.oauth2.sdk.id.Issuer; +import com.nimbusds.oauth2.sdk.token.AccessToken; +import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata; +import com.nimbusds.jose.JOSEException; +import com.nimbusds.jose.JWSAlgorithm; +import com.nimbusds.jose.jwk.*; +import com.nimbusds.jose.jwk.gen.*; +import com.nimbusds.jwt.SignedJWT; + +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.opentdf.platform.policy.attributes.AttributesServiceGrpc; +import io.opentdf.platform.policy.attributes.AttributesServiceGrpc.AttributesServiceFutureStub; +import io.opentdf.platform.policy.namespaces.NamespaceServiceGrpc; +import io.opentdf.platform.policy.namespaces.NamespaceServiceGrpc.NamespaceServiceFutureStub; +import io.opentdf.platform.policy.resourcemapping.ResourceMappingServiceGrpc; +import io.opentdf.platform.policy.resourcemapping.ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub; +import io.opentdf.platform.policy.subjectmapping.SubjectMappingServiceGrpc; +import io.opentdf.platform.policy.subjectmapping.SubjectMappingServiceGrpc.SubjectMappingServiceFutureStub; +import io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse; +import io.opentdf.platform.wellknownconfiguration.WellKnownServiceGrpc; +import io.opentdf.platform.wellknownconfiguration.WellKnownServiceGrpc.WellKnownServiceFutureStub; + +public class SDK { + + protected OIDCProviderMetadata providerMetadata; + private final ManagedChannel channel; + public final AttributesServiceFutureStub attributes; + public final NamespaceServiceFutureStub namespaces; + public final SubjectMappingServiceFutureStub subjectMappings; + public final ResourceMappingServiceFutureStub resourceMappings; + private final WellKnownServiceFutureStub wellKnown; + + + public SDK(SDKBuilder builder) throws JOSEException, IOException, GeneralException, + InterruptedException, ExecutionException { + + RSAKey rsaKey = new RSAKeyGenerator(2048).keyUse(KeyUse.SIGNATURE) + .keyID(UUID.randomUUID().toString()).generate(); + + ManagedChannelBuilder channelBuilder = + ManagedChannelBuilder.forTarget(builder.platformEndpoint) + .intercept(new GRPCAuthInterceptor(builder.clientAuth, rsaKey)); + + if (builder.usePlainText) { + channelBuilder = channelBuilder.usePlaintext(); + } + + this.channel = channelBuilder.build(); + + this.attributes = AttributesServiceGrpc.newFutureStub(channel); + this.namespaces = NamespaceServiceGrpc.newFutureStub(channel); + this.subjectMappings = SubjectMappingServiceGrpc.newFutureStub(channel); + this.resourceMappings = ResourceMappingServiceGrpc.newFutureStub(channel); + this.wellKnown = WellKnownServiceGrpc.newFutureStub(channel); + + GetWellKnownConfigurationResponse config = this.wellKnown.getWellKnownConfiguration(null).get(); + Issuer issuer = + new Issuer(config.getConfiguration().getFieldsOrThrow("platform_issuer").getStringValue()); + + this.providerMetadata = OIDCProviderMetadata.resolve(issuer); + } + + public static class SDKBuilder { + private String platformEndpoint; + private ClientAuthentication clientAuth; + private Boolean usePlainText; + + public SDKBuilder platformEndpoint(String platformEndpoint) { + this.platformEndpoint = platformEndpoint; + return this; + } + + public SDKBuilder clientCredentialsBasic(String clientID, String clientSecret) { + ClientID cid = new ClientID(clientID); + Secret cs = new Secret(clientSecret); + this.clientAuth = new ClientSecretBasic(cid, cs); + return this; + } + + public SDKBuilder usePlainText(Boolean usePlainText) { + this.usePlainText = usePlainText; + return this; + } + + + public SDK build() throws JOSEException, IOException, GeneralException, InterruptedException, + ExecutionException { + return new SDK(this); + } + + + } + + private class GRPCAuthInterceptor implements ClientInterceptor + + { + + private Instant tokenExpiryTime; + private AccessToken token; + private final ClientAuthentication clientAuth; + private final RSAKey rsaKey; + + public GRPCAuthInterceptor(ClientAuthentication clientAuth, RSAKey rsaKey) { + this.clientAuth = clientAuth; + this.rsaKey = rsaKey; + } + + @Override + public ClientCall interceptCall(MethodDescriptor method, + CallOptions callOptions, Channel next) { + return new SimpleForwardingClientCall(next.newCall(method, callOptions)) { + @Override + public void start(Listener responseListener, Metadata headers) { + if (method.getFullMethodName() + .equals("wellknownconfiguration.WellKnownService/GetWellKnownConfiguration")) { + super.start(responseListener, headers); + return; + } + AccessToken t = getToken(); + System.out.println("Access token: " + t.getValue()); + System.out.println("Lifetime: " + t.getLifetime()); + System.out.println("Expires: " + t.toJSONObject().get("expires_in")); + headers.put(Metadata.Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER), + "Bearer " + t.getValue()); + + super.start(responseListener, headers); + } + }; + } + + private AccessToken getToken() { + try { + + // If the token is expired or initially null, get a new token + if (isTokenExpired() | this.token == null) { + System.out.println("getting new access token"); + + // Construct the client credentials grant + AuthorizationGrant clientGrant = new ClientCredentialsGrant(); + + // Make the token request + TokenRequest tokenRequest = new TokenRequest(providerMetadata.getTokenEndpointURI(), + clientAuth, clientGrant, null); + HTTPRequest httpRequest = tokenRequest.toHTTPRequest(); + + DPoPProofFactory dpopFactory = new DefaultDPoPProofFactory(rsaKey, JWSAlgorithm.RS256); + + SignedJWT proof = + dpopFactory.createDPoPJWT(httpRequest.getMethod().name(), httpRequest.getURI()); + + httpRequest.setDPoP(proof); + System.out.println("DPoP: " + proof.serialize()); + TokenResponse tokenResponse; + + HTTPResponse httpResponse = httpRequest.send(); + + tokenResponse = TokenResponse.parse(httpResponse); + if (!tokenResponse.indicatesSuccess()) { + ErrorObject error = tokenResponse.toErrorResponse().getErrorObject(); + System.out.println("Token response: " + error.getHTTPStatusCode()); + throw new RuntimeException("Token request failed: " + error); + } + + this.token = tokenResponse.toSuccessResponse().getTokens().getAccessToken(); + // DPoPAccessToken dPoPAccessToken = tokens.getDPoPAccessToken(); + + + + if (token.getLifetime() != 0) { + this.tokenExpiryTime = Instant.now().plusSeconds(token.getLifetime() / 3); + } + + } else { + // If the token is still valid or not initially null, return the cached token + System.out.println("using cached token"); + return this.token; + } + + } catch (Exception e) { + // TODO Auto-generated catch block + throw new RuntimeException("Failed to get token", e); + } + return this.token; + } + + private boolean isTokenExpired() { + return this.tokenExpiryTime != null && this.tokenExpiryTime.isBefore(Instant.now()); + } + } + +} + + diff --git a/sdk/src/test/java/io/opentdf/platform/SDKTest.java b/sdk/src/test/java/io/opentdf/platform/SDKTest.java deleted file mode 100644 index 30d19479..00000000 --- a/sdk/src/test/java/io/opentdf/platform/SDKTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.opentdf.platform; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class SDKTest { - - - @Test - public void testIt(){} -} \ No newline at end of file diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java new file mode 100644 index 00000000..de2d998e --- /dev/null +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java @@ -0,0 +1,30 @@ +package io.opentdf.platform.sdk; + +import org.junit.jupiter.api.Test; + +import java.util.logging.Logger; + +class SDKTest { + private static final Logger logger = Logger.getLogger(SDKTest.class.getName()); + + + @Test + public void testIt() { + System.out.println("Hello"); + // SDK s = new SDK("localhost:9000", "opentdf", "secret"); + // ListAttributesResponse resp; + // try { + // resp = s.attributes.listAttributes(null).get(); + // assertNotNull(resp); + // logger.info(resp.toString()); + // } catch (InterruptedException e) { + // // TODO Auto-generated catch block + + // e.printStackTrace(); + // } catch (ExecutionException e) { + // // TODO Auto-generated catch block + // e.printStackTrace(); + // } + + } +} From 743568e1cf48cfdfe5092d8eff78106b373a1628 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 12:02:29 -0400 Subject: [PATCH 02/62] bump java version --- .github/workflows/checks.yaml | 2 +- .github/workflows/release.yaml | 2 +- .../java/io/opentdf/platform/sdk/SDKTest.java | 15 --------------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index be9d94c7..e40cf37a 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -39,7 +39,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7 with: - java-version: '20' + java-version: '21' distribution: 'adopt' server-id: github - name: Maven Verify diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 42799c43..641c6b6f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -36,7 +36,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7 with: - java-version: '20' + java-version: '21' distribution: 'adopt' server-id: github - name: Publish package diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java index de2d998e..6041a352 100644 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java @@ -11,20 +11,5 @@ class SDKTest { @Test public void testIt() { System.out.println("Hello"); - // SDK s = new SDK("localhost:9000", "opentdf", "secret"); - // ListAttributesResponse resp; - // try { - // resp = s.attributes.listAttributes(null).get(); - // assertNotNull(resp); - // logger.info(resp.toString()); - // } catch (InterruptedException e) { - // // TODO Auto-generated catch block - - // e.printStackTrace(); - // } catch (ExecutionException e) { - // // TODO Auto-generated catch block - // e.printStackTrace(); - // } - } } From 8b12d93ae3190e6c41a86c68a2612d51d27ceb71 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 12:07:44 -0400 Subject: [PATCH 03/62] break up mvn steps on check --- .github/workflows/checks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index e40cf37a..ce781375 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -44,7 +44,8 @@ jobs: server-id: github - name: Maven Verify run: | - mvn clean verify + mvn clean install -DskipTests + mvn verify ci: needs: From 8ffc14511f4addb5835fd04f67ccc57ec522dcbb Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 16:11:49 -0400 Subject: [PATCH 04/62] remove gen code --- .gitignore | 2 +- .../options/AnnotationsProto.java | 167 - .../protoc_gen_openapiv2/options/Contact.java | 954 ---- .../options/ContactOrBuilder.java | 74 - .../options/ExternalDocumentation.java | 784 --- .../ExternalDocumentationOrBuilder.java | 54 - .../protoc_gen_openapiv2/options/Header.java | 1252 ----- .../options/HeaderOrBuilder.java | 114 - .../options/HeaderParameter.java | 1260 ----- .../options/HeaderParameterOrBuilder.java | 101 - .../protoc_gen_openapiv2/options/Info.java | 1980 ------- .../options/InfoOrBuilder.java | 212 - .../options/JSONSchema.java | 4860 ----------------- .../options/JSONSchemaOrBuilder.java | 463 -- .../protoc_gen_openapiv2/options/License.java | 774 --- .../options/LicenseOrBuilder.java | 50 - .../options/Openapiv2Proto.java | 605 -- .../options/Operation.java | 3977 -------------- .../options/OperationOrBuilder.java | 540 -- .../options/Parameters.java | 891 --- .../options/ParametersOrBuilder.java | 59 - .../options/Response.java | 1876 ------- .../options/ResponseOrBuilder.java | 249 - .../protoc_gen_openapiv2/options/Schema.java | 1306 ----- .../options/SchemaOrBuilder.java | 116 - .../protoc_gen_openapiv2/options/Scheme.java | 146 - .../protoc_gen_openapiv2/options/Scopes.java | 756 --- .../options/ScopesOrBuilder.java | 69 - .../options/SecurityDefinitions.java | 794 --- .../options/SecurityDefinitionsOrBuilder.java | 69 - .../options/SecurityRequirement.java | 1454 ----- .../options/SecurityRequirementOrBuilder.java | 79 - .../options/SecurityScheme.java | 2545 --------- .../options/SecuritySchemeOrBuilder.java | 261 - .../protoc_gen_openapiv2/options/Swagger.java | 4356 --------------- .../options/SwaggerOrBuilder.java | 568 -- .../protoc_gen_openapiv2/options/Tag.java | 1386 ----- .../options/TagOrBuilder.java | 147 - .../authorization/AuthorizationProto.java | 220 - .../AuthorizationServiceGrpc.java | 367 -- .../authorization/DecisionRequest.java | 1552 ------ .../DecisionRequestOrBuilder.java | 82 - .../authorization/DecisionResponse.java | 1531 ------ .../DecisionResponseOrBuilder.java | 137 - .../platform/authorization/Entity.java | 1761 ------ .../platform/authorization/EntityChain.java | 932 ---- .../authorization/EntityChainOrBuilder.java | 54 - .../platform/authorization/EntityCustom.java | 607 -- .../authorization/EntityCustomOrBuilder.java | 25 - .../authorization/EntityEntitlements.java | 731 --- .../EntityEntitlementsOrBuilder.java | 47 - .../authorization/EntityOrBuilder.java | 130 - .../authorization/GetDecisionsRequest.java | 760 --- .../GetDecisionsRequestOrBuilder.java | 34 - .../authorization/GetDecisionsResponse.java | 760 --- .../GetDecisionsResponseOrBuilder.java | 34 - .../authorization/GetEntitlementsRequest.java | 1134 ---- .../GetEntitlementsRequestOrBuilder.java | 81 - .../GetEntitlementsResponse.java | 814 --- .../GetEntitlementsResponseOrBuilder.java | 34 - .../authorization/ResourceAttribute.java | 603 -- .../ResourceAttributeOrBuilder.java | 35 - .../platform/common/ActiveStateEnum.java | 136 - .../opentdf/platform/common/CommonProto.java | 102 - .../io/opentdf/platform/common/Metadata.java | 1211 ---- .../platform/common/MetadataMutable.java | 729 --- .../common/MetadataMutableOrBuilder.java | 64 - .../platform/common/MetadataOrBuilder.java | 118 - .../platform/common/MetadataUpdateEnum.java | 147 - .../platform/kas/AccessServiceGrpc.java | 557 -- .../io/opentdf/platform/kas/InfoRequest.java | 407 -- .../platform/kas/InfoRequestOrBuilder.java | 10 - .../io/opentdf/platform/kas/InfoResponse.java | 550 -- .../platform/kas/InfoResponseOrBuilder.java | 22 - .../io/opentdf/platform/kas/KasProto.java | 175 - .../platform/kas/LegacyPublicKeyRequest.java | 542 -- .../kas/LegacyPublicKeyRequestOrBuilder.java | 22 - .../platform/kas/PublicKeyRequest.java | 814 --- .../kas/PublicKeyRequestOrBuilder.java | 46 - .../platform/kas/PublicKeyResponse.java | 542 -- .../kas/PublicKeyResponseOrBuilder.java | 22 - .../opentdf/platform/kas/RewrapRequest.java | 678 --- .../platform/kas/RewrapRequestOrBuilder.java | 34 - .../opentdf/platform/kas/RewrapResponse.java | 1051 ---- .../platform/kas/RewrapResponseOrBuilder.java | 74 - .../CreateKeyAccessServerRequest.java | 996 ---- ...CreateKeyAccessServerRequestOrBuilder.java | 72 - .../CreateKeyAccessServerResponse.java | 599 -- ...reateKeyAccessServerResponseOrBuilder.java | 25 - .../DeleteKeyAccessServerRequest.java | 542 -- ...DeleteKeyAccessServerRequestOrBuilder.java | 22 - .../DeleteKeyAccessServerResponse.java | 599 -- ...eleteKeyAccessServerResponseOrBuilder.java | 25 - .../GetKeyAccessServerRequest.java | 542 -- .../GetKeyAccessServerRequestOrBuilder.java | 22 - .../GetKeyAccessServerResponse.java | 599 -- .../GetKeyAccessServerResponseOrBuilder.java | 25 - .../platform/kasregistry/KeyAccessServer.java | 1142 ---- .../kasregistry/KeyAccessServerOrBuilder.java | 84 - .../KeyAccessServerRegistryProto.java | 249 - .../KeyAccessServerRegistryServiceGrpc.java | 589 -- .../ListKeyAccessServersRequest.java | 399 -- .../ListKeyAccessServersRequestOrBuilder.java | 10 - .../ListKeyAccessServersResponse.java | 760 --- ...ListKeyAccessServersResponseOrBuilder.java | 34 - .../platform/kasregistry/PublicKey.java | 899 --- .../kasregistry/PublicKeyOrBuilder.java | 70 - .../UpdateKeyAccessServerRequest.java | 1226 ----- ...UpdateKeyAccessServerRequestOrBuilder.java | 95 - .../UpdateKeyAccessServerResponse.java | 599 -- ...pdateKeyAccessServerResponseOrBuilder.java | 25 - .../io/opentdf/platform/policy/Action.java | 911 --- .../platform/policy/ActionOrBuilder.java | 45 - .../io/opentdf/platform/policy/Attribute.java | 2377 -------- .../policy/AttributeDefinitionSelector.java | 1871 ------- .../AttributeDefinitionSelectorOrBuilder.java | 46 - .../policy/AttributeNamespaceSelector.java | 1907 ------- .../AttributeNamespaceSelectorOrBuilder.java | 25 - .../platform/policy/AttributeOrBuilder.java | 202 - .../policy/AttributeRuleTypeEnum.java | 136 - .../policy/AttributeValueSelector.java | 1882 ------- .../AttributeValueSelectorOrBuilder.java | 43 - .../io/opentdf/platform/policy/Condition.java | 971 ---- .../policy/ConditionBooleanTypeEnum.java | 127 - .../platform/policy/ConditionGroup.java | 890 --- .../policy/ConditionGroupOrBuilder.java | 53 - .../platform/policy/ConditionOrBuilder.java | 90 - .../io/opentdf/platform/policy/Namespace.java | 1296 ----- .../platform/policy/NamespaceOrBuilder.java | 104 - .../opentdf/platform/policy/ObjectsProto.java | 245 - .../platform/policy/ResourceMapping.java | 1119 ---- .../policy/ResourceMappingOrBuilder.java | 77 - .../platform/policy/SelectorsProto.java | 172 - .../platform/policy/SubjectConditionSet.java | 1104 ---- .../policy/SubjectConditionSetOrBuilder.java | 61 - .../platform/policy/SubjectMapping.java | 1676 ------ .../policy/SubjectMappingOperatorEnum.java | 127 - .../policy/SubjectMappingOrBuilder.java | 135 - .../platform/policy/SubjectProperty.java | 692 --- .../policy/SubjectPropertyOrBuilder.java | 34 - .../opentdf/platform/policy/SubjectSet.java | 860 --- .../platform/policy/SubjectSetOrBuilder.java | 54 - .../io/opentdf/platform/policy/Value.java | 2834 ---------- .../platform/policy/ValueOrBuilder.java | 255 - ...signKeyAccessServerToAttributeRequest.java | 599 -- ...cessServerToAttributeRequestOrBuilder.java | 25 - ...ignKeyAccessServerToAttributeResponse.java | 599 -- ...essServerToAttributeResponseOrBuilder.java | 25 - .../AssignKeyAccessServerToValueRequest.java | 599 -- ...eyAccessServerToValueRequestOrBuilder.java | 25 - .../AssignKeyAccessServerToValueResponse.java | 599 -- ...yAccessServerToValueResponseOrBuilder.java | 25 - .../attributes/AttributeKeyAccessServer.java | 678 --- .../AttributeKeyAccessServerOrBuilder.java | 34 - .../policy/attributes/AttributesProto.java | 594 -- .../attributes/AttributesServiceGrpc.java | 1419 ----- .../attributes/CreateAttributeRequest.java | 1041 ---- .../CreateAttributeRequestOrBuilder.java | 80 - .../attributes/CreateAttributeResponse.java | 599 -- .../CreateAttributeResponseOrBuilder.java | 25 - .../CreateAttributeValueRequest.java | 1188 ---- .../CreateAttributeValueRequestOrBuilder.java | 110 - .../CreateAttributeValueResponse.java | 599 -- ...CreateAttributeValueResponseOrBuilder.java | 25 - .../DeactivateAttributeRequest.java | 542 -- .../DeactivateAttributeRequestOrBuilder.java | 22 - .../DeactivateAttributeResponse.java | 599 -- .../DeactivateAttributeResponseOrBuilder.java | 25 - .../DeactivateAttributeValueRequest.java | 542 -- ...ctivateAttributeValueRequestOrBuilder.java | 22 - .../DeactivateAttributeValueResponse.java | 599 -- ...tivateAttributeValueResponseOrBuilder.java | 25 - .../attributes/GetAttributeRequest.java | 542 -- .../GetAttributeRequestOrBuilder.java | 22 - .../attributes/GetAttributeResponse.java | 599 -- .../GetAttributeResponseOrBuilder.java | 25 - .../attributes/GetAttributeValueRequest.java | 554 -- .../GetAttributeValueRequestOrBuilder.java | 22 - .../attributes/GetAttributeValueResponse.java | 599 -- .../GetAttributeValueResponseOrBuilder.java | 25 - .../GetAttributeValuesByFqnsRequest.java | 840 --- ...AttributeValuesByFqnsRequestOrBuilder.java | 66 - .../GetAttributeValuesByFqnsResponse.java | 1572 ------ ...ttributeValuesByFqnsResponseOrBuilder.java | 64 - .../ListAttributeValuesRequest.java | 664 --- .../ListAttributeValuesRequestOrBuilder.java | 41 - .../ListAttributeValuesResponse.java | 760 --- .../ListAttributeValuesResponseOrBuilder.java | 34 - .../attributes/ListAttributesRequest.java | 528 -- .../ListAttributesRequestOrBuilder.java | 29 - .../attributes/ListAttributesResponse.java | 760 --- .../ListAttributesResponseOrBuilder.java | 34 - ...veKeyAccessServerFromAttributeRequest.java | 599 -- ...ssServerFromAttributeRequestOrBuilder.java | 25 - ...eKeyAccessServerFromAttributeResponse.java | 599 -- ...sServerFromAttributeResponseOrBuilder.java | 25 - ...RemoveKeyAccessServerFromValueRequest.java | 599 -- ...AccessServerFromValueRequestOrBuilder.java | 25 - ...emoveKeyAccessServerFromValueResponse.java | 599 -- ...ccessServerFromValueResponseOrBuilder.java | 25 - .../attributes/UpdateAttributeRequest.java | 905 --- .../UpdateAttributeRequestOrBuilder.java | 68 - .../attributes/UpdateAttributeResponse.java | 599 -- .../UpdateAttributeResponseOrBuilder.java | 25 - .../UpdateAttributeValueRequest.java | 1118 ---- .../UpdateAttributeValueRequestOrBuilder.java | 101 - .../UpdateAttributeValueResponse.java | 599 -- ...UpdateAttributeValueResponseOrBuilder.java | 25 - .../attributes/ValueKeyAccessServer.java | 678 --- .../ValueKeyAccessServerOrBuilder.java | 34 - .../namespaces/CreateNamespaceRequest.java | 811 --- .../CreateNamespaceRequestOrBuilder.java | 57 - .../namespaces/CreateNamespaceResponse.java | 599 -- .../CreateNamespaceResponseOrBuilder.java | 25 - .../DeactivateNamespaceRequest.java | 542 -- .../DeactivateNamespaceRequestOrBuilder.java | 22 - .../DeactivateNamespaceResponse.java | 399 -- .../DeactivateNamespaceResponseOrBuilder.java | 10 - .../namespaces/GetNamespaceRequest.java | 542 -- .../GetNamespaceRequestOrBuilder.java | 22 - .../namespaces/GetNamespaceResponse.java | 599 -- .../GetNamespaceResponseOrBuilder.java | 25 - .../namespaces/ListNamespacesRequest.java | 528 -- .../ListNamespacesRequestOrBuilder.java | 29 - .../namespaces/ListNamespacesResponse.java | 760 --- .../ListNamespacesResponseOrBuilder.java | 34 - .../namespaces/NamespaceServiceGrpc.java | 589 -- .../policy/namespaces/NamespacesProto.java | 218 - .../namespaces/UpdateNamespaceRequest.java | 905 --- .../UpdateNamespaceRequestOrBuilder.java | 68 - .../namespaces/UpdateNamespaceResponse.java | 599 -- .../UpdateNamespaceResponseOrBuilder.java | 25 - .../CreateResourceMappingRequest.java | 1060 ---- ...CreateResourceMappingRequestOrBuilder.java | 82 - .../CreateResourceMappingResponse.java | 599 -- ...reateResourceMappingResponseOrBuilder.java | 25 - .../DeleteResourceMappingRequest.java | 542 -- ...DeleteResourceMappingRequestOrBuilder.java | 22 - .../DeleteResourceMappingResponse.java | 599 -- ...eleteResourceMappingResponseOrBuilder.java | 25 - .../GetResourceMappingRequest.java | 542 -- .../GetResourceMappingRequestOrBuilder.java | 22 - .../GetResourceMappingResponse.java | 599 -- .../GetResourceMappingResponseOrBuilder.java | 25 - .../ListResourceMappingsRequest.java | 399 -- .../ListResourceMappingsRequestOrBuilder.java | 10 - .../ListResourceMappingsResponse.java | 760 --- ...ListResourceMappingsResponseOrBuilder.java | 34 - .../resourcemapping/ResourceMappingProto.java | 217 - .../ResourceMappingServiceGrpc.java | 1363 ----- .../UpdateResourceMappingRequest.java | 1258 ----- ...UpdateResourceMappingRequestOrBuilder.java | 113 - .../UpdateResourceMappingResponse.java | 599 -- ...pdateResourceMappingResponseOrBuilder.java | 25 - .../CreateSubjectConditionSetRequest.java | 599 -- ...teSubjectConditionSetRequestOrBuilder.java | 25 - .../CreateSubjectConditionSetResponse.java | 599 -- ...eSubjectConditionSetResponseOrBuilder.java | 25 - .../CreateSubjectMappingRequest.java | 1669 ------ .../CreateSubjectMappingRequestOrBuilder.java | 152 - .../CreateSubjectMappingResponse.java | 599 -- ...CreateSubjectMappingResponseOrBuilder.java | 25 - .../DeleteSubjectConditionSetRequest.java | 542 -- ...teSubjectConditionSetRequestOrBuilder.java | 22 - .../DeleteSubjectConditionSetResponse.java | 647 --- ...eSubjectConditionSetResponseOrBuilder.java | 37 - .../DeleteSubjectMappingRequest.java | 542 -- .../DeleteSubjectMappingRequestOrBuilder.java | 22 - .../DeleteSubjectMappingResponse.java | 647 --- ...DeleteSubjectMappingResponseOrBuilder.java | 37 - .../GetSubjectConditionSetRequest.java | 542 -- ...etSubjectConditionSetRequestOrBuilder.java | 22 - .../GetSubjectConditionSetResponse.java | 1046 ---- ...tSubjectConditionSetResponseOrBuilder.java | 69 - .../GetSubjectMappingRequest.java | 542 -- .../GetSubjectMappingRequestOrBuilder.java | 22 - .../GetSubjectMappingResponse.java | 599 -- .../GetSubjectMappingResponseOrBuilder.java | 25 - .../ListSubjectConditionSetsRequest.java | 399 -- ...tSubjectConditionSetsRequestOrBuilder.java | 10 - .../ListSubjectConditionSetsResponse.java | 760 --- ...SubjectConditionSetsResponseOrBuilder.java | 34 - .../ListSubjectMappingsRequest.java | 399 -- .../ListSubjectMappingsRequestOrBuilder.java | 10 - .../ListSubjectMappingsResponse.java | 760 --- .../ListSubjectMappingsResponseOrBuilder.java | 34 - .../MatchSubjectMappingsRequest.java | 788 --- .../MatchSubjectMappingsRequestOrBuilder.java | 34 - .../MatchSubjectMappingsResponse.java | 760 --- ...MatchSubjectMappingsResponseOrBuilder.java | 34 - .../SubjectConditionSetCreate.java | 1106 ---- .../SubjectConditionSetCreateOrBuilder.java | 84 - .../subjectmapping/SubjectMappingProto.java | 431 -- .../SubjectMappingServiceGrpc.java | 1045 ---- .../UpdateSubjectConditionSetRequest.java | 1375 ----- ...teSubjectConditionSetRequestOrBuilder.java | 117 - .../UpdateSubjectConditionSetResponse.java | 647 --- ...eSubjectConditionSetResponseOrBuilder.java | 37 - .../UpdateSubjectMappingRequest.java | 1523 ------ .../UpdateSubjectMappingRequestOrBuilder.java | 134 - .../UpdateSubjectMappingResponse.java | 647 --- ...UpdateSubjectMappingResponseOrBuilder.java | 37 - .../GetWellKnownConfigurationRequest.java | 399 -- ...ellKnownConfigurationRequestOrBuilder.java | 10 - .../GetWellKnownConfigurationResponse.java | 599 -- ...llKnownConfigurationResponseOrBuilder.java | 25 - .../WellKnownConfig.java | 712 --- .../WellKnownConfigOrBuilder.java | 44 - .../WellKnownServiceGrpc.java | 293 - .../WellknownConfigurationProto.java | 111 - 310 files changed, 1 insertion(+), 153011 deletions(-) delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Contact.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Header.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Info.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/License.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Operation.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Response.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Schema.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Tag.java delete mode 100644 protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationServiceGrpc.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/Entity.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityChain.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityChainOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityCustom.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityCustomOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlements.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlementsOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/EntityOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttribute.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/common/ActiveStateEnum.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/common/CommonProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/common/Metadata.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/common/MetadataMutable.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/common/MetadataMutableOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/common/MetadataOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/common/MetadataUpdateEnum.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/AccessServiceGrpc.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/InfoRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/InfoRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/InfoResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/InfoResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/KasProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/RewrapRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/RewrapRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/RewrapResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kas/RewrapResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServer.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryServiceGrpc.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKey.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKeyOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Action.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ActionOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Attribute.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelector.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelectorOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelector.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelectorOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeRuleTypeEnum.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelector.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelectorOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Condition.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ConditionBooleanTypeEnum.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ConditionGroup.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ConditionGroupOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ConditionOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Namespace.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/NamespaceOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ObjectsProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ResourceMapping.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ResourceMappingOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SelectorsProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSet.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSetOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectMapping.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOperatorEnum.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectProperty.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectPropertyOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectSet.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/SubjectSetOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/Value.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/ValueOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServer.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServerOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesServiceGrpc.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServer.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServerOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespaceServiceGrpc.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespacesProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingServiceGrpc.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequest.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequestOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponse.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponseOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfig.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfigOrBuilder.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownServiceGrpc.java delete mode 100644 protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellknownConfigurationProto.java diff --git a/.gitignore b/.gitignore index ccf7a011..8784edb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -protocol/src/main/protogen +protocol/src/main/java /.idea/ /protocol/target/ /sdk/target/ diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java deleted file mode 100644 index df54f5b6..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java +++ /dev/null @@ -1,167 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/annotations.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public final class AnnotationsProto { - private AnnotationsProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger); - registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation); - registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Schema); - registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Tag); - registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Field); - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public static final int OPENAPIV2_SWAGGER_FIELD_NUMBER = 1042; - /** - *
-   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
-   *
-   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
-   * different descriptor messages.
-   * 
- * - * extend .google.protobuf.FileOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileOptions, - grpc.gateway.protoc_gen_openapiv2.options.Swagger> openapiv2Swagger = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, - grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance()); - public static final int OPENAPIV2_OPERATION_FIELD_NUMBER = 1042; - /** - *
-   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
-   *
-   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
-   * different descriptor messages.
-   * 
- * - * extend .google.protobuf.MethodOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MethodOptions, - grpc.gateway.protoc_gen_openapiv2.options.Operation> openapiv2Operation = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - grpc.gateway.protoc_gen_openapiv2.options.Operation.class, - grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance()); - public static final int OPENAPIV2_SCHEMA_FIELD_NUMBER = 1042; - /** - *
-   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
-   *
-   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
-   * different descriptor messages.
-   * 
- * - * extend .google.protobuf.MessageOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MessageOptions, - grpc.gateway.protoc_gen_openapiv2.options.Schema> openapiv2Schema = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - grpc.gateway.protoc_gen_openapiv2.options.Schema.class, - grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()); - public static final int OPENAPIV2_TAG_FIELD_NUMBER = 1042; - /** - *
-   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
-   *
-   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
-   * different descriptor messages.
-   * 
- * - * extend .google.protobuf.ServiceOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ServiceOptions, - grpc.gateway.protoc_gen_openapiv2.options.Tag> openapiv2Tag = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - grpc.gateway.protoc_gen_openapiv2.options.Tag.class, - grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); - public static final int OPENAPIV2_FIELD_FIELD_NUMBER = 1042; - /** - *
-   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
-   *
-   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
-   * different descriptor messages.
-   * 
- * - * extend .google.protobuf.FieldOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FieldOptions, - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema> openapiv2Field = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()); - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n.protoc-gen-openapiv2/options/annotatio" + - "ns.proto\022)grpc.gateway.protoc_gen_openap" + - "iv2.options\032 google/protobuf/descriptor." + - "proto\032,protoc-gen-openapiv2/options/open" + - "apiv2.proto:~\n\021openapiv2_swagger\022\034.googl" + - "e.protobuf.FileOptions\030\222\010 \001(\01322.grpc.gat" + - "eway.protoc_gen_openapiv2.options.Swagge" + - "rR\020openapiv2Swagger:\206\001\n\023openapiv2_operat" + - "ion\022\036.google.protobuf.MethodOptions\030\222\010 \001" + - "(\01324.grpc.gateway.protoc_gen_openapiv2.o" + - "ptions.OperationR\022openapiv2Operation:~\n\020" + - "openapiv2_schema\022\037.google.protobuf.Messa" + - "geOptions\030\222\010 \001(\01321.grpc.gateway.protoc_g" + - "en_openapiv2.options.SchemaR\017openapiv2Sc" + - "hema:u\n\ropenapiv2_tag\022\037.google.protobuf." + - "ServiceOptions\030\222\010 \001(\0132..grpc.gateway.pro" + - "toc_gen_openapiv2.options.TagR\014openapiv2" + - "Tag:~\n\017openapiv2_field\022\035.google.protobuf" + - ".FieldOptions\030\222\010 \001(\01325.grpc.gateway.prot" + - "oc_gen_openapiv2.options.JSONSchemaR\016ope" + - "napiv2FieldB\232\002B\020AnnotationsProtoP\001ZFgith" + - "ub.com/grpc-ecosystem/grpc-gateway/v2/pr" + - "otoc-gen-openapiv2/options\242\002\004GGPO\252\002\'Grpc" + - ".Gateway.ProtocGenOpenapiv2.Options\312\002\'Gr" + - "pc\\Gateway\\ProtocGenOpenapiv2\\Options\342\0023" + - "Grpc\\Gateway\\ProtocGenOpenapiv2\\Options\\" + - "GPBMetadata\352\002*Grpc::Gateway::ProtocGenOp" + - "enapiv2::Optionsb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.DescriptorProtos.getDescriptor(), - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor(), - }); - openapiv2Swagger.internalInit(descriptor.getExtensions().get(0)); - openapiv2Operation.internalInit(descriptor.getExtensions().get(1)); - openapiv2Schema.internalInit(descriptor.getExtensions().get(2)); - openapiv2Tag.internalInit(descriptor.getExtensions().get(3)); - openapiv2Field.internalInit(descriptor.getExtensions().get(4)); - com.google.protobuf.DescriptorProtos.getDescriptor(); - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Contact.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Contact.java deleted file mode 100644 index c9a18ecd..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Contact.java +++ /dev/null @@ -1,954 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Contact` is a representation of OpenAPI v2 specification's Contact object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
- *
- * Example:
- *
- *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
- *    info: {
- *      ...
- *      contact: {
- *        name: "gRPC-Gateway project";
- *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
- *        email: "none@example.com";
- *      };
- *      ...
- *    };
- *    ...
- *  };
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact} - */ -public final class Contact extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact) - ContactOrBuilder { -private static final long serialVersionUID = 0L; - // Use Contact.newBuilder() to construct. - private Contact(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Contact() { - name_ = ""; - url_ = ""; - email_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Contact(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Contact.class, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The identifying name of the contact person/organization.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The identifying name of the contact person/organization.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * The URL pointing to the contact information. MUST be in the format of a
-   * URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * The URL pointing to the contact information. MUST be in the format of a
-   * URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EMAIL_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object email_ = ""; - /** - *
-   * The email address of the contact person/organization. MUST be in the format
-   * of an email address.
-   * 
- * - * string email = 3 [json_name = "email"]; - * @return The email. - */ - @java.lang.Override - public java.lang.String getEmail() { - java.lang.Object ref = email_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - email_ = s; - return s; - } - } - /** - *
-   * The email address of the contact person/organization. MUST be in the format
-   * of an email address.
-   * 
- * - * string email = 3 [json_name = "email"]; - * @return The bytes for email. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEmailBytes() { - java.lang.Object ref = email_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - email_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, email_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, email_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Contact)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Contact other = (grpc.gateway.protoc_gen_openapiv2.options.Contact) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getEmail() - .equals(other.getEmail())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getEmail().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Contact prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Contact` is a representation of OpenAPI v2 specification's Contact object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
-   *
-   * Example:
-   *
-   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
-   *    info: {
-   *      ...
-   *      contact: {
-   *        name: "gRPC-Gateway project";
-   *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
-   *        email: "none@example.com";
-   *      };
-   *      ...
-   *    };
-   *    ...
-   *  };
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact) - grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Contact.class, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Contact.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - url_ = ""; - email_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Contact build() { - grpc.gateway.protoc_gen_openapiv2.options.Contact result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Contact buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Contact result = new grpc.gateway.protoc_gen_openapiv2.options.Contact(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Contact result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.url_ = url_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.email_ = email_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Contact) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Contact)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Contact other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getEmail().isEmpty()) { - email_ = other.email_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - email_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The identifying name of the contact person/organization.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The identifying name of the contact person/organization.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The identifying name of the contact person/organization.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The identifying name of the contact person/organization.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The identifying name of the contact person/organization.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-     * The URL pointing to the contact information. MUST be in the format of a
-     * URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URL pointing to the contact information. MUST be in the format of a
-     * URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URL pointing to the contact information. MUST be in the format of a
-     * URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The URL pointing to the contact information. MUST be in the format of a
-     * URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The URL pointing to the contact information. MUST be in the format of a
-     * URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object email_ = ""; - /** - *
-     * The email address of the contact person/organization. MUST be in the format
-     * of an email address.
-     * 
- * - * string email = 3 [json_name = "email"]; - * @return The email. - */ - public java.lang.String getEmail() { - java.lang.Object ref = email_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - email_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The email address of the contact person/organization. MUST be in the format
-     * of an email address.
-     * 
- * - * string email = 3 [json_name = "email"]; - * @return The bytes for email. - */ - public com.google.protobuf.ByteString - getEmailBytes() { - java.lang.Object ref = email_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - email_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The email address of the contact person/organization. MUST be in the format
-     * of an email address.
-     * 
- * - * string email = 3 [json_name = "email"]; - * @param value The email to set. - * @return This builder for chaining. - */ - public Builder setEmail( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - email_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The email address of the contact person/organization. MUST be in the format
-     * of an email address.
-     * 
- * - * string email = 3 [json_name = "email"]; - * @return This builder for chaining. - */ - public Builder clearEmail() { - email_ = getDefaultInstance().getEmail(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The email address of the contact person/organization. MUST be in the format
-     * of an email address.
-     * 
- * - * string email = 3 [json_name = "email"]; - * @param value The bytes for email to set. - * @return This builder for chaining. - */ - public Builder setEmailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - email_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact) - private static final grpc.gateway.protoc_gen_openapiv2.options.Contact DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Contact(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Contact parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java deleted file mode 100644 index e3300a78..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java +++ /dev/null @@ -1,74 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface ContactOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Contact) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The identifying name of the contact person/organization.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The identifying name of the contact person/organization.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The URL pointing to the contact information. MUST be in the format of a
-   * URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * The URL pointing to the contact information. MUST be in the format of a
-   * URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-   * The email address of the contact person/organization. MUST be in the format
-   * of an email address.
-   * 
- * - * string email = 3 [json_name = "email"]; - * @return The email. - */ - java.lang.String getEmail(); - /** - *
-   * The email address of the contact person/organization. MUST be in the format
-   * of an email address.
-   * 
- * - * string email = 3 [json_name = "email"]; - * @return The bytes for email. - */ - com.google.protobuf.ByteString - getEmailBytes(); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java deleted file mode 100644 index 44ceae4d..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java +++ /dev/null @@ -1,784 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `ExternalDocumentation` is a representation of OpenAPI v2 specification's
- * ExternalDocumentation object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
- *
- * Example:
- *
- *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
- *    ...
- *    external_docs: {
- *      description: "More about gRPC-Gateway";
- *      url: "https://github.com/grpc-ecosystem/grpc-gateway";
- *    }
- *    ...
- *  };
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} - */ -public final class ExternalDocumentation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) - ExternalDocumentationOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExternalDocumentation.newBuilder() to construct. - private ExternalDocumentation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExternalDocumentation() { - description_ = ""; - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExternalDocumentation(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.class, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder.class); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * A short description of the target documentation. GFM syntax can be used for
-   * rich text representation.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A short description of the target documentation. GFM syntax can be used for
-   * rich text representation.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * The URL for the target documentation. Value MUST be in the format
-   * of a URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * The URL for the target documentation. Value MUST be in the format
-   * of a URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation other = (grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) obj; - - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `ExternalDocumentation` is a representation of OpenAPI v2 specification's
-   * ExternalDocumentation object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
-   *
-   * Example:
-   *
-   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
-   *    ...
-   *    external_docs: {
-   *      description: "More about gRPC-Gateway";
-   *      url: "https://github.com/grpc-ecosystem/grpc-gateway";
-   *    }
-   *    ...
-   *  };
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.class, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - description_ = ""; - url_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation build() { - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result = new grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.url_ = url_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) return this; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object description_ = ""; - /** - *
-     * A short description of the target documentation. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A short description of the target documentation. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A short description of the target documentation. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * A short description of the target documentation. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A short description of the target documentation. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-     * The URL for the target documentation. Value MUST be in the format
-     * of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URL for the target documentation. Value MUST be in the format
-     * of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URL for the target documentation. Value MUST be in the format
-     * of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The URL for the target documentation. Value MUST be in the format
-     * of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The URL for the target documentation. Value MUST be in the format
-     * of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) - private static final grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExternalDocumentation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java deleted file mode 100644 index 7a5b5210..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface ExternalDocumentationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A short description of the target documentation. GFM syntax can be used for
-   * rich text representation.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A short description of the target documentation. GFM syntax can be used for
-   * rich text representation.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * The URL for the target documentation. Value MUST be in the format
-   * of a URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * The URL for the target documentation. Value MUST be in the format
-   * of a URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Header.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Header.java deleted file mode 100644 index ad785ffe..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Header.java +++ /dev/null @@ -1,1252 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Header` is a representation of OpenAPI v2 specification's Header object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Header} - */ -public final class Header extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Header) - HeaderOrBuilder { -private static final long serialVersionUID = 0L; - // Use Header.newBuilder() to construct. - private Header(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Header() { - description_ = ""; - type_ = ""; - format_ = ""; - default_ = ""; - pattern_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Header(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Header.class, grpc.gateway.protoc_gen_openapiv2.options.Header.Builder.class); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * `Description` is a short description of the header.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * `Description` is a short description of the header.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object type_ = ""; - /** - *
-   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-   * 
- * - * string type = 2 [json_name = "type"]; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-   * 
- * - * string type = 2 [json_name = "type"]; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORMAT_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object format_ = ""; - /** - *
-   * `Format` The extending format for the previously mentioned type.
-   * 
- * - * string format = 3 [json_name = "format"]; - * @return The format. - */ - @java.lang.Override - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } - } - /** - *
-   * `Format` The extending format for the previously mentioned type.
-   * 
- * - * string format = 3 [json_name = "format"]; - * @return The bytes for format. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFAULT_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object default_ = ""; - /** - *
-   * `Default` Declares the value of the header that the server will use if none is provided.
-   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-   * Unlike JSON Schema this value MUST conform to the defined type for the header.
-   * 
- * - * string default = 6 [json_name = "default"]; - * @return The default. - */ - @java.lang.Override - public java.lang.String getDefault() { - java.lang.Object ref = default_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - default_ = s; - return s; - } - } - /** - *
-   * `Default` Declares the value of the header that the server will use if none is provided.
-   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-   * Unlike JSON Schema this value MUST conform to the defined type for the header.
-   * 
- * - * string default = 6 [json_name = "default"]; - * @return The bytes for default. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDefaultBytes() { - java.lang.Object ref = default_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - default_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PATTERN_FIELD_NUMBER = 13; - @SuppressWarnings("serial") - private volatile java.lang.Object pattern_ = ""; - /** - *
-   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-   * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @return The pattern. - */ - @java.lang.Override - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pattern_ = s; - return s; - } - } - /** - *
-   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-   * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @return The bytes for pattern. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, format_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(default_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, default_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, pattern_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, format_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(default_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, default_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, pattern_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Header)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Header other = (grpc.gateway.protoc_gen_openapiv2.options.Header) obj; - - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getType() - .equals(other.getType())) return false; - if (!getFormat() - .equals(other.getFormat())) return false; - if (!getDefault() - .equals(other.getDefault())) return false; - if (!getPattern() - .equals(other.getPattern())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getFormat().hashCode(); - hash = (37 * hash) + DEFAULT_FIELD_NUMBER; - hash = (53 * hash) + getDefault().hashCode(); - hash = (37 * hash) + PATTERN_FIELD_NUMBER; - hash = (53 * hash) + getPattern().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Header prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Header` is a representation of OpenAPI v2 specification's Header object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Header} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Header) - grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Header.class, grpc.gateway.protoc_gen_openapiv2.options.Header.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Header.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - description_ = ""; - type_ = ""; - format_ = ""; - default_ = ""; - pattern_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Header build() { - grpc.gateway.protoc_gen_openapiv2.options.Header result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Header buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Header result = new grpc.gateway.protoc_gen_openapiv2.options.Header(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Header result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.format_ = format_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.default_ = default_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.pattern_ = pattern_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Header) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Header)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Header other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance()) return this; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getType().isEmpty()) { - type_ = other.type_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getFormat().isEmpty()) { - format_ = other.format_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getDefault().isEmpty()) { - default_ = other.default_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getPattern().isEmpty()) { - pattern_ = other.pattern_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - type_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - format_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 50: { - default_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 50 - case 106: { - pattern_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 106 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object description_ = ""; - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object type_ = ""; - /** - *
-     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * 
- * - * string type = 2 [json_name = "type"]; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * 
- * - * string type = 2 [json_name = "type"]; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * 
- * - * string type = 2 [json_name = "type"]; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - type_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * 
- * - * string type = 2 [json_name = "type"]; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = getDefaultInstance().getType(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * 
- * - * string type = 2 [json_name = "type"]; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - type_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object format_ = ""; - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 3 [json_name = "format"]; - * @return The format. - */ - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 3 [json_name = "format"]; - * @return The bytes for format. - */ - public com.google.protobuf.ByteString - getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 3 [json_name = "format"]; - * @param value The format to set. - * @return This builder for chaining. - */ - public Builder setFormat( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - format_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 3 [json_name = "format"]; - * @return This builder for chaining. - */ - public Builder clearFormat() { - format_ = getDefaultInstance().getFormat(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 3 [json_name = "format"]; - * @param value The bytes for format to set. - * @return This builder for chaining. - */ - public Builder setFormatBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - format_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object default_ = ""; - /** - *
-     * `Default` Declares the value of the header that the server will use if none is provided.
-     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-     * Unlike JSON Schema this value MUST conform to the defined type for the header.
-     * 
- * - * string default = 6 [json_name = "default"]; - * @return The default. - */ - public java.lang.String getDefault() { - java.lang.Object ref = default_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - default_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `Default` Declares the value of the header that the server will use if none is provided.
-     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-     * Unlike JSON Schema this value MUST conform to the defined type for the header.
-     * 
- * - * string default = 6 [json_name = "default"]; - * @return The bytes for default. - */ - public com.google.protobuf.ByteString - getDefaultBytes() { - java.lang.Object ref = default_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - default_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `Default` Declares the value of the header that the server will use if none is provided.
-     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-     * Unlike JSON Schema this value MUST conform to the defined type for the header.
-     * 
- * - * string default = 6 [json_name = "default"]; - * @param value The default to set. - * @return This builder for chaining. - */ - public Builder setDefault( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - default_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `Default` Declares the value of the header that the server will use if none is provided.
-     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-     * Unlike JSON Schema this value MUST conform to the defined type for the header.
-     * 
- * - * string default = 6 [json_name = "default"]; - * @return This builder for chaining. - */ - public Builder clearDefault() { - default_ = getDefaultInstance().getDefault(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * `Default` Declares the value of the header that the server will use if none is provided.
-     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-     * Unlike JSON Schema this value MUST conform to the defined type for the header.
-     * 
- * - * string default = 6 [json_name = "default"]; - * @param value The bytes for default to set. - * @return This builder for chaining. - */ - public Builder setDefaultBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - default_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object pattern_ = ""; - /** - *
-     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-     * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @return The pattern. - */ - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pattern_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-     * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @return The bytes for pattern. - */ - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-     * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @param value The pattern to set. - * @return This builder for chaining. - */ - public Builder setPattern( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pattern_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-     * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @return This builder for chaining. - */ - public Builder clearPattern() { - pattern_ = getDefaultInstance().getPattern(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-     * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @param value The bytes for pattern to set. - * @return This builder for chaining. - */ - public Builder setPatternBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pattern_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Header) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Header) - private static final grpc.gateway.protoc_gen_openapiv2.options.Header DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Header(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser
() { - @java.lang.Override - public Header parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser
parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser
getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java deleted file mode 100644 index ca2d6b87..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface HeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Header) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `Description` is a short description of the header.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * `Description` is a short description of the header.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-   * 
- * - * string type = 2 [json_name = "type"]; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-   * 
- * - * string type = 2 [json_name = "type"]; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * `Format` The extending format for the previously mentioned type.
-   * 
- * - * string format = 3 [json_name = "format"]; - * @return The format. - */ - java.lang.String getFormat(); - /** - *
-   * `Format` The extending format for the previously mentioned type.
-   * 
- * - * string format = 3 [json_name = "format"]; - * @return The bytes for format. - */ - com.google.protobuf.ByteString - getFormatBytes(); - - /** - *
-   * `Default` Declares the value of the header that the server will use if none is provided.
-   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-   * Unlike JSON Schema this value MUST conform to the defined type for the header.
-   * 
- * - * string default = 6 [json_name = "default"]; - * @return The default. - */ - java.lang.String getDefault(); - /** - *
-   * `Default` Declares the value of the header that the server will use if none is provided.
-   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
-   * Unlike JSON Schema this value MUST conform to the defined type for the header.
-   * 
- * - * string default = 6 [json_name = "default"]; - * @return The bytes for default. - */ - com.google.protobuf.ByteString - getDefaultBytes(); - - /** - *
-   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-   * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @return The pattern. - */ - java.lang.String getPattern(); - /** - *
-   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
-   * 
- * - * string pattern = 13 [json_name = "pattern"]; - * @return The bytes for pattern. - */ - com.google.protobuf.ByteString - getPatternBytes(); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java deleted file mode 100644 index 296298e4..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java +++ /dev/null @@ -1,1260 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `HeaderParameter` a HTTP header parameter.
- * See: https://swagger.io/specification/v2/#parameter-object
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} - */ -public final class HeaderParameter extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) - HeaderParameterOrBuilder { -private static final long serialVersionUID = 0L; - // Use HeaderParameter.newBuilder() to construct. - private HeaderParameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HeaderParameter() { - name_ = ""; - description_ = ""; - type_ = 0; - format_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HeaderParameter(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.class, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder.class); - } - - /** - *
-   * `Type` is a a supported HTTP header type.
-   * See https://swagger.io/specification/v2/#parameterType.
-   * 
- * - * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * STRING = 1; - */ - STRING(1), - /** - * NUMBER = 2; - */ - NUMBER(2), - /** - * INTEGER = 3; - */ - INTEGER(3), - /** - * BOOLEAN = 4; - */ - BOOLEAN(4), - UNRECOGNIZED(-1), - ; - - /** - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - * STRING = 1; - */ - public static final int STRING_VALUE = 1; - /** - * NUMBER = 2; - */ - public static final int NUMBER_VALUE = 2; - /** - * INTEGER = 3; - */ - public static final int INTEGER_VALUE = 3; - /** - * BOOLEAN = 4; - */ - public static final int BOOLEAN_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return STRING; - case 2: return NUMBER; - case 3: return INTEGER; - case 4: return BOOLEAN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type) - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * `Name` is the header name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * `Name` is the header name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * `Description` is a short description of the header.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * `Description` is a short description of the header.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 3; - private int type_ = 0; - /** - *
-   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-   * See: https://swagger.io/specification/v2/#parameterType.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-   * See: https://swagger.io/specification/v2/#parameterType.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @return The type. - */ - @java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType() { - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type result = grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.forNumber(type_); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNRECOGNIZED : result; - } - - public static final int FORMAT_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object format_ = ""; - /** - *
-   * `Format` The extending format for the previously mentioned type.
-   * 
- * - * string format = 4 [json_name = "format"]; - * @return The format. - */ - @java.lang.Override - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } - } - /** - *
-   * `Format` The extending format for the previously mentioned type.
-   * 
- * - * string format = 4 [json_name = "format"]; - * @return The bytes for format. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUIRED_FIELD_NUMBER = 5; - private boolean required_ = false; - /** - *
-   * `Required` indicates if the header is optional
-   * 
- * - * bool required = 5 [json_name = "required"]; - * @return The required. - */ - @java.lang.Override - public boolean getRequired() { - return required_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (type_ != grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNKNOWN.getNumber()) { - output.writeEnum(3, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, format_); - } - if (required_ != false) { - output.writeBool(5, required_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (type_ != grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, format_); - } - if (required_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, required_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter other = (grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (type_ != other.type_) return false; - if (!getFormat() - .equals(other.getFormat())) return false; - if (getRequired() - != other.getRequired()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getFormat().hashCode(); - hash = (37 * hash) + REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getRequired()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `HeaderParameter` a HTTP header parameter.
-   * See: https://swagger.io/specification/v2/#parameter-object
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.class, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - description_ = ""; - type_ = 0; - format_ = ""; - required_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter build() { - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result = new grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.format_ = format_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.required_ = required_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getFormat().isEmpty()) { - format_ = other.format_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.getRequired() != false) { - setRequired(other.getRequired()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - type_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - format_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - required_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * `Name` is the header name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `Name` is the header name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `Name` is the header name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `Name` is the header name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * `Name` is the header name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * `Description` is a short description of the header.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int type_ = 0; - /** - *
-     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * See: https://swagger.io/specification/v2/#parameterType.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * See: https://swagger.io/specification/v2/#parameterType.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * See: https://swagger.io/specification/v2/#parameterType.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @return The type. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType() { - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type result = grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.forNumber(type_); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNRECOGNIZED : result; - } - /** - *
-     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * See: https://swagger.io/specification/v2/#parameterType.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-     * See: https://swagger.io/specification/v2/#parameterType.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000004); - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object format_ = ""; - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 4 [json_name = "format"]; - * @return The format. - */ - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 4 [json_name = "format"]; - * @return The bytes for format. - */ - public com.google.protobuf.ByteString - getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 4 [json_name = "format"]; - * @param value The format to set. - * @return This builder for chaining. - */ - public Builder setFormat( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - format_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 4 [json_name = "format"]; - * @return This builder for chaining. - */ - public Builder clearFormat() { - format_ = getDefaultInstance().getFormat(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * `Format` The extending format for the previously mentioned type.
-     * 
- * - * string format = 4 [json_name = "format"]; - * @param value The bytes for format to set. - * @return This builder for chaining. - */ - public Builder setFormatBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - format_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private boolean required_ ; - /** - *
-     * `Required` indicates if the header is optional
-     * 
- * - * bool required = 5 [json_name = "required"]; - * @return The required. - */ - @java.lang.Override - public boolean getRequired() { - return required_; - } - /** - *
-     * `Required` indicates if the header is optional
-     * 
- * - * bool required = 5 [json_name = "required"]; - * @param value The required to set. - * @return This builder for chaining. - */ - public Builder setRequired(boolean value) { - - required_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * `Required` indicates if the header is optional
-     * 
- * - * bool required = 5 [json_name = "required"]; - * @return This builder for chaining. - */ - public Builder clearRequired() { - bitField0_ = (bitField0_ & ~0x00000010); - required_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) - private static final grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HeaderParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java deleted file mode 100644 index 929d62ee..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface HeaderParameterOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `Name` is the header name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * `Name` is the header name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * `Description` is a short description of the header.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * `Description` is a short description of the header.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-   * See: https://swagger.io/specification/v2/#parameterType.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
-   * See: https://swagger.io/specification/v2/#parameterType.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; - * @return The type. - */ - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType(); - - /** - *
-   * `Format` The extending format for the previously mentioned type.
-   * 
- * - * string format = 4 [json_name = "format"]; - * @return The format. - */ - java.lang.String getFormat(); - /** - *
-   * `Format` The extending format for the previously mentioned type.
-   * 
- * - * string format = 4 [json_name = "format"]; - * @return The bytes for format. - */ - com.google.protobuf.ByteString - getFormatBytes(); - - /** - *
-   * `Required` indicates if the header is optional
-   * 
- * - * bool required = 5 [json_name = "required"]; - * @return The required. - */ - boolean getRequired(); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Info.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Info.java deleted file mode 100644 index 5b63cd8d..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Info.java +++ /dev/null @@ -1,1980 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Info` is a representation of OpenAPI v2 specification's Info object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
- *
- * Example:
- *
- *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
- *    info: {
- *      title: "Echo API";
- *      version: "1.0";
- *      description: "";
- *      contact: {
- *        name: "gRPC-Gateway project";
- *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
- *        email: "none@example.com";
- *      };
- *      license: {
- *        name: "BSD 3-Clause License";
- *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
- *      };
- *    };
- *    ...
- *  };
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Info} - */ -public final class Info extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Info) - InfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use Info.newBuilder() to construct. - private Info(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Info() { - title_ = ""; - description_ = ""; - termsOfService_ = ""; - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Info(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 7: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Info.class, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder.class); - } - - private int bitField0_; - public static final int TITLE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - /** - *
-   * The title of the application.
-   * 
- * - * string title = 1 [json_name = "title"]; - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } - } - /** - *
-   * The title of the application.
-   * 
- * - * string title = 1 [json_name = "title"]; - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * A short description of the application. GFM syntax can be used for rich
-   * text representation.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A short description of the application. GFM syntax can be used for rich
-   * text representation.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TERMS_OF_SERVICE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object termsOfService_ = ""; - /** - *
-   * The Terms of Service for the API.
-   * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @return The termsOfService. - */ - @java.lang.Override - public java.lang.String getTermsOfService() { - java.lang.Object ref = termsOfService_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - termsOfService_ = s; - return s; - } - } - /** - *
-   * The Terms of Service for the API.
-   * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @return The bytes for termsOfService. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTermsOfServiceBytes() { - java.lang.Object ref = termsOfService_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - termsOfService_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTACT_FIELD_NUMBER = 4; - private grpc.gateway.protoc_gen_openapiv2.options.Contact contact_; - /** - *
-   * The contact information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - * @return Whether the contact field is set. - */ - @java.lang.Override - public boolean hasContact() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * The contact information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - * @return The contact. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Contact getContact() { - return contact_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; - } - /** - *
-   * The contact information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder() { - return contact_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; - } - - public static final int LICENSE_FIELD_NUMBER = 5; - private grpc.gateway.protoc_gen_openapiv2.options.License license_; - /** - *
-   * The license information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - * @return Whether the license field is set. - */ - @java.lang.Override - public boolean hasLicense() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * The license information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - * @return The license. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.License getLicense() { - return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; - } - /** - *
-   * The license information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder() { - return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; - } - - public static final int VERSION_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - *
-   * Provides the version of the application API (not to be confused
-   * with the specification version).
-   * 
- * - * string version = 6 [json_name = "version"]; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * Provides the version of the application API (not to be confused
-   * with the specification version).
-   * 
- * - * string version = 6 [json_name = "version"]; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTENSIONS_FIELD_NUMBER = 7; - private static final class ExtensionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> extensions_; - private com.google.protobuf.MapField - internalGetExtensions() { - if (extensions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExtensionsDefaultEntryHolder.defaultEntry); - } - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().getMap().size(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().getMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(termsOfService_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, termsOfService_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getContact()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(5, getLicense()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, version_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExtensions(), - ExtensionsDefaultEntryHolder.defaultEntry, - 7); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(termsOfService_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, termsOfService_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getContact()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getLicense()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, version_); - } - for (java.util.Map.Entry entry - : internalGetExtensions().getMap().entrySet()) { - com.google.protobuf.MapEntry - extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, extensions__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Info)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Info other = (grpc.gateway.protoc_gen_openapiv2.options.Info) obj; - - if (!getTitle() - .equals(other.getTitle())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getTermsOfService() - .equals(other.getTermsOfService())) return false; - if (hasContact() != other.hasContact()) return false; - if (hasContact()) { - if (!getContact() - .equals(other.getContact())) return false; - } - if (hasLicense() != other.hasLicense()) return false; - if (hasLicense()) { - if (!getLicense() - .equals(other.getLicense())) return false; - } - if (!getVersion() - .equals(other.getVersion())) return false; - if (!internalGetExtensions().equals( - other.internalGetExtensions())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + TERMS_OF_SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getTermsOfService().hashCode(); - if (hasContact()) { - hash = (37 * hash) + CONTACT_FIELD_NUMBER; - hash = (53 * hash) + getContact().hashCode(); - } - if (hasLicense()) { - hash = (37 * hash) + LICENSE_FIELD_NUMBER; - hash = (53 * hash) + getLicense().hashCode(); - } - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (!internalGetExtensions().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtensions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Info prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Info` is a representation of OpenAPI v2 specification's Info object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
-   *
-   * Example:
-   *
-   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
-   *    info: {
-   *      title: "Echo API";
-   *      version: "1.0";
-   *      description: "";
-   *      contact: {
-   *        name: "gRPC-Gateway project";
-   *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
-   *        email: "none@example.com";
-   *      };
-   *      license: {
-   *        name: "BSD 3-Clause License";
-   *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
-   *      };
-   *    };
-   *    ...
-   *  };
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Info} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Info) - grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 7: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 7: - return internalGetMutableExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Info.class, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Info.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getContactFieldBuilder(); - getLicenseFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - title_ = ""; - description_ = ""; - termsOfService_ = ""; - contact_ = null; - if (contactBuilder_ != null) { - contactBuilder_.dispose(); - contactBuilder_ = null; - } - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - version_ = ""; - internalGetMutableExtensions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Info build() { - grpc.gateway.protoc_gen_openapiv2.options.Info result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Info buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Info result = new grpc.gateway.protoc_gen_openapiv2.options.Info(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Info result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.termsOfService_ = termsOfService_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.contact_ = contactBuilder_ == null - ? contact_ - : contactBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.license_ = licenseBuilder_ == null - ? license_ - : licenseBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.version_ = version_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Info) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Info)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Info other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance()) return this; - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTermsOfService().isEmpty()) { - termsOfService_ = other.termsOfService_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasContact()) { - mergeContact(other.getContact()); - } - if (other.hasLicense()) { - mergeLicense(other.getLicense()); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000020; - onChanged(); - } - internalGetMutableExtensions().mergeFrom( - other.internalGetExtensions()); - bitField0_ |= 0x00000040; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - termsOfService_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getContactFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - input.readMessage( - getLicenseFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - com.google.protobuf.MapEntry - extensions__ = input.readMessage( - ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExtensions().ensureBuilderMap().put( - extensions__.getKey(), extensions__.getValue()); - bitField0_ |= 0x00000040; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object title_ = ""; - /** - *
-     * The title of the application.
-     * 
- * - * string title = 1 [json_name = "title"]; - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The title of the application.
-     * 
- * - * string title = 1 [json_name = "title"]; - * @return The bytes for title. - */ - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The title of the application.
-     * 
- * - * string title = 1 [json_name = "title"]; - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - title_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The title of the application.
-     * 
- * - * string title = 1 [json_name = "title"]; - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The title of the application.
-     * 
- * - * string title = 1 [json_name = "title"]; - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A short description of the application. GFM syntax can be used for rich
-     * text representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A short description of the application. GFM syntax can be used for rich
-     * text representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A short description of the application. GFM syntax can be used for rich
-     * text representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A short description of the application. GFM syntax can be used for rich
-     * text representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A short description of the application. GFM syntax can be used for rich
-     * text representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object termsOfService_ = ""; - /** - *
-     * The Terms of Service for the API.
-     * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @return The termsOfService. - */ - public java.lang.String getTermsOfService() { - java.lang.Object ref = termsOfService_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - termsOfService_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The Terms of Service for the API.
-     * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @return The bytes for termsOfService. - */ - public com.google.protobuf.ByteString - getTermsOfServiceBytes() { - java.lang.Object ref = termsOfService_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - termsOfService_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The Terms of Service for the API.
-     * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @param value The termsOfService to set. - * @return This builder for chaining. - */ - public Builder setTermsOfService( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - termsOfService_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The Terms of Service for the API.
-     * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @return This builder for chaining. - */ - public Builder clearTermsOfService() { - termsOfService_ = getDefaultInstance().getTermsOfService(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The Terms of Service for the API.
-     * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @param value The bytes for termsOfService to set. - * @return This builder for chaining. - */ - public Builder setTermsOfServiceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - termsOfService_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private grpc.gateway.protoc_gen_openapiv2.options.Contact contact_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Contact, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder> contactBuilder_; - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - * @return Whether the contact field is set. - */ - public boolean hasContact() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - * @return The contact. - */ - public grpc.gateway.protoc_gen_openapiv2.options.Contact getContact() { - if (contactBuilder_ == null) { - return contact_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; - } else { - return contactBuilder_.getMessage(); - } - } - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - public Builder setContact(grpc.gateway.protoc_gen_openapiv2.options.Contact value) { - if (contactBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contact_ = value; - } else { - contactBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - public Builder setContact( - grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder builderForValue) { - if (contactBuilder_ == null) { - contact_ = builderForValue.build(); - } else { - contactBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - public Builder mergeContact(grpc.gateway.protoc_gen_openapiv2.options.Contact value) { - if (contactBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - contact_ != null && - contact_ != grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance()) { - getContactBuilder().mergeFrom(value); - } else { - contact_ = value; - } - } else { - contactBuilder_.mergeFrom(value); - } - if (contact_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - public Builder clearContact() { - bitField0_ = (bitField0_ & ~0x00000008); - contact_ = null; - if (contactBuilder_ != null) { - contactBuilder_.dispose(); - contactBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder getContactBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getContactFieldBuilder().getBuilder(); - } - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder() { - if (contactBuilder_ != null) { - return contactBuilder_.getMessageOrBuilder(); - } else { - return contact_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; - } - } - /** - *
-     * The contact information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Contact, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder> - getContactFieldBuilder() { - if (contactBuilder_ == null) { - contactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Contact, grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder>( - getContact(), - getParentForChildren(), - isClean()); - contact_ = null; - } - return contactBuilder_; - } - - private grpc.gateway.protoc_gen_openapiv2.options.License license_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.License, grpc.gateway.protoc_gen_openapiv2.options.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder> licenseBuilder_; - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - * @return Whether the license field is set. - */ - public boolean hasLicense() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - * @return The license. - */ - public grpc.gateway.protoc_gen_openapiv2.options.License getLicense() { - if (licenseBuilder_ == null) { - return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; - } else { - return licenseBuilder_.getMessage(); - } - } - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - public Builder setLicense(grpc.gateway.protoc_gen_openapiv2.options.License value) { - if (licenseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - license_ = value; - } else { - licenseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - public Builder setLicense( - grpc.gateway.protoc_gen_openapiv2.options.License.Builder builderForValue) { - if (licenseBuilder_ == null) { - license_ = builderForValue.build(); - } else { - licenseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - public Builder mergeLicense(grpc.gateway.protoc_gen_openapiv2.options.License value) { - if (licenseBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - license_ != null && - license_ != grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance()) { - getLicenseBuilder().mergeFrom(value); - } else { - license_ = value; - } - } else { - licenseBuilder_.mergeFrom(value); - } - if (license_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - public Builder clearLicense() { - bitField0_ = (bitField0_ & ~0x00000010); - license_ = null; - if (licenseBuilder_ != null) { - licenseBuilder_.dispose(); - licenseBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.License.Builder getLicenseBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getLicenseFieldBuilder().getBuilder(); - } - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder() { - if (licenseBuilder_ != null) { - return licenseBuilder_.getMessageOrBuilder(); - } else { - return license_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; - } - } - /** - *
-     * The license information for the exposed API.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.License, grpc.gateway.protoc_gen_openapiv2.options.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder> - getLicenseFieldBuilder() { - if (licenseBuilder_ == null) { - licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.License, grpc.gateway.protoc_gen_openapiv2.options.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder>( - getLicense(), - getParentForChildren(), - isClean()); - license_ = null; - } - return licenseBuilder_; - } - - private java.lang.Object version_ = ""; - /** - *
-     * Provides the version of the application API (not to be confused
-     * with the specification version).
-     * 
- * - * string version = 6 [json_name = "version"]; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Provides the version of the application API (not to be confused
-     * with the specification version).
-     * 
- * - * string version = 6 [json_name = "version"]; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Provides the version of the application API (not to be confused
-     * with the specification version).
-     * 
- * - * string version = 6 [json_name = "version"]; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - version_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Provides the version of the application API (not to be confused
-     * with the specification version).
-     * 
- * - * string version = 6 [json_name = "version"]; - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * Provides the version of the application API (not to be confused
-     * with the specification version).
-     * 
- * - * string version = 6 [json_name = "version"]; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ExtensionsDefaultEntryHolder.defaultEntry; - } - }; - private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; - private com.google.protobuf.MapFieldBuilder - internalGetExtensions() { - if (extensions_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - return extensions_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableExtensions() { - if (extensions_ == null) { - extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - bitField0_ |= 0x00000040; - onChanged(); - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().ensureBuilderMap().size(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getImmutableMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return extensionsConverter.build(map.get(key)); - } - public Builder clearExtensions() { - bitField0_ = (bitField0_ & ~0x00000040); - internalGetMutableExtensions().clear(); - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - public Builder removeExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtensions().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExtensions() { - bitField0_ |= 0x00000040; - return internalGetMutableExtensions().ensureMessageMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - public Builder putExtensions( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableExtensions().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000040; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - public Builder putAllExtensions( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableExtensions().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000040; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Info) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Info) - private static final grpc.gateway.protoc_gen_openapiv2.options.Info DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Info(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Info parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java deleted file mode 100644 index 592bd4d4..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java +++ /dev/null @@ -1,212 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface InfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Info) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The title of the application.
-   * 
- * - * string title = 1 [json_name = "title"]; - * @return The title. - */ - java.lang.String getTitle(); - /** - *
-   * The title of the application.
-   * 
- * - * string title = 1 [json_name = "title"]; - * @return The bytes for title. - */ - com.google.protobuf.ByteString - getTitleBytes(); - - /** - *
-   * A short description of the application. GFM syntax can be used for rich
-   * text representation.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A short description of the application. GFM syntax can be used for rich
-   * text representation.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * The Terms of Service for the API.
-   * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @return The termsOfService. - */ - java.lang.String getTermsOfService(); - /** - *
-   * The Terms of Service for the API.
-   * 
- * - * string terms_of_service = 3 [json_name = "termsOfService"]; - * @return The bytes for termsOfService. - */ - com.google.protobuf.ByteString - getTermsOfServiceBytes(); - - /** - *
-   * The contact information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - * @return Whether the contact field is set. - */ - boolean hasContact(); - /** - *
-   * The contact information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - * @return The contact. - */ - grpc.gateway.protoc_gen_openapiv2.options.Contact getContact(); - /** - *
-   * The contact information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder(); - - /** - *
-   * The license information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - * @return Whether the license field is set. - */ - boolean hasLicense(); - /** - *
-   * The license information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - * @return The license. - */ - grpc.gateway.protoc_gen_openapiv2.options.License getLicense(); - /** - *
-   * The license information for the exposed API.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder(); - - /** - *
-   * Provides the version of the application API (not to be confused
-   * with the specification version).
-   * 
- * - * string version = 6 [json_name = "version"]; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * Provides the version of the application API (not to be confused
-   * with the specification version).
-   * 
- * - * string version = 6 [json_name = "version"]; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - int getExtensionsCount(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - boolean containsExtensions( - java.lang.String key); - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExtensions(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - java.util.Map - getExtensionsMap(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; - */ - com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java deleted file mode 100644 index 9f6b6c3e..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java +++ /dev/null @@ -1,4860 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `JSONSchema` represents properties from JSON Schema taken, and as used, in
- * the OpenAPI v2 spec.
- *
- * This includes changes made by OpenAPI v2.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
- *
- * See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
- * https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
- *
- * Example:
- *
- *  message SimpleMessage {
- *    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
- *      json_schema: {
- *        title: "SimpleMessage"
- *        description: "A simple message."
- *        required: ["id"]
- *      }
- *    };
- *
- *    // Id represents the message identifier.
- *    string id = 1; [
- *        (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
- *          description: "The unique identifier of the simple message."
- *        }];
- *  }
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} - */ -public final class JSONSchema extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) - JSONSchemaOrBuilder { -private static final long serialVersionUID = 0L; - // Use JSONSchema.newBuilder() to construct. - private JSONSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private JSONSchema() { - ref_ = ""; - title_ = ""; - description_ = ""; - default_ = ""; - example_ = ""; - pattern_ = ""; - required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - array_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - type_ = java.util.Collections.emptyList(); - format_ = ""; - enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new JSONSchema(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 48: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder.class); - } - - /** - * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes} - */ - public enum JSONSchemaSimpleTypes - implements com.google.protobuf.ProtocolMessageEnum { - /** - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * ARRAY = 1; - */ - ARRAY(1), - /** - * BOOLEAN = 2; - */ - BOOLEAN(2), - /** - * INTEGER = 3; - */ - INTEGER(3), - /** - * NULL = 4; - */ - NULL(4), - /** - * NUMBER = 5; - */ - NUMBER(5), - /** - * OBJECT = 6; - */ - OBJECT(6), - /** - * STRING = 7; - */ - STRING(7), - UNRECOGNIZED(-1), - ; - - /** - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - * ARRAY = 1; - */ - public static final int ARRAY_VALUE = 1; - /** - * BOOLEAN = 2; - */ - public static final int BOOLEAN_VALUE = 2; - /** - * INTEGER = 3; - */ - public static final int INTEGER_VALUE = 3; - /** - * NULL = 4; - */ - public static final int NULL_VALUE = 4; - /** - * NUMBER = 5; - */ - public static final int NUMBER_VALUE = 5; - /** - * OBJECT = 6; - */ - public static final int OBJECT_VALUE = 6; - /** - * STRING = 7; - */ - public static final int STRING_VALUE = 7; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static JSONSchemaSimpleTypes valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static JSONSchemaSimpleTypes forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return ARRAY; - case 2: return BOOLEAN; - case 3: return INTEGER; - case 4: return NULL; - case 5: return NUMBER; - case 6: return OBJECT; - case 7: return STRING; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - JSONSchemaSimpleTypes> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public JSONSchemaSimpleTypes findValueByNumber(int number) { - return JSONSchemaSimpleTypes.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDescriptor().getEnumTypes().get(0); - } - - private static final JSONSchemaSimpleTypes[] VALUES = values(); - - public static JSONSchemaSimpleTypes valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private JSONSchemaSimpleTypes(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes) - } - - public interface FieldConfigurationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Alternative parameter name when used as path parameter. If set, this will
-     * be used as the complete parameter name when this field is used as a path
-     * parameter. Use this to avoid having auto generated path parameter names
-     * for overlapping paths.
-     * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @return The pathParamName. - */ - java.lang.String getPathParamName(); - /** - *
-     * Alternative parameter name when used as path parameter. If set, this will
-     * be used as the complete parameter name when this field is used as a path
-     * parameter. Use this to avoid having auto generated path parameter names
-     * for overlapping paths.
-     * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @return The bytes for pathParamName. - */ - com.google.protobuf.ByteString - getPathParamNameBytes(); - } - /** - *
-   * 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
-   * These properties are not defined by OpenAPIv2, but they are used to control the generation.
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} - */ - public static final class FieldConfiguration extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) - FieldConfigurationOrBuilder { - private static final long serialVersionUID = 0L; - // Use FieldConfiguration.newBuilder() to construct. - private FieldConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FieldConfiguration() { - pathParamName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FieldConfiguration(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.class, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder.class); - } - - public static final int PATH_PARAM_NAME_FIELD_NUMBER = 47; - @SuppressWarnings("serial") - private volatile java.lang.Object pathParamName_ = ""; - /** - *
-     * Alternative parameter name when used as path parameter. If set, this will
-     * be used as the complete parameter name when this field is used as a path
-     * parameter. Use this to avoid having auto generated path parameter names
-     * for overlapping paths.
-     * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @return The pathParamName. - */ - @java.lang.Override - public java.lang.String getPathParamName() { - java.lang.Object ref = pathParamName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pathParamName_ = s; - return s; - } - } - /** - *
-     * Alternative parameter name when used as path parameter. If set, this will
-     * be used as the complete parameter name when this field is used as a path
-     * parameter. Use this to avoid having auto generated path parameter names
-     * for overlapping paths.
-     * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @return The bytes for pathParamName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPathParamNameBytes() { - java.lang.Object ref = pathParamName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pathParamName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pathParamName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 47, pathParamName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pathParamName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(47, pathParamName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration other = (grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) obj; - - if (!getPathParamName() - .equals(other.getPathParamName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PATH_PARAM_NAME_FIELD_NUMBER; - hash = (53 * hash) + getPathParamName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
-     * These properties are not defined by OpenAPIv2, but they are used to control the generation.
-     * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.class, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - pathParamName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration build() { - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result = new grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.pathParamName_ = pathParamName_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance()) return this; - if (!other.getPathParamName().isEmpty()) { - pathParamName_ = other.pathParamName_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 378: { - pathParamName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 378 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object pathParamName_ = ""; - /** - *
-       * Alternative parameter name when used as path parameter. If set, this will
-       * be used as the complete parameter name when this field is used as a path
-       * parameter. Use this to avoid having auto generated path parameter names
-       * for overlapping paths.
-       * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @return The pathParamName. - */ - public java.lang.String getPathParamName() { - java.lang.Object ref = pathParamName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pathParamName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Alternative parameter name when used as path parameter. If set, this will
-       * be used as the complete parameter name when this field is used as a path
-       * parameter. Use this to avoid having auto generated path parameter names
-       * for overlapping paths.
-       * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @return The bytes for pathParamName. - */ - public com.google.protobuf.ByteString - getPathParamNameBytes() { - java.lang.Object ref = pathParamName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pathParamName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Alternative parameter name when used as path parameter. If set, this will
-       * be used as the complete parameter name when this field is used as a path
-       * parameter. Use this to avoid having auto generated path parameter names
-       * for overlapping paths.
-       * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @param value The pathParamName to set. - * @return This builder for chaining. - */ - public Builder setPathParamName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pathParamName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-       * Alternative parameter name when used as path parameter. If set, this will
-       * be used as the complete parameter name when this field is used as a path
-       * parameter. Use this to avoid having auto generated path parameter names
-       * for overlapping paths.
-       * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @return This builder for chaining. - */ - public Builder clearPathParamName() { - pathParamName_ = getDefaultInstance().getPathParamName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Alternative parameter name when used as path parameter. If set, this will
-       * be used as the complete parameter name when this field is used as a path
-       * parameter. Use this to avoid having auto generated path parameter names
-       * for overlapping paths.
-       * 
- * - * string path_param_name = 47 [json_name = "pathParamName"]; - * @param value The bytes for pathParamName to set. - * @return This builder for chaining. - */ - public Builder setPathParamNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pathParamName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) - private static final grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FieldConfiguration parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int REF_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object ref_ = ""; - /** - *
-   * Ref is used to define an external reference to include in the message.
-   * This could be a fully qualified proto message reference, and that type must
-   * be imported into the protofile. If no message is identified, the Ref will
-   * be used verbatim in the output.
-   * For example:
-   *  `ref: ".google.protobuf.Timestamp"`.
-   * 
- * - * string ref = 3 [json_name = "ref"]; - * @return The ref. - */ - @java.lang.Override - public java.lang.String getRef() { - java.lang.Object ref = ref_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ref_ = s; - return s; - } - } - /** - *
-   * Ref is used to define an external reference to include in the message.
-   * This could be a fully qualified proto message reference, and that type must
-   * be imported into the protofile. If no message is identified, the Ref will
-   * be used verbatim in the output.
-   * For example:
-   *  `ref: ".google.protobuf.Timestamp"`.
-   * 
- * - * string ref = 3 [json_name = "ref"]; - * @return The bytes for ref. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRefBytes() { - java.lang.Object ref = ref_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ref_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TITLE_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - /** - *
-   * The title of the schema.
-   * 
- * - * string title = 5 [json_name = "title"]; - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } - } - /** - *
-   * The title of the schema.
-   * 
- * - * string title = 5 [json_name = "title"]; - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * A short description of the schema.
-   * 
- * - * string description = 6 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A short description of the schema.
-   * 
- * - * string description = 6 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFAULT_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private volatile java.lang.Object default_ = ""; - /** - * string default = 7 [json_name = "default"]; - * @return The default. - */ - @java.lang.Override - public java.lang.String getDefault() { - java.lang.Object ref = default_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - default_ = s; - return s; - } - } - /** - * string default = 7 [json_name = "default"]; - * @return The bytes for default. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDefaultBytes() { - java.lang.Object ref = default_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - default_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_ONLY_FIELD_NUMBER = 8; - private boolean readOnly_ = false; - /** - * bool read_only = 8 [json_name = "readOnly"]; - * @return The readOnly. - */ - @java.lang.Override - public boolean getReadOnly() { - return readOnly_; - } - - public static final int EXAMPLE_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private volatile java.lang.Object example_ = ""; - /** - *
-   * A free-form property to include a JSON example of this field. This is copied
-   * verbatim to the output swagger.json. Quotes must be escaped.
-   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-   * 
- * - * string example = 9 [json_name = "example"]; - * @return The example. - */ - @java.lang.Override - public java.lang.String getExample() { - java.lang.Object ref = example_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - example_ = s; - return s; - } - } - /** - *
-   * A free-form property to include a JSON example of this field. This is copied
-   * verbatim to the output swagger.json. Quotes must be escaped.
-   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-   * 
- * - * string example = 9 [json_name = "example"]; - * @return The bytes for example. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExampleBytes() { - java.lang.Object ref = example_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - example_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MULTIPLE_OF_FIELD_NUMBER = 10; - private double multipleOf_ = 0D; - /** - * double multiple_of = 10 [json_name = "multipleOf"]; - * @return The multipleOf. - */ - @java.lang.Override - public double getMultipleOf() { - return multipleOf_; - } - - public static final int MAXIMUM_FIELD_NUMBER = 11; - private double maximum_ = 0D; - /** - *
-   * Maximum represents an inclusive upper limit for a numeric instance. The
-   * value of MUST be a number,
-   * 
- * - * double maximum = 11 [json_name = "maximum"]; - * @return The maximum. - */ - @java.lang.Override - public double getMaximum() { - return maximum_; - } - - public static final int EXCLUSIVE_MAXIMUM_FIELD_NUMBER = 12; - private boolean exclusiveMaximum_ = false; - /** - * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; - * @return The exclusiveMaximum. - */ - @java.lang.Override - public boolean getExclusiveMaximum() { - return exclusiveMaximum_; - } - - public static final int MINIMUM_FIELD_NUMBER = 13; - private double minimum_ = 0D; - /** - *
-   * minimum represents an inclusive lower limit for a numeric instance. The
-   * value of MUST be a number,
-   * 
- * - * double minimum = 13 [json_name = "minimum"]; - * @return The minimum. - */ - @java.lang.Override - public double getMinimum() { - return minimum_; - } - - public static final int EXCLUSIVE_MINIMUM_FIELD_NUMBER = 14; - private boolean exclusiveMinimum_ = false; - /** - * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; - * @return The exclusiveMinimum. - */ - @java.lang.Override - public boolean getExclusiveMinimum() { - return exclusiveMinimum_; - } - - public static final int MAX_LENGTH_FIELD_NUMBER = 15; - private long maxLength_ = 0L; - /** - * uint64 max_length = 15 [json_name = "maxLength"]; - * @return The maxLength. - */ - @java.lang.Override - public long getMaxLength() { - return maxLength_; - } - - public static final int MIN_LENGTH_FIELD_NUMBER = 16; - private long minLength_ = 0L; - /** - * uint64 min_length = 16 [json_name = "minLength"]; - * @return The minLength. - */ - @java.lang.Override - public long getMinLength() { - return minLength_; - } - - public static final int PATTERN_FIELD_NUMBER = 17; - @SuppressWarnings("serial") - private volatile java.lang.Object pattern_ = ""; - /** - * string pattern = 17 [json_name = "pattern"]; - * @return The pattern. - */ - @java.lang.Override - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pattern_ = s; - return s; - } - } - /** - * string pattern = 17 [json_name = "pattern"]; - * @return The bytes for pattern. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MAX_ITEMS_FIELD_NUMBER = 20; - private long maxItems_ = 0L; - /** - * uint64 max_items = 20 [json_name = "maxItems"]; - * @return The maxItems. - */ - @java.lang.Override - public long getMaxItems() { - return maxItems_; - } - - public static final int MIN_ITEMS_FIELD_NUMBER = 21; - private long minItems_ = 0L; - /** - * uint64 min_items = 21 [json_name = "minItems"]; - * @return The minItems. - */ - @java.lang.Override - public long getMinItems() { - return minItems_; - } - - public static final int UNIQUE_ITEMS_FIELD_NUMBER = 22; - private boolean uniqueItems_ = false; - /** - * bool unique_items = 22 [json_name = "uniqueItems"]; - * @return The uniqueItems. - */ - @java.lang.Override - public boolean getUniqueItems() { - return uniqueItems_; - } - - public static final int MAX_PROPERTIES_FIELD_NUMBER = 24; - private long maxProperties_ = 0L; - /** - * uint64 max_properties = 24 [json_name = "maxProperties"]; - * @return The maxProperties. - */ - @java.lang.Override - public long getMaxProperties() { - return maxProperties_; - } - - public static final int MIN_PROPERTIES_FIELD_NUMBER = 25; - private long minProperties_ = 0L; - /** - * uint64 min_properties = 25 [json_name = "minProperties"]; - * @return The minProperties. - */ - @java.lang.Override - public long getMinProperties() { - return minProperties_; - } - - public static final int REQUIRED_FIELD_NUMBER = 26; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string required = 26 [json_name = "required"]; - * @return A list containing the required. - */ - public com.google.protobuf.ProtocolStringList - getRequiredList() { - return required_; - } - /** - * repeated string required = 26 [json_name = "required"]; - * @return The count of required. - */ - public int getRequiredCount() { - return required_.size(); - } - /** - * repeated string required = 26 [json_name = "required"]; - * @param index The index of the element to return. - * @return The required at the given index. - */ - public java.lang.String getRequired(int index) { - return required_.get(index); - } - /** - * repeated string required = 26 [json_name = "required"]; - * @param index The index of the value to return. - * @return The bytes of the required at the given index. - */ - public com.google.protobuf.ByteString - getRequiredBytes(int index) { - return required_.getByteString(index); - } - - public static final int ARRAY_FIELD_NUMBER = 34; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList array_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * Items in 'array' must be unique.
-   * 
- * - * repeated string array = 34 [json_name = "array"]; - * @return A list containing the array. - */ - public com.google.protobuf.ProtocolStringList - getArrayList() { - return array_; - } - /** - *
-   * Items in 'array' must be unique.
-   * 
- * - * repeated string array = 34 [json_name = "array"]; - * @return The count of array. - */ - public int getArrayCount() { - return array_.size(); - } - /** - *
-   * Items in 'array' must be unique.
-   * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param index The index of the element to return. - * @return The array at the given index. - */ - public java.lang.String getArray(int index) { - return array_.get(index); - } - /** - *
-   * Items in 'array' must be unique.
-   * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param index The index of the value to return. - * @return The bytes of the array at the given index. - */ - public com.google.protobuf.ByteString - getArrayBytes(int index) { - return array_.getByteString(index); - } - - public static final int TYPE_FIELD_NUMBER = 35; - @SuppressWarnings("serial") - private java.util.List type_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes> type_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>() { - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes convert(java.lang.Integer from) { - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes result = grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes.forNumber(from); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes.UNRECOGNIZED : result; - } - }; - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return A list containing the type. - */ - @java.lang.Override - public java.util.List getTypeList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>(type_, type_converter_); - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return The count of type. - */ - @java.lang.Override - public int getTypeCount() { - return type_.size(); - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param index The index of the element to return. - * @return The type at the given index. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index) { - return type_converter_.convert(type_.get(index)); - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return A list containing the enum numeric values on the wire for type. - */ - @java.lang.Override - public java.util.List - getTypeValueList() { - return type_; - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of type at the given index. - */ - @java.lang.Override - public int getTypeValue(int index) { - return type_.get(index); - } - private int typeMemoizedSerializedSize; - - public static final int FORMAT_FIELD_NUMBER = 36; - @SuppressWarnings("serial") - private volatile java.lang.Object format_ = ""; - /** - *
-   * `Format`
-   * 
- * - * string format = 36 [json_name = "format"]; - * @return The format. - */ - @java.lang.Override - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } - } - /** - *
-   * `Format`
-   * 
- * - * string format = 36 [json_name = "format"]; - * @return The bytes for format. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENUM_FIELD_NUMBER = 46; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-   * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @return A list containing the enum. - */ - public com.google.protobuf.ProtocolStringList - getEnumList() { - return enum_; - } - /** - *
-   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-   * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @return The count of enum. - */ - public int getEnumCount() { - return enum_.size(); - } - /** - *
-   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-   * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param index The index of the element to return. - * @return The enum at the given index. - */ - public java.lang.String getEnum(int index) { - return enum_.get(index); - } - /** - *
-   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-   * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param index The index of the value to return. - * @return The bytes of the enum at the given index. - */ - public com.google.protobuf.ByteString - getEnumBytes(int index) { - return enum_.getByteString(index); - } - - public static final int FIELD_CONFIGURATION_FIELD_NUMBER = 1001; - private grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration fieldConfiguration_; - /** - *
-   * Additional field level properties used when generating the OpenAPI v2 file.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - * @return Whether the fieldConfiguration field is set. - */ - @java.lang.Override - public boolean hasFieldConfiguration() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Additional field level properties used when generating the OpenAPI v2 file.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - * @return The fieldConfiguration. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration() { - return fieldConfiguration_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; - } - /** - *
-   * Additional field level properties used when generating the OpenAPI v2 file.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder() { - return fieldConfiguration_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; - } - - public static final int EXTENSIONS_FIELD_NUMBER = 48; - private static final class ExtensionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> extensions_; - private com.google.protobuf.MapField - internalGetExtensions() { - if (extensions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExtensionsDefaultEntryHolder.defaultEntry); - } - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().getMap().size(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().getMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ref_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ref_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(default_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, default_); - } - if (readOnly_ != false) { - output.writeBool(8, readOnly_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(example_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, example_); - } - if (java.lang.Double.doubleToRawLongBits(multipleOf_) != 0) { - output.writeDouble(10, multipleOf_); - } - if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { - output.writeDouble(11, maximum_); - } - if (exclusiveMaximum_ != false) { - output.writeBool(12, exclusiveMaximum_); - } - if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { - output.writeDouble(13, minimum_); - } - if (exclusiveMinimum_ != false) { - output.writeBool(14, exclusiveMinimum_); - } - if (maxLength_ != 0L) { - output.writeUInt64(15, maxLength_); - } - if (minLength_ != 0L) { - output.writeUInt64(16, minLength_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, pattern_); - } - if (maxItems_ != 0L) { - output.writeUInt64(20, maxItems_); - } - if (minItems_ != 0L) { - output.writeUInt64(21, minItems_); - } - if (uniqueItems_ != false) { - output.writeBool(22, uniqueItems_); - } - if (maxProperties_ != 0L) { - output.writeUInt64(24, maxProperties_); - } - if (minProperties_ != 0L) { - output.writeUInt64(25, minProperties_); - } - for (int i = 0; i < required_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 26, required_.getRaw(i)); - } - for (int i = 0; i < array_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 34, array_.getRaw(i)); - } - if (getTypeList().size() > 0) { - output.writeUInt32NoTag(282); - output.writeUInt32NoTag(typeMemoizedSerializedSize); - } - for (int i = 0; i < type_.size(); i++) { - output.writeEnumNoTag(type_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 36, format_); - } - for (int i = 0; i < enum_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 46, enum_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExtensions(), - ExtensionsDefaultEntryHolder.defaultEntry, - 48); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1001, getFieldConfiguration()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ref_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ref_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, title_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(default_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, default_); - } - if (readOnly_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, readOnly_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(example_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, example_); - } - if (java.lang.Double.doubleToRawLongBits(multipleOf_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(10, multipleOf_); - } - if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(11, maximum_); - } - if (exclusiveMaximum_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(12, exclusiveMaximum_); - } - if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(13, minimum_); - } - if (exclusiveMinimum_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(14, exclusiveMinimum_); - } - if (maxLength_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(15, maxLength_); - } - if (minLength_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(16, minLength_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, pattern_); - } - if (maxItems_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(20, maxItems_); - } - if (minItems_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(21, minItems_); - } - if (uniqueItems_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(22, uniqueItems_); - } - if (maxProperties_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(24, maxProperties_); - } - if (minProperties_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(25, minProperties_); - } - { - int dataSize = 0; - for (int i = 0; i < required_.size(); i++) { - dataSize += computeStringSizeNoTag(required_.getRaw(i)); - } - size += dataSize; - size += 2 * getRequiredList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < array_.size(); i++) { - dataSize += computeStringSizeNoTag(array_.getRaw(i)); - } - size += dataSize; - size += 2 * getArrayList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < type_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(type_.get(i)); - } - size += dataSize; - if (!getTypeList().isEmpty()) { size += 2; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }typeMemoizedSerializedSize = dataSize; - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, format_); - } - { - int dataSize = 0; - for (int i = 0; i < enum_.size(); i++) { - dataSize += computeStringSizeNoTag(enum_.getRaw(i)); - } - size += dataSize; - size += 2 * getEnumList().size(); - } - for (java.util.Map.Entry entry - : internalGetExtensions().getMap().entrySet()) { - com.google.protobuf.MapEntry - extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(48, extensions__); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1001, getFieldConfiguration()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema other = (grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) obj; - - if (!getRef() - .equals(other.getRef())) return false; - if (!getTitle() - .equals(other.getTitle())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getDefault() - .equals(other.getDefault())) return false; - if (getReadOnly() - != other.getReadOnly()) return false; - if (!getExample() - .equals(other.getExample())) return false; - if (java.lang.Double.doubleToLongBits(getMultipleOf()) - != java.lang.Double.doubleToLongBits( - other.getMultipleOf())) return false; - if (java.lang.Double.doubleToLongBits(getMaximum()) - != java.lang.Double.doubleToLongBits( - other.getMaximum())) return false; - if (getExclusiveMaximum() - != other.getExclusiveMaximum()) return false; - if (java.lang.Double.doubleToLongBits(getMinimum()) - != java.lang.Double.doubleToLongBits( - other.getMinimum())) return false; - if (getExclusiveMinimum() - != other.getExclusiveMinimum()) return false; - if (getMaxLength() - != other.getMaxLength()) return false; - if (getMinLength() - != other.getMinLength()) return false; - if (!getPattern() - .equals(other.getPattern())) return false; - if (getMaxItems() - != other.getMaxItems()) return false; - if (getMinItems() - != other.getMinItems()) return false; - if (getUniqueItems() - != other.getUniqueItems()) return false; - if (getMaxProperties() - != other.getMaxProperties()) return false; - if (getMinProperties() - != other.getMinProperties()) return false; - if (!getRequiredList() - .equals(other.getRequiredList())) return false; - if (!getArrayList() - .equals(other.getArrayList())) return false; - if (!type_.equals(other.type_)) return false; - if (!getFormat() - .equals(other.getFormat())) return false; - if (!getEnumList() - .equals(other.getEnumList())) return false; - if (hasFieldConfiguration() != other.hasFieldConfiguration()) return false; - if (hasFieldConfiguration()) { - if (!getFieldConfiguration() - .equals(other.getFieldConfiguration())) return false; - } - if (!internalGetExtensions().equals( - other.internalGetExtensions())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + REF_FIELD_NUMBER; - hash = (53 * hash) + getRef().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + DEFAULT_FIELD_NUMBER; - hash = (53 * hash) + getDefault().hashCode(); - hash = (37 * hash) + READ_ONLY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReadOnly()); - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExample().hashCode(); - hash = (37 * hash) + MULTIPLE_OF_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMultipleOf())); - hash = (37 * hash) + MAXIMUM_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMaximum())); - hash = (37 * hash) + EXCLUSIVE_MAXIMUM_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getExclusiveMaximum()); - hash = (37 * hash) + MINIMUM_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMinimum())); - hash = (37 * hash) + EXCLUSIVE_MINIMUM_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getExclusiveMinimum()); - hash = (37 * hash) + MAX_LENGTH_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxLength()); - hash = (37 * hash) + MIN_LENGTH_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinLength()); - hash = (37 * hash) + PATTERN_FIELD_NUMBER; - hash = (53 * hash) + getPattern().hashCode(); - hash = (37 * hash) + MAX_ITEMS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxItems()); - hash = (37 * hash) + MIN_ITEMS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinItems()); - hash = (37 * hash) + UNIQUE_ITEMS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getUniqueItems()); - hash = (37 * hash) + MAX_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxProperties()); - hash = (37 * hash) + MIN_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinProperties()); - if (getRequiredCount() > 0) { - hash = (37 * hash) + REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + getRequiredList().hashCode(); - } - if (getArrayCount() > 0) { - hash = (37 * hash) + ARRAY_FIELD_NUMBER; - hash = (53 * hash) + getArrayList().hashCode(); - } - if (getTypeCount() > 0) { - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_.hashCode(); - } - hash = (37 * hash) + FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getFormat().hashCode(); - if (getEnumCount() > 0) { - hash = (37 * hash) + ENUM_FIELD_NUMBER; - hash = (53 * hash) + getEnumList().hashCode(); - } - if (hasFieldConfiguration()) { - hash = (37 * hash) + FIELD_CONFIGURATION_FIELD_NUMBER; - hash = (53 * hash) + getFieldConfiguration().hashCode(); - } - if (!internalGetExtensions().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtensions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `JSONSchema` represents properties from JSON Schema taken, and as used, in
-   * the OpenAPI v2 spec.
-   *
-   * This includes changes made by OpenAPI v2.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-   *
-   * See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
-   * https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
-   *
-   * Example:
-   *
-   *  message SimpleMessage {
-   *    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
-   *      json_schema: {
-   *        title: "SimpleMessage"
-   *        description: "A simple message."
-   *        required: ["id"]
-   *      }
-   *    };
-   *
-   *    // Id represents the message identifier.
-   *    string id = 1; [
-   *        (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
-   *          description: "The unique identifier of the simple message."
-   *        }];
-   *  }
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) - grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 48: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 48: - return internalGetMutableExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFieldConfigurationFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - ref_ = ""; - title_ = ""; - description_ = ""; - default_ = ""; - readOnly_ = false; - example_ = ""; - multipleOf_ = 0D; - maximum_ = 0D; - exclusiveMaximum_ = false; - minimum_ = 0D; - exclusiveMinimum_ = false; - maxLength_ = 0L; - minLength_ = 0L; - pattern_ = ""; - maxItems_ = 0L; - minItems_ = 0L; - uniqueItems_ = false; - maxProperties_ = 0L; - minProperties_ = 0L; - required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - array_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - type_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00200000); - format_ = ""; - enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - fieldConfiguration_ = null; - if (fieldConfigurationBuilder_ != null) { - fieldConfigurationBuilder_.dispose(); - fieldConfigurationBuilder_ = null; - } - internalGetMutableExtensions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema build() { - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result = new grpc.gateway.protoc_gen_openapiv2.options.JSONSchema(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result) { - if (((bitField0_ & 0x00200000) != 0)) { - type_ = java.util.Collections.unmodifiableList(type_); - bitField0_ = (bitField0_ & ~0x00200000); - } - result.type_ = type_; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.ref_ = ref_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.default_ = default_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.readOnly_ = readOnly_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.example_ = example_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.multipleOf_ = multipleOf_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.maximum_ = maximum_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.exclusiveMaximum_ = exclusiveMaximum_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.minimum_ = minimum_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.exclusiveMinimum_ = exclusiveMinimum_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.maxLength_ = maxLength_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.minLength_ = minLength_; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.pattern_ = pattern_; - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.maxItems_ = maxItems_; - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.minItems_ = minItems_; - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.uniqueItems_ = uniqueItems_; - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.maxProperties_ = maxProperties_; - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.minProperties_ = minProperties_; - } - if (((from_bitField0_ & 0x00080000) != 0)) { - required_.makeImmutable(); - result.required_ = required_; - } - if (((from_bitField0_ & 0x00100000) != 0)) { - array_.makeImmutable(); - result.array_ = array_; - } - if (((from_bitField0_ & 0x00400000) != 0)) { - result.format_ = format_; - } - if (((from_bitField0_ & 0x00800000) != 0)) { - enum_.makeImmutable(); - result.enum_ = enum_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x01000000) != 0)) { - result.fieldConfiguration_ = fieldConfigurationBuilder_ == null - ? fieldConfiguration_ - : fieldConfigurationBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x02000000) != 0)) { - result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()) return this; - if (!other.getRef().isEmpty()) { - ref_ = other.ref_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getDefault().isEmpty()) { - default_ = other.default_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.getReadOnly() != false) { - setReadOnly(other.getReadOnly()); - } - if (!other.getExample().isEmpty()) { - example_ = other.example_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.getMultipleOf() != 0D) { - setMultipleOf(other.getMultipleOf()); - } - if (other.getMaximum() != 0D) { - setMaximum(other.getMaximum()); - } - if (other.getExclusiveMaximum() != false) { - setExclusiveMaximum(other.getExclusiveMaximum()); - } - if (other.getMinimum() != 0D) { - setMinimum(other.getMinimum()); - } - if (other.getExclusiveMinimum() != false) { - setExclusiveMinimum(other.getExclusiveMinimum()); - } - if (other.getMaxLength() != 0L) { - setMaxLength(other.getMaxLength()); - } - if (other.getMinLength() != 0L) { - setMinLength(other.getMinLength()); - } - if (!other.getPattern().isEmpty()) { - pattern_ = other.pattern_; - bitField0_ |= 0x00002000; - onChanged(); - } - if (other.getMaxItems() != 0L) { - setMaxItems(other.getMaxItems()); - } - if (other.getMinItems() != 0L) { - setMinItems(other.getMinItems()); - } - if (other.getUniqueItems() != false) { - setUniqueItems(other.getUniqueItems()); - } - if (other.getMaxProperties() != 0L) { - setMaxProperties(other.getMaxProperties()); - } - if (other.getMinProperties() != 0L) { - setMinProperties(other.getMinProperties()); - } - if (!other.required_.isEmpty()) { - if (required_.isEmpty()) { - required_ = other.required_; - bitField0_ |= 0x00080000; - } else { - ensureRequiredIsMutable(); - required_.addAll(other.required_); - } - onChanged(); - } - if (!other.array_.isEmpty()) { - if (array_.isEmpty()) { - array_ = other.array_; - bitField0_ |= 0x00100000; - } else { - ensureArrayIsMutable(); - array_.addAll(other.array_); - } - onChanged(); - } - if (!other.type_.isEmpty()) { - if (type_.isEmpty()) { - type_ = other.type_; - bitField0_ = (bitField0_ & ~0x00200000); - } else { - ensureTypeIsMutable(); - type_.addAll(other.type_); - } - onChanged(); - } - if (!other.getFormat().isEmpty()) { - format_ = other.format_; - bitField0_ |= 0x00400000; - onChanged(); - } - if (!other.enum_.isEmpty()) { - if (enum_.isEmpty()) { - enum_ = other.enum_; - bitField0_ |= 0x00800000; - } else { - ensureEnumIsMutable(); - enum_.addAll(other.enum_); - } - onChanged(); - } - if (other.hasFieldConfiguration()) { - mergeFieldConfiguration(other.getFieldConfiguration()); - } - internalGetMutableExtensions().mergeFrom( - other.internalGetExtensions()); - bitField0_ |= 0x02000000; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 26: { - ref_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 26 - case 42: { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 42 - case 50: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 50 - case 58: { - default_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 58 - case 64: { - readOnly_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 64 - case 74: { - example_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 74 - case 81: { - multipleOf_ = input.readDouble(); - bitField0_ |= 0x00000040; - break; - } // case 81 - case 89: { - maximum_ = input.readDouble(); - bitField0_ |= 0x00000080; - break; - } // case 89 - case 96: { - exclusiveMaximum_ = input.readBool(); - bitField0_ |= 0x00000100; - break; - } // case 96 - case 105: { - minimum_ = input.readDouble(); - bitField0_ |= 0x00000200; - break; - } // case 105 - case 112: { - exclusiveMinimum_ = input.readBool(); - bitField0_ |= 0x00000400; - break; - } // case 112 - case 120: { - maxLength_ = input.readUInt64(); - bitField0_ |= 0x00000800; - break; - } // case 120 - case 128: { - minLength_ = input.readUInt64(); - bitField0_ |= 0x00001000; - break; - } // case 128 - case 138: { - pattern_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - break; - } // case 138 - case 160: { - maxItems_ = input.readUInt64(); - bitField0_ |= 0x00004000; - break; - } // case 160 - case 168: { - minItems_ = input.readUInt64(); - bitField0_ |= 0x00008000; - break; - } // case 168 - case 176: { - uniqueItems_ = input.readBool(); - bitField0_ |= 0x00010000; - break; - } // case 176 - case 192: { - maxProperties_ = input.readUInt64(); - bitField0_ |= 0x00020000; - break; - } // case 192 - case 200: { - minProperties_ = input.readUInt64(); - bitField0_ |= 0x00040000; - break; - } // case 200 - case 210: { - java.lang.String s = input.readStringRequireUtf8(); - ensureRequiredIsMutable(); - required_.add(s); - break; - } // case 210 - case 274: { - java.lang.String s = input.readStringRequireUtf8(); - ensureArrayIsMutable(); - array_.add(s); - break; - } // case 274 - case 280: { - int tmpRaw = input.readEnum(); - ensureTypeIsMutable(); - type_.add(tmpRaw); - break; - } // case 280 - case 282: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureTypeIsMutable(); - type_.add(tmpRaw); - } - input.popLimit(oldLimit); - break; - } // case 282 - case 290: { - format_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; - break; - } // case 290 - case 370: { - java.lang.String s = input.readStringRequireUtf8(); - ensureEnumIsMutable(); - enum_.add(s); - break; - } // case 370 - case 386: { - com.google.protobuf.MapEntry - extensions__ = input.readMessage( - ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExtensions().ensureBuilderMap().put( - extensions__.getKey(), extensions__.getValue()); - bitField0_ |= 0x02000000; - break; - } // case 386 - case 8010: { - input.readMessage( - getFieldConfigurationFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x01000000; - break; - } // case 8010 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object ref_ = ""; - /** - *
-     * Ref is used to define an external reference to include in the message.
-     * This could be a fully qualified proto message reference, and that type must
-     * be imported into the protofile. If no message is identified, the Ref will
-     * be used verbatim in the output.
-     * For example:
-     *  `ref: ".google.protobuf.Timestamp"`.
-     * 
- * - * string ref = 3 [json_name = "ref"]; - * @return The ref. - */ - public java.lang.String getRef() { - java.lang.Object ref = ref_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ref_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Ref is used to define an external reference to include in the message.
-     * This could be a fully qualified proto message reference, and that type must
-     * be imported into the protofile. If no message is identified, the Ref will
-     * be used verbatim in the output.
-     * For example:
-     *  `ref: ".google.protobuf.Timestamp"`.
-     * 
- * - * string ref = 3 [json_name = "ref"]; - * @return The bytes for ref. - */ - public com.google.protobuf.ByteString - getRefBytes() { - java.lang.Object ref = ref_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ref_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Ref is used to define an external reference to include in the message.
-     * This could be a fully qualified proto message reference, and that type must
-     * be imported into the protofile. If no message is identified, the Ref will
-     * be used verbatim in the output.
-     * For example:
-     *  `ref: ".google.protobuf.Timestamp"`.
-     * 
- * - * string ref = 3 [json_name = "ref"]; - * @param value The ref to set. - * @return This builder for chaining. - */ - public Builder setRef( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ref_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Ref is used to define an external reference to include in the message.
-     * This could be a fully qualified proto message reference, and that type must
-     * be imported into the protofile. If no message is identified, the Ref will
-     * be used verbatim in the output.
-     * For example:
-     *  `ref: ".google.protobuf.Timestamp"`.
-     * 
- * - * string ref = 3 [json_name = "ref"]; - * @return This builder for chaining. - */ - public Builder clearRef() { - ref_ = getDefaultInstance().getRef(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Ref is used to define an external reference to include in the message.
-     * This could be a fully qualified proto message reference, and that type must
-     * be imported into the protofile. If no message is identified, the Ref will
-     * be used verbatim in the output.
-     * For example:
-     *  `ref: ".google.protobuf.Timestamp"`.
-     * 
- * - * string ref = 3 [json_name = "ref"]; - * @param value The bytes for ref to set. - * @return This builder for chaining. - */ - public Builder setRefBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ref_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object title_ = ""; - /** - *
-     * The title of the schema.
-     * 
- * - * string title = 5 [json_name = "title"]; - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The title of the schema.
-     * 
- * - * string title = 5 [json_name = "title"]; - * @return The bytes for title. - */ - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The title of the schema.
-     * 
- * - * string title = 5 [json_name = "title"]; - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The title of the schema.
-     * 
- * - * string title = 5 [json_name = "title"]; - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The title of the schema.
-     * 
- * - * string title = 5 [json_name = "title"]; - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A short description of the schema.
-     * 
- * - * string description = 6 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A short description of the schema.
-     * 
- * - * string description = 6 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A short description of the schema.
-     * 
- * - * string description = 6 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * A short description of the schema.
-     * 
- * - * string description = 6 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * A short description of the schema.
-     * 
- * - * string description = 6 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object default_ = ""; - /** - * string default = 7 [json_name = "default"]; - * @return The default. - */ - public java.lang.String getDefault() { - java.lang.Object ref = default_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - default_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string default = 7 [json_name = "default"]; - * @return The bytes for default. - */ - public com.google.protobuf.ByteString - getDefaultBytes() { - java.lang.Object ref = default_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - default_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string default = 7 [json_name = "default"]; - * @param value The default to set. - * @return This builder for chaining. - */ - public Builder setDefault( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - default_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * string default = 7 [json_name = "default"]; - * @return This builder for chaining. - */ - public Builder clearDefault() { - default_ = getDefaultInstance().getDefault(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * string default = 7 [json_name = "default"]; - * @param value The bytes for default to set. - * @return This builder for chaining. - */ - public Builder setDefaultBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - default_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private boolean readOnly_ ; - /** - * bool read_only = 8 [json_name = "readOnly"]; - * @return The readOnly. - */ - @java.lang.Override - public boolean getReadOnly() { - return readOnly_; - } - /** - * bool read_only = 8 [json_name = "readOnly"]; - * @param value The readOnly to set. - * @return This builder for chaining. - */ - public Builder setReadOnly(boolean value) { - - readOnly_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * bool read_only = 8 [json_name = "readOnly"]; - * @return This builder for chaining. - */ - public Builder clearReadOnly() { - bitField0_ = (bitField0_ & ~0x00000010); - readOnly_ = false; - onChanged(); - return this; - } - - private java.lang.Object example_ = ""; - /** - *
-     * A free-form property to include a JSON example of this field. This is copied
-     * verbatim to the output swagger.json. Quotes must be escaped.
-     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-     * 
- * - * string example = 9 [json_name = "example"]; - * @return The example. - */ - public java.lang.String getExample() { - java.lang.Object ref = example_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - example_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A free-form property to include a JSON example of this field. This is copied
-     * verbatim to the output swagger.json. Quotes must be escaped.
-     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-     * 
- * - * string example = 9 [json_name = "example"]; - * @return The bytes for example. - */ - public com.google.protobuf.ByteString - getExampleBytes() { - java.lang.Object ref = example_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - example_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A free-form property to include a JSON example of this field. This is copied
-     * verbatim to the output swagger.json. Quotes must be escaped.
-     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-     * 
- * - * string example = 9 [json_name = "example"]; - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - example_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * A free-form property to include a JSON example of this field. This is copied
-     * verbatim to the output swagger.json. Quotes must be escaped.
-     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-     * 
- * - * string example = 9 [json_name = "example"]; - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = getDefaultInstance().getExample(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * A free-form property to include a JSON example of this field. This is copied
-     * verbatim to the output swagger.json. Quotes must be escaped.
-     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-     * 
- * - * string example = 9 [json_name = "example"]; - * @param value The bytes for example to set. - * @return This builder for chaining. - */ - public Builder setExampleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - example_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private double multipleOf_ ; - /** - * double multiple_of = 10 [json_name = "multipleOf"]; - * @return The multipleOf. - */ - @java.lang.Override - public double getMultipleOf() { - return multipleOf_; - } - /** - * double multiple_of = 10 [json_name = "multipleOf"]; - * @param value The multipleOf to set. - * @return This builder for chaining. - */ - public Builder setMultipleOf(double value) { - - multipleOf_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * double multiple_of = 10 [json_name = "multipleOf"]; - * @return This builder for chaining. - */ - public Builder clearMultipleOf() { - bitField0_ = (bitField0_ & ~0x00000040); - multipleOf_ = 0D; - onChanged(); - return this; - } - - private double maximum_ ; - /** - *
-     * Maximum represents an inclusive upper limit for a numeric instance. The
-     * value of MUST be a number,
-     * 
- * - * double maximum = 11 [json_name = "maximum"]; - * @return The maximum. - */ - @java.lang.Override - public double getMaximum() { - return maximum_; - } - /** - *
-     * Maximum represents an inclusive upper limit for a numeric instance. The
-     * value of MUST be a number,
-     * 
- * - * double maximum = 11 [json_name = "maximum"]; - * @param value The maximum to set. - * @return This builder for chaining. - */ - public Builder setMaximum(double value) { - - maximum_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * Maximum represents an inclusive upper limit for a numeric instance. The
-     * value of MUST be a number,
-     * 
- * - * double maximum = 11 [json_name = "maximum"]; - * @return This builder for chaining. - */ - public Builder clearMaximum() { - bitField0_ = (bitField0_ & ~0x00000080); - maximum_ = 0D; - onChanged(); - return this; - } - - private boolean exclusiveMaximum_ ; - /** - * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; - * @return The exclusiveMaximum. - */ - @java.lang.Override - public boolean getExclusiveMaximum() { - return exclusiveMaximum_; - } - /** - * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; - * @param value The exclusiveMaximum to set. - * @return This builder for chaining. - */ - public Builder setExclusiveMaximum(boolean value) { - - exclusiveMaximum_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; - * @return This builder for chaining. - */ - public Builder clearExclusiveMaximum() { - bitField0_ = (bitField0_ & ~0x00000100); - exclusiveMaximum_ = false; - onChanged(); - return this; - } - - private double minimum_ ; - /** - *
-     * minimum represents an inclusive lower limit for a numeric instance. The
-     * value of MUST be a number,
-     * 
- * - * double minimum = 13 [json_name = "minimum"]; - * @return The minimum. - */ - @java.lang.Override - public double getMinimum() { - return minimum_; - } - /** - *
-     * minimum represents an inclusive lower limit for a numeric instance. The
-     * value of MUST be a number,
-     * 
- * - * double minimum = 13 [json_name = "minimum"]; - * @param value The minimum to set. - * @return This builder for chaining. - */ - public Builder setMinimum(double value) { - - minimum_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * minimum represents an inclusive lower limit for a numeric instance. The
-     * value of MUST be a number,
-     * 
- * - * double minimum = 13 [json_name = "minimum"]; - * @return This builder for chaining. - */ - public Builder clearMinimum() { - bitField0_ = (bitField0_ & ~0x00000200); - minimum_ = 0D; - onChanged(); - return this; - } - - private boolean exclusiveMinimum_ ; - /** - * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; - * @return The exclusiveMinimum. - */ - @java.lang.Override - public boolean getExclusiveMinimum() { - return exclusiveMinimum_; - } - /** - * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; - * @param value The exclusiveMinimum to set. - * @return This builder for chaining. - */ - public Builder setExclusiveMinimum(boolean value) { - - exclusiveMinimum_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; - * @return This builder for chaining. - */ - public Builder clearExclusiveMinimum() { - bitField0_ = (bitField0_ & ~0x00000400); - exclusiveMinimum_ = false; - onChanged(); - return this; - } - - private long maxLength_ ; - /** - * uint64 max_length = 15 [json_name = "maxLength"]; - * @return The maxLength. - */ - @java.lang.Override - public long getMaxLength() { - return maxLength_; - } - /** - * uint64 max_length = 15 [json_name = "maxLength"]; - * @param value The maxLength to set. - * @return This builder for chaining. - */ - public Builder setMaxLength(long value) { - - maxLength_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * uint64 max_length = 15 [json_name = "maxLength"]; - * @return This builder for chaining. - */ - public Builder clearMaxLength() { - bitField0_ = (bitField0_ & ~0x00000800); - maxLength_ = 0L; - onChanged(); - return this; - } - - private long minLength_ ; - /** - * uint64 min_length = 16 [json_name = "minLength"]; - * @return The minLength. - */ - @java.lang.Override - public long getMinLength() { - return minLength_; - } - /** - * uint64 min_length = 16 [json_name = "minLength"]; - * @param value The minLength to set. - * @return This builder for chaining. - */ - public Builder setMinLength(long value) { - - minLength_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - * uint64 min_length = 16 [json_name = "minLength"]; - * @return This builder for chaining. - */ - public Builder clearMinLength() { - bitField0_ = (bitField0_ & ~0x00001000); - minLength_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object pattern_ = ""; - /** - * string pattern = 17 [json_name = "pattern"]; - * @return The pattern. - */ - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pattern_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string pattern = 17 [json_name = "pattern"]; - * @return The bytes for pattern. - */ - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string pattern = 17 [json_name = "pattern"]; - * @param value The pattern to set. - * @return This builder for chaining. - */ - public Builder setPattern( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pattern_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - * string pattern = 17 [json_name = "pattern"]; - * @return This builder for chaining. - */ - public Builder clearPattern() { - pattern_ = getDefaultInstance().getPattern(); - bitField0_ = (bitField0_ & ~0x00002000); - onChanged(); - return this; - } - /** - * string pattern = 17 [json_name = "pattern"]; - * @param value The bytes for pattern to set. - * @return This builder for chaining. - */ - public Builder setPatternBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - pattern_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - private long maxItems_ ; - /** - * uint64 max_items = 20 [json_name = "maxItems"]; - * @return The maxItems. - */ - @java.lang.Override - public long getMaxItems() { - return maxItems_; - } - /** - * uint64 max_items = 20 [json_name = "maxItems"]; - * @param value The maxItems to set. - * @return This builder for chaining. - */ - public Builder setMaxItems(long value) { - - maxItems_ = value; - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - /** - * uint64 max_items = 20 [json_name = "maxItems"]; - * @return This builder for chaining. - */ - public Builder clearMaxItems() { - bitField0_ = (bitField0_ & ~0x00004000); - maxItems_ = 0L; - onChanged(); - return this; - } - - private long minItems_ ; - /** - * uint64 min_items = 21 [json_name = "minItems"]; - * @return The minItems. - */ - @java.lang.Override - public long getMinItems() { - return minItems_; - } - /** - * uint64 min_items = 21 [json_name = "minItems"]; - * @param value The minItems to set. - * @return This builder for chaining. - */ - public Builder setMinItems(long value) { - - minItems_ = value; - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - /** - * uint64 min_items = 21 [json_name = "minItems"]; - * @return This builder for chaining. - */ - public Builder clearMinItems() { - bitField0_ = (bitField0_ & ~0x00008000); - minItems_ = 0L; - onChanged(); - return this; - } - - private boolean uniqueItems_ ; - /** - * bool unique_items = 22 [json_name = "uniqueItems"]; - * @return The uniqueItems. - */ - @java.lang.Override - public boolean getUniqueItems() { - return uniqueItems_; - } - /** - * bool unique_items = 22 [json_name = "uniqueItems"]; - * @param value The uniqueItems to set. - * @return This builder for chaining. - */ - public Builder setUniqueItems(boolean value) { - - uniqueItems_ = value; - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - /** - * bool unique_items = 22 [json_name = "uniqueItems"]; - * @return This builder for chaining. - */ - public Builder clearUniqueItems() { - bitField0_ = (bitField0_ & ~0x00010000); - uniqueItems_ = false; - onChanged(); - return this; - } - - private long maxProperties_ ; - /** - * uint64 max_properties = 24 [json_name = "maxProperties"]; - * @return The maxProperties. - */ - @java.lang.Override - public long getMaxProperties() { - return maxProperties_; - } - /** - * uint64 max_properties = 24 [json_name = "maxProperties"]; - * @param value The maxProperties to set. - * @return This builder for chaining. - */ - public Builder setMaxProperties(long value) { - - maxProperties_ = value; - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - /** - * uint64 max_properties = 24 [json_name = "maxProperties"]; - * @return This builder for chaining. - */ - public Builder clearMaxProperties() { - bitField0_ = (bitField0_ & ~0x00020000); - maxProperties_ = 0L; - onChanged(); - return this; - } - - private long minProperties_ ; - /** - * uint64 min_properties = 25 [json_name = "minProperties"]; - * @return The minProperties. - */ - @java.lang.Override - public long getMinProperties() { - return minProperties_; - } - /** - * uint64 min_properties = 25 [json_name = "minProperties"]; - * @param value The minProperties to set. - * @return This builder for chaining. - */ - public Builder setMinProperties(long value) { - - minProperties_ = value; - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - /** - * uint64 min_properties = 25 [json_name = "minProperties"]; - * @return This builder for chaining. - */ - public Builder clearMinProperties() { - bitField0_ = (bitField0_ & ~0x00040000); - minProperties_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureRequiredIsMutable() { - if (!required_.isModifiable()) { - required_ = new com.google.protobuf.LazyStringArrayList(required_); - } - bitField0_ |= 0x00080000; - } - /** - * repeated string required = 26 [json_name = "required"]; - * @return A list containing the required. - */ - public com.google.protobuf.ProtocolStringList - getRequiredList() { - required_.makeImmutable(); - return required_; - } - /** - * repeated string required = 26 [json_name = "required"]; - * @return The count of required. - */ - public int getRequiredCount() { - return required_.size(); - } - /** - * repeated string required = 26 [json_name = "required"]; - * @param index The index of the element to return. - * @return The required at the given index. - */ - public java.lang.String getRequired(int index) { - return required_.get(index); - } - /** - * repeated string required = 26 [json_name = "required"]; - * @param index The index of the value to return. - * @return The bytes of the required at the given index. - */ - public com.google.protobuf.ByteString - getRequiredBytes(int index) { - return required_.getByteString(index); - } - /** - * repeated string required = 26 [json_name = "required"]; - * @param index The index to set the value at. - * @param value The required to set. - * @return This builder for chaining. - */ - public Builder setRequired( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureRequiredIsMutable(); - required_.set(index, value); - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * repeated string required = 26 [json_name = "required"]; - * @param value The required to add. - * @return This builder for chaining. - */ - public Builder addRequired( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureRequiredIsMutable(); - required_.add(value); - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * repeated string required = 26 [json_name = "required"]; - * @param values The required to add. - * @return This builder for chaining. - */ - public Builder addAllRequired( - java.lang.Iterable values) { - ensureRequiredIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, required_); - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * repeated string required = 26 [json_name = "required"]; - * @return This builder for chaining. - */ - public Builder clearRequired() { - required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00080000);; - onChanged(); - return this; - } - /** - * repeated string required = 26 [json_name = "required"]; - * @param value The bytes of the required to add. - * @return This builder for chaining. - */ - public Builder addRequiredBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureRequiredIsMutable(); - required_.add(value); - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList array_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureArrayIsMutable() { - if (!array_.isModifiable()) { - array_ = new com.google.protobuf.LazyStringArrayList(array_); - } - bitField0_ |= 0x00100000; - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @return A list containing the array. - */ - public com.google.protobuf.ProtocolStringList - getArrayList() { - array_.makeImmutable(); - return array_; - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @return The count of array. - */ - public int getArrayCount() { - return array_.size(); - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param index The index of the element to return. - * @return The array at the given index. - */ - public java.lang.String getArray(int index) { - return array_.get(index); - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param index The index of the value to return. - * @return The bytes of the array at the given index. - */ - public com.google.protobuf.ByteString - getArrayBytes(int index) { - return array_.getByteString(index); - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param index The index to set the value at. - * @param value The array to set. - * @return This builder for chaining. - */ - public Builder setArray( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureArrayIsMutable(); - array_.set(index, value); - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param value The array to add. - * @return This builder for chaining. - */ - public Builder addArray( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureArrayIsMutable(); - array_.add(value); - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param values The array to add. - * @return This builder for chaining. - */ - public Builder addAllArray( - java.lang.Iterable values) { - ensureArrayIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, array_); - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @return This builder for chaining. - */ - public Builder clearArray() { - array_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00100000);; - onChanged(); - return this; - } - /** - *
-     * Items in 'array' must be unique.
-     * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param value The bytes of the array to add. - * @return This builder for chaining. - */ - public Builder addArrayBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureArrayIsMutable(); - array_.add(value); - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - - private java.util.List type_ = - java.util.Collections.emptyList(); - private void ensureTypeIsMutable() { - if (!((bitField0_ & 0x00200000) != 0)) { - type_ = new java.util.ArrayList(type_); - bitField0_ |= 0x00200000; - } - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return A list containing the type. - */ - public java.util.List getTypeList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>(type_, type_converter_); - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return The count of type. - */ - public int getTypeCount() { - return type_.size(); - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param index The index of the element to return. - * @return The type at the given index. - */ - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index) { - return type_converter_.convert(type_.get(index)); - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param index The index to set the value at. - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - int index, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); - type_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param value The type to add. - * @return This builder for chaining. - */ - public Builder addType(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); - type_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param values The type to add. - * @return This builder for chaining. - */ - public Builder addAllType( - java.lang.Iterable values) { - ensureTypeIsMutable(); - for (grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value : values) { - type_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return This builder for chaining. - */ - public Builder clearType() { - type_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00200000); - onChanged(); - return this; - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return A list containing the enum numeric values on the wire for type. - */ - public java.util.List - getTypeValueList() { - return java.util.Collections.unmodifiableList(type_); - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of type at the given index. - */ - public int getTypeValue(int index) { - return type_.get(index); - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue( - int index, int value) { - ensureTypeIsMutable(); - type_.set(index, value); - onChanged(); - return this; - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param value The enum numeric value on the wire for type to add. - * @return This builder for chaining. - */ - public Builder addTypeValue(int value) { - ensureTypeIsMutable(); - type_.add(value); - onChanged(); - return this; - } - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param values The enum numeric values on the wire for type to add. - * @return This builder for chaining. - */ - public Builder addAllTypeValue( - java.lang.Iterable values) { - ensureTypeIsMutable(); - for (int value : values) { - type_.add(value); - } - onChanged(); - return this; - } - - private java.lang.Object format_ = ""; - /** - *
-     * `Format`
-     * 
- * - * string format = 36 [json_name = "format"]; - * @return The format. - */ - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `Format`
-     * 
- * - * string format = 36 [json_name = "format"]; - * @return The bytes for format. - */ - public com.google.protobuf.ByteString - getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `Format`
-     * 
- * - * string format = 36 [json_name = "format"]; - * @param value The format to set. - * @return This builder for chaining. - */ - public Builder setFormat( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - format_ = value; - bitField0_ |= 0x00400000; - onChanged(); - return this; - } - /** - *
-     * `Format`
-     * 
- * - * string format = 36 [json_name = "format"]; - * @return This builder for chaining. - */ - public Builder clearFormat() { - format_ = getDefaultInstance().getFormat(); - bitField0_ = (bitField0_ & ~0x00400000); - onChanged(); - return this; - } - /** - *
-     * `Format`
-     * 
- * - * string format = 36 [json_name = "format"]; - * @param value The bytes for format to set. - * @return This builder for chaining. - */ - public Builder setFormatBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - format_ = value; - bitField0_ |= 0x00400000; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureEnumIsMutable() { - if (!enum_.isModifiable()) { - enum_ = new com.google.protobuf.LazyStringArrayList(enum_); - } - bitField0_ |= 0x00800000; - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @return A list containing the enum. - */ - public com.google.protobuf.ProtocolStringList - getEnumList() { - enum_.makeImmutable(); - return enum_; - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @return The count of enum. - */ - public int getEnumCount() { - return enum_.size(); - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param index The index of the element to return. - * @return The enum at the given index. - */ - public java.lang.String getEnum(int index) { - return enum_.get(index); - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param index The index of the value to return. - * @return The bytes of the enum at the given index. - */ - public com.google.protobuf.ByteString - getEnumBytes(int index) { - return enum_.getByteString(index); - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param index The index to set the value at. - * @param value The enum to set. - * @return This builder for chaining. - */ - public Builder setEnum( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureEnumIsMutable(); - enum_.set(index, value); - bitField0_ |= 0x00800000; - onChanged(); - return this; - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param value The enum to add. - * @return This builder for chaining. - */ - public Builder addEnum( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureEnumIsMutable(); - enum_.add(value); - bitField0_ |= 0x00800000; - onChanged(); - return this; - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param values The enum to add. - * @return This builder for chaining. - */ - public Builder addAllEnum( - java.lang.Iterable values) { - ensureEnumIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, enum_); - bitField0_ |= 0x00800000; - onChanged(); - return this; - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @return This builder for chaining. - */ - public Builder clearEnum() { - enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00800000);; - onChanged(); - return this; - } - /** - *
-     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-     * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param value The bytes of the enum to add. - * @return This builder for chaining. - */ - public Builder addEnumBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureEnumIsMutable(); - enum_.add(value); - bitField0_ |= 0x00800000; - onChanged(); - return this; - } - - private grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration fieldConfiguration_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder> fieldConfigurationBuilder_; - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - * @return Whether the fieldConfiguration field is set. - */ - public boolean hasFieldConfiguration() { - return ((bitField0_ & 0x01000000) != 0); - } - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - * @return The fieldConfiguration. - */ - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration() { - if (fieldConfigurationBuilder_ == null) { - return fieldConfiguration_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; - } else { - return fieldConfigurationBuilder_.getMessage(); - } - } - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - public Builder setFieldConfiguration(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration value) { - if (fieldConfigurationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldConfiguration_ = value; - } else { - fieldConfigurationBuilder_.setMessage(value); - } - bitField0_ |= 0x01000000; - onChanged(); - return this; - } - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - public Builder setFieldConfiguration( - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder builderForValue) { - if (fieldConfigurationBuilder_ == null) { - fieldConfiguration_ = builderForValue.build(); - } else { - fieldConfigurationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x01000000; - onChanged(); - return this; - } - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - public Builder mergeFieldConfiguration(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration value) { - if (fieldConfigurationBuilder_ == null) { - if (((bitField0_ & 0x01000000) != 0) && - fieldConfiguration_ != null && - fieldConfiguration_ != grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance()) { - getFieldConfigurationBuilder().mergeFrom(value); - } else { - fieldConfiguration_ = value; - } - } else { - fieldConfigurationBuilder_.mergeFrom(value); - } - if (fieldConfiguration_ != null) { - bitField0_ |= 0x01000000; - onChanged(); - } - return this; - } - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - public Builder clearFieldConfiguration() { - bitField0_ = (bitField0_ & ~0x01000000); - fieldConfiguration_ = null; - if (fieldConfigurationBuilder_ != null) { - fieldConfigurationBuilder_.dispose(); - fieldConfigurationBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder getFieldConfigurationBuilder() { - bitField0_ |= 0x01000000; - onChanged(); - return getFieldConfigurationFieldBuilder().getBuilder(); - } - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder() { - if (fieldConfigurationBuilder_ != null) { - return fieldConfigurationBuilder_.getMessageOrBuilder(); - } else { - return fieldConfiguration_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; - } - } - /** - *
-     * Additional field level properties used when generating the OpenAPI v2 file.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder> - getFieldConfigurationFieldBuilder() { - if (fieldConfigurationBuilder_ == null) { - fieldConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder>( - getFieldConfiguration(), - getParentForChildren(), - isClean()); - fieldConfiguration_ = null; - } - return fieldConfigurationBuilder_; - } - - private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ExtensionsDefaultEntryHolder.defaultEntry; - } - }; - private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; - private com.google.protobuf.MapFieldBuilder - internalGetExtensions() { - if (extensions_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - return extensions_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableExtensions() { - if (extensions_ == null) { - extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - bitField0_ |= 0x02000000; - onChanged(); - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().ensureBuilderMap().size(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getImmutableMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return extensionsConverter.build(map.get(key)); - } - public Builder clearExtensions() { - bitField0_ = (bitField0_ & ~0x02000000); - internalGetMutableExtensions().clear(); - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - public Builder removeExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtensions().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExtensions() { - bitField0_ |= 0x02000000; - return internalGetMutableExtensions().ensureMessageMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - public Builder putExtensions( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableExtensions().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x02000000; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - public Builder putAllExtensions( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableExtensions().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x02000000; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) - private static final grpc.gateway.protoc_gen_openapiv2.options.JSONSchema DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.JSONSchema(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JSONSchema parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java deleted file mode 100644 index 6d31a1f1..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface JSONSchemaOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Ref is used to define an external reference to include in the message.
-   * This could be a fully qualified proto message reference, and that type must
-   * be imported into the protofile. If no message is identified, the Ref will
-   * be used verbatim in the output.
-   * For example:
-   *  `ref: ".google.protobuf.Timestamp"`.
-   * 
- * - * string ref = 3 [json_name = "ref"]; - * @return The ref. - */ - java.lang.String getRef(); - /** - *
-   * Ref is used to define an external reference to include in the message.
-   * This could be a fully qualified proto message reference, and that type must
-   * be imported into the protofile. If no message is identified, the Ref will
-   * be used verbatim in the output.
-   * For example:
-   *  `ref: ".google.protobuf.Timestamp"`.
-   * 
- * - * string ref = 3 [json_name = "ref"]; - * @return The bytes for ref. - */ - com.google.protobuf.ByteString - getRefBytes(); - - /** - *
-   * The title of the schema.
-   * 
- * - * string title = 5 [json_name = "title"]; - * @return The title. - */ - java.lang.String getTitle(); - /** - *
-   * The title of the schema.
-   * 
- * - * string title = 5 [json_name = "title"]; - * @return The bytes for title. - */ - com.google.protobuf.ByteString - getTitleBytes(); - - /** - *
-   * A short description of the schema.
-   * 
- * - * string description = 6 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A short description of the schema.
-   * 
- * - * string description = 6 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * string default = 7 [json_name = "default"]; - * @return The default. - */ - java.lang.String getDefault(); - /** - * string default = 7 [json_name = "default"]; - * @return The bytes for default. - */ - com.google.protobuf.ByteString - getDefaultBytes(); - - /** - * bool read_only = 8 [json_name = "readOnly"]; - * @return The readOnly. - */ - boolean getReadOnly(); - - /** - *
-   * A free-form property to include a JSON example of this field. This is copied
-   * verbatim to the output swagger.json. Quotes must be escaped.
-   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-   * 
- * - * string example = 9 [json_name = "example"]; - * @return The example. - */ - java.lang.String getExample(); - /** - *
-   * A free-form property to include a JSON example of this field. This is copied
-   * verbatim to the output swagger.json. Quotes must be escaped.
-   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-   * 
- * - * string example = 9 [json_name = "example"]; - * @return The bytes for example. - */ - com.google.protobuf.ByteString - getExampleBytes(); - - /** - * double multiple_of = 10 [json_name = "multipleOf"]; - * @return The multipleOf. - */ - double getMultipleOf(); - - /** - *
-   * Maximum represents an inclusive upper limit for a numeric instance. The
-   * value of MUST be a number,
-   * 
- * - * double maximum = 11 [json_name = "maximum"]; - * @return The maximum. - */ - double getMaximum(); - - /** - * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; - * @return The exclusiveMaximum. - */ - boolean getExclusiveMaximum(); - - /** - *
-   * minimum represents an inclusive lower limit for a numeric instance. The
-   * value of MUST be a number,
-   * 
- * - * double minimum = 13 [json_name = "minimum"]; - * @return The minimum. - */ - double getMinimum(); - - /** - * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; - * @return The exclusiveMinimum. - */ - boolean getExclusiveMinimum(); - - /** - * uint64 max_length = 15 [json_name = "maxLength"]; - * @return The maxLength. - */ - long getMaxLength(); - - /** - * uint64 min_length = 16 [json_name = "minLength"]; - * @return The minLength. - */ - long getMinLength(); - - /** - * string pattern = 17 [json_name = "pattern"]; - * @return The pattern. - */ - java.lang.String getPattern(); - /** - * string pattern = 17 [json_name = "pattern"]; - * @return The bytes for pattern. - */ - com.google.protobuf.ByteString - getPatternBytes(); - - /** - * uint64 max_items = 20 [json_name = "maxItems"]; - * @return The maxItems. - */ - long getMaxItems(); - - /** - * uint64 min_items = 21 [json_name = "minItems"]; - * @return The minItems. - */ - long getMinItems(); - - /** - * bool unique_items = 22 [json_name = "uniqueItems"]; - * @return The uniqueItems. - */ - boolean getUniqueItems(); - - /** - * uint64 max_properties = 24 [json_name = "maxProperties"]; - * @return The maxProperties. - */ - long getMaxProperties(); - - /** - * uint64 min_properties = 25 [json_name = "minProperties"]; - * @return The minProperties. - */ - long getMinProperties(); - - /** - * repeated string required = 26 [json_name = "required"]; - * @return A list containing the required. - */ - java.util.List - getRequiredList(); - /** - * repeated string required = 26 [json_name = "required"]; - * @return The count of required. - */ - int getRequiredCount(); - /** - * repeated string required = 26 [json_name = "required"]; - * @param index The index of the element to return. - * @return The required at the given index. - */ - java.lang.String getRequired(int index); - /** - * repeated string required = 26 [json_name = "required"]; - * @param index The index of the value to return. - * @return The bytes of the required at the given index. - */ - com.google.protobuf.ByteString - getRequiredBytes(int index); - - /** - *
-   * Items in 'array' must be unique.
-   * 
- * - * repeated string array = 34 [json_name = "array"]; - * @return A list containing the array. - */ - java.util.List - getArrayList(); - /** - *
-   * Items in 'array' must be unique.
-   * 
- * - * repeated string array = 34 [json_name = "array"]; - * @return The count of array. - */ - int getArrayCount(); - /** - *
-   * Items in 'array' must be unique.
-   * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param index The index of the element to return. - * @return The array at the given index. - */ - java.lang.String getArray(int index); - /** - *
-   * Items in 'array' must be unique.
-   * 
- * - * repeated string array = 34 [json_name = "array"]; - * @param index The index of the value to return. - * @return The bytes of the array at the given index. - */ - com.google.protobuf.ByteString - getArrayBytes(int index); - - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return A list containing the type. - */ - java.util.List getTypeList(); - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return The count of type. - */ - int getTypeCount(); - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param index The index of the element to return. - * @return The type at the given index. - */ - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index); - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @return A list containing the enum numeric values on the wire for type. - */ - java.util.List - getTypeValueList(); - /** - * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of type at the given index. - */ - int getTypeValue(int index); - - /** - *
-   * `Format`
-   * 
- * - * string format = 36 [json_name = "format"]; - * @return The format. - */ - java.lang.String getFormat(); - /** - *
-   * `Format`
-   * 
- * - * string format = 36 [json_name = "format"]; - * @return The bytes for format. - */ - com.google.protobuf.ByteString - getFormatBytes(); - - /** - *
-   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-   * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @return A list containing the enum. - */ - java.util.List - getEnumList(); - /** - *
-   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-   * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @return The count of enum. - */ - int getEnumCount(); - /** - *
-   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-   * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param index The index of the element to return. - * @return The enum at the given index. - */ - java.lang.String getEnum(int index); - /** - *
-   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
-   * 
- * - * repeated string enum = 46 [json_name = "enum"]; - * @param index The index of the value to return. - * @return The bytes of the enum at the given index. - */ - com.google.protobuf.ByteString - getEnumBytes(int index); - - /** - *
-   * Additional field level properties used when generating the OpenAPI v2 file.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - * @return Whether the fieldConfiguration field is set. - */ - boolean hasFieldConfiguration(); - /** - *
-   * Additional field level properties used when generating the OpenAPI v2 file.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - * @return The fieldConfiguration. - */ - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration(); - /** - *
-   * Additional field level properties used when generating the OpenAPI v2 file.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder(); - - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - int getExtensionsCount(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - boolean containsExtensions( - java.lang.String key); - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExtensions(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - java.util.Map - getExtensionsMap(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; - */ - com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/License.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/License.java deleted file mode 100644 index e6ff5258..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/License.java +++ /dev/null @@ -1,774 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `License` is a representation of OpenAPI v2 specification's License object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
- *
- * Example:
- *
- *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
- *    info: {
- *      ...
- *      license: {
- *        name: "BSD 3-Clause License";
- *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
- *      };
- *      ...
- *    };
- *    ...
- *  };
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License} - */ -public final class License extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.License) - LicenseOrBuilder { -private static final long serialVersionUID = 0L; - // Use License.newBuilder() to construct. - private License(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private License() { - name_ = ""; - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new License(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.License.class, grpc.gateway.protoc_gen_openapiv2.options.License.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The license name used for the API.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The license name used for the API.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object url_ = ""; - /** - *
-   * A URL to the license used for the API. MUST be in the format of a URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * A URL to the license used for the API. MUST be in the format of a URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.License)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.License other = (grpc.gateway.protoc_gen_openapiv2.options.License) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUrl() - .equals(other.getUrl())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.License parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.License parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.License prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `License` is a representation of OpenAPI v2 specification's License object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
-   *
-   * Example:
-   *
-   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
-   *    info: {
-   *      ...
-   *      license: {
-   *        name: "BSD 3-Clause License";
-   *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
-   *      };
-   *      ...
-   *    };
-   *    ...
-   *  };
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.License) - grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.License.class, grpc.gateway.protoc_gen_openapiv2.options.License.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.License.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - url_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.License build() { - grpc.gateway.protoc_gen_openapiv2.options.License result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.License buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.License result = new grpc.gateway.protoc_gen_openapiv2.options.License(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.License result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.url_ = url_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.License) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.License)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.License other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - url_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The license name used for the API.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The license name used for the API.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The license name used for the API.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The license name used for the API.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The license name used for the API.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-     * A URL to the license used for the API. MUST be in the format of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A URL to the license used for the API. MUST be in the format of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A URL to the license used for the API. MUST be in the format of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A URL to the license used for the API. MUST be in the format of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @return This builder for chaining. - */ - public Builder clearUrl() { - url_ = getDefaultInstance().getUrl(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A URL to the license used for the API. MUST be in the format of a URL.
-     * 
- * - * string url = 2 [json_name = "url"]; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - url_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.License) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.License) - private static final grpc.gateway.protoc_gen_openapiv2.options.License DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.License(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public License parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java deleted file mode 100644 index a06e2f08..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface LicenseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.License) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The license name used for the API.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The license name used for the API.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A URL to the license used for the API. MUST be in the format of a URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * A URL to the license used for the API. MUST be in the format of a URL.
-   * 
- * - * string url = 2 [json_name = "url"]; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java deleted file mode 100644 index 9ff69825..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java +++ /dev/null @@ -1,605 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public final class Openapiv2Proto { - private Openapiv2Proto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,protoc-gen-openapiv2/options/openapiv2" + - ".proto\022)grpc.gateway.protoc_gen_openapiv" + - "2.options\032\034google/protobuf/struct.proto\"" + - "\263\010\n\007Swagger\022\030\n\007swagger\030\001 \001(\tR\007swagger\022C\n" + - "\004info\030\002 \001(\0132/.grpc.gateway.protoc_gen_op" + - "enapiv2.options.InfoR\004info\022\022\n\004host\030\003 \001(\t" + - "R\004host\022\033\n\tbase_path\030\004 \001(\tR\010basePath\022K\n\007s" + - "chemes\030\005 \003(\01621.grpc.gateway.protoc_gen_o" + - "penapiv2.options.SchemeR\007schemes\022\032\n\010cons" + - "umes\030\006 \003(\tR\010consumes\022\032\n\010produces\030\007 \003(\tR\010" + - "produces\022_\n\tresponses\030\n \003(\0132A.grpc.gatew" + - "ay.protoc_gen_openapiv2.options.Swagger." + - "ResponsesEntryR\tresponses\022q\n\024security_de" + - "finitions\030\013 \001(\0132>.grpc.gateway.protoc_ge" + - "n_openapiv2.options.SecurityDefinitionsR" + - "\023securityDefinitions\022Z\n\010security\030\014 \003(\0132>" + - ".grpc.gateway.protoc_gen_openapiv2.optio" + - "ns.SecurityRequirementR\010security\022B\n\004tags" + - "\030\r \003(\0132..grpc.gateway.protoc_gen_openapi" + - "v2.options.TagR\004tags\022e\n\rexternal_docs\030\016 " + - "\001(\0132@.grpc.gateway.protoc_gen_openapiv2." + - "options.ExternalDocumentationR\014externalD" + - "ocs\022b\n\nextensions\030\017 \003(\0132B.grpc.gateway.p" + - "rotoc_gen_openapiv2.options.Swagger.Exte" + - "nsionsEntryR\nextensions\032q\n\016ResponsesEntr" + - "y\022\020\n\003key\030\001 \001(\tR\003key\022I\n\005value\030\002 \001(\01323.grp" + - "c.gateway.protoc_gen_openapiv2.options.R" + - "esponseR\005value:\0028\001\032U\n\017ExtensionsEntry\022\020\n" + - "\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google." + - "protobuf.ValueR\005value:\0028\001J\004\010\010\020\tJ\004\010\t\020\n\"\326\007" + - "\n\tOperation\022\022\n\004tags\030\001 \003(\tR\004tags\022\030\n\007summa" + - "ry\030\002 \001(\tR\007summary\022 \n\013description\030\003 \001(\tR\013" + - "description\022e\n\rexternal_docs\030\004 \001(\0132@.grp" + - "c.gateway.protoc_gen_openapiv2.options.E" + - "xternalDocumentationR\014externalDocs\022!\n\014op" + - "eration_id\030\005 \001(\tR\013operationId\022\032\n\010consume" + - "s\030\006 \003(\tR\010consumes\022\032\n\010produces\030\007 \003(\tR\010pro" + - "duces\022a\n\tresponses\030\t \003(\0132C.grpc.gateway." + - "protoc_gen_openapiv2.options.Operation.R" + - "esponsesEntryR\tresponses\022K\n\007schemes\030\n \003(" + - "\01621.grpc.gateway.protoc_gen_openapiv2.op" + - "tions.SchemeR\007schemes\022\036\n\ndeprecated\030\013 \001(" + - "\010R\ndeprecated\022Z\n\010security\030\014 \003(\0132>.grpc.g" + - "ateway.protoc_gen_openapiv2.options.Secu" + - "rityRequirementR\010security\022d\n\nextensions\030" + - "\r \003(\0132D.grpc.gateway.protoc_gen_openapiv" + - "2.options.Operation.ExtensionsEntryR\next" + - "ensions\022U\n\nparameters\030\016 \001(\01325.grpc.gatew" + - "ay.protoc_gen_openapiv2.options.Paramete" + - "rsR\nparameters\032q\n\016ResponsesEntry\022\020\n\003key\030" + - "\001 \001(\tR\003key\022I\n\005value\030\002 \001(\01323.grpc.gateway" + - ".protoc_gen_openapiv2.options.ResponseR\005" + - "value:\0028\001\032U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001(" + - "\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.protobuf." + - "ValueR\005value:\0028\001J\004\010\010\020\t\"b\n\nParameters\022T\n\007" + - "headers\030\001 \003(\0132:.grpc.gateway.protoc_gen_" + - "openapiv2.options.HeaderParameterR\007heade" + - "rs\"\243\002\n\017HeaderParameter\022\022\n\004name\030\001 \001(\tR\004na" + - "me\022 \n\013description\030\002 \001(\tR\013description\022S\n\004" + - "type\030\003 \001(\0162?.grpc.gateway.protoc_gen_ope" + - "napiv2.options.HeaderParameter.TypeR\004typ" + - "e\022\026\n\006format\030\004 \001(\tR\006format\022\032\n\010required\030\005 " + - "\001(\010R\010required\"E\n\004Type\022\013\n\007UNKNOWN\020\000\022\n\n\006ST" + - "RING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER\020\003\022\013\n\007BOOLE" + - "AN\020\004J\004\010\006\020\007J\004\010\007\020\010\"\330\001\n\006Header\022 \n\013descripti" + - "on\030\001 \001(\tR\013description\022\022\n\004type\030\002 \001(\tR\004typ" + - "e\022\026\n\006format\030\003 \001(\tR\006format\022\030\n\007default\030\006 \001" + - "(\tR\007default\022\030\n\007pattern\030\r \001(\tR\007patternJ\004\010" + - "\004\020\005J\004\010\005\020\006J\004\010\007\020\010J\004\010\010\020\tJ\004\010\t\020\nJ\004\010\n\020\013J\004\010\013\020\014J" + - "\004\010\014\020\rJ\004\010\016\020\017J\004\010\017\020\020J\004\010\020\020\021J\004\010\021\020\022J\004\010\022\020\023\"\232\005\n\010" + - "Response\022 \n\013description\030\001 \001(\tR\013descripti" + - "on\022I\n\006schema\030\002 \001(\01321.grpc.gateway.protoc" + - "_gen_openapiv2.options.SchemaR\006schema\022Z\n" + - "\007headers\030\003 \003(\0132@.grpc.gateway.protoc_gen" + - "_openapiv2.options.Response.HeadersEntry" + - "R\007headers\022]\n\010examples\030\004 \003(\0132A.grpc.gatew" + - "ay.protoc_gen_openapiv2.options.Response" + - ".ExamplesEntryR\010examples\022c\n\nextensions\030\005" + - " \003(\0132C.grpc.gateway.protoc_gen_openapiv2" + - ".options.Response.ExtensionsEntryR\nexten" + - "sions\032m\n\014HeadersEntry\022\020\n\003key\030\001 \001(\tR\003key\022" + - "G\n\005value\030\002 \001(\01321.grpc.gateway.protoc_gen" + - "_openapiv2.options.HeaderR\005value:\0028\001\032;\n\r" + - "ExamplesEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value" + - "\030\002 \001(\tR\005value:\0028\001\032U\n\017ExtensionsEntry\022\020\n\003" + - "key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.p" + - "rotobuf.ValueR\005value:\0028\001\"\326\003\n\004Info\022\024\n\005tit" + - "le\030\001 \001(\tR\005title\022 \n\013description\030\002 \001(\tR\013de" + - "scription\022(\n\020terms_of_service\030\003 \001(\tR\016ter" + - "msOfService\022L\n\007contact\030\004 \001(\01322.grpc.gate" + - "way.protoc_gen_openapiv2.options.Contact" + - "R\007contact\022L\n\007license\030\005 \001(\01322.grpc.gatewa" + - "y.protoc_gen_openapiv2.options.LicenseR\007" + - "license\022\030\n\007version\030\006 \001(\tR\007version\022_\n\next" + - "ensions\030\007 \003(\0132?.grpc.gateway.protoc_gen_" + - "openapiv2.options.Info.ExtensionsEntryR\n" + - "extensions\032U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001" + - "(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.protobuf" + - ".ValueR\005value:\0028\001\"E\n\007Contact\022\022\n\004name\030\001 \001" + - "(\tR\004name\022\020\n\003url\030\002 \001(\tR\003url\022\024\n\005email\030\003 \001(" + - "\tR\005email\"/\n\007License\022\022\n\004name\030\001 \001(\tR\004name\022" + - "\020\n\003url\030\002 \001(\tR\003url\"K\n\025ExternalDocumentati" + - "on\022 \n\013description\030\001 \001(\tR\013description\022\020\n\003" + - "url\030\002 \001(\tR\003url\"\252\002\n\006Schema\022V\n\013json_schema" + - "\030\001 \001(\01325.grpc.gateway.protoc_gen_openapi" + - "v2.options.JSONSchemaR\njsonSchema\022$\n\rdis" + - "criminator\030\002 \001(\tR\rdiscriminator\022\033\n\tread_" + - "only\030\003 \001(\010R\010readOnly\022e\n\rexternal_docs\030\005 " + - "\001(\0132@.grpc.gateway.protoc_gen_openapiv2." + - "options.ExternalDocumentationR\014externalD" + - "ocs\022\030\n\007example\030\006 \001(\tR\007exampleJ\004\010\004\020\005\"\327\n\n\n" + - "JSONSchema\022\020\n\003ref\030\003 \001(\tR\003ref\022\024\n\005title\030\005 " + - "\001(\tR\005title\022 \n\013description\030\006 \001(\tR\013descrip" + - "tion\022\030\n\007default\030\007 \001(\tR\007default\022\033\n\tread_o" + - "nly\030\010 \001(\010R\010readOnly\022\030\n\007example\030\t \001(\tR\007ex" + - "ample\022\037\n\013multiple_of\030\n \001(\001R\nmultipleOf\022\030" + - "\n\007maximum\030\013 \001(\001R\007maximum\022+\n\021exclusive_ma" + - "ximum\030\014 \001(\010R\020exclusiveMaximum\022\030\n\007minimum" + - "\030\r \001(\001R\007minimum\022+\n\021exclusive_minimum\030\016 \001" + - "(\010R\020exclusiveMinimum\022\035\n\nmax_length\030\017 \001(\004" + - "R\tmaxLength\022\035\n\nmin_length\030\020 \001(\004R\tminLeng" + - "th\022\030\n\007pattern\030\021 \001(\tR\007pattern\022\033\n\tmax_item" + - "s\030\024 \001(\004R\010maxItems\022\033\n\tmin_items\030\025 \001(\004R\010mi" + - "nItems\022!\n\014unique_items\030\026 \001(\010R\013uniqueItem" + - "s\022%\n\016max_properties\030\030 \001(\004R\rmaxProperties" + - "\022%\n\016min_properties\030\031 \001(\004R\rminProperties\022" + - "\032\n\010required\030\032 \003(\tR\010required\022\024\n\005array\030\" \003" + - "(\tR\005array\022_\n\004type\030# \003(\0162K.grpc.gateway.p" + - "rotoc_gen_openapiv2.options.JSONSchema.J" + - "SONSchemaSimpleTypesR\004type\022\026\n\006format\030$ \001" + - "(\tR\006format\022\022\n\004enum\030. \003(\tR\004enum\022z\n\023field_" + - "configuration\030\351\007 \001(\0132H.grpc.gateway.prot" + - "oc_gen_openapiv2.options.JSONSchema.Fiel" + - "dConfigurationR\022fieldConfiguration\022e\n\nex" + - "tensions\0300 \003(\0132E.grpc.gateway.protoc_gen" + - "_openapiv2.options.JSONSchema.Extensions" + - "EntryR\nextensions\032<\n\022FieldConfiguration\022" + - "&\n\017path_param_name\030/ \001(\tR\rpathParamName\032" + - "U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001(\tR\003key\022,\n\005" + - "value\030\002 \001(\0132\026.google.protobuf.ValueR\005val" + - "ue:\0028\001\"w\n\025JSONSchemaSimpleTypes\022\013\n\007UNKNO" + - "WN\020\000\022\t\n\005ARRAY\020\001\022\013\n\007BOOLEAN\020\002\022\013\n\007INTEGER\020" + - "\003\022\010\n\004NULL\020\004\022\n\n\006NUMBER\020\005\022\n\n\006OBJECT\020\006\022\n\n\006S" + - "TRING\020\007J\004\010\001\020\002J\004\010\002\020\003J\004\010\004\020\005J\004\010\022\020\023J\004\010\023\020\024J\004\010" + - "\027\020\030J\004\010\033\020\034J\004\010\034\020\035J\004\010\035\020\036J\004\010\036\020\"J\004\010%\020*J\004\010*\020+J" + - "\004\010+\020.\"\331\002\n\003Tag\022\022\n\004name\030\001 \001(\tR\004name\022 \n\013des" + - "cription\030\002 \001(\tR\013description\022e\n\rexternal_" + - "docs\030\003 \001(\0132@.grpc.gateway.protoc_gen_ope" + - "napiv2.options.ExternalDocumentationR\014ex" + - "ternalDocs\022^\n\nextensions\030\004 \003(\0132>.grpc.ga" + - "teway.protoc_gen_openapiv2.options.Tag.E" + - "xtensionsEntryR\nextensions\032U\n\017Extensions" + - "Entry\022\020\n\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026" + - ".google.protobuf.ValueR\005value:\0028\001\"\367\001\n\023Se" + - "curityDefinitions\022h\n\010security\030\001 \003(\0132L.gr" + - "pc.gateway.protoc_gen_openapiv2.options." + - "SecurityDefinitions.SecurityEntryR\010secur" + - "ity\032v\n\rSecurityEntry\022\020\n\003key\030\001 \001(\tR\003key\022O" + - "\n\005value\030\002 \001(\01329.grpc.gateway.protoc_gen_" + - "openapiv2.options.SecuritySchemeR\005value:" + - "\0028\001\"\377\006\n\016SecurityScheme\022R\n\004type\030\001 \001(\0162>.g" + - "rpc.gateway.protoc_gen_openapiv2.options" + - ".SecurityScheme.TypeR\004type\022 \n\013descriptio" + - "n\030\002 \001(\tR\013description\022\022\n\004name\030\003 \001(\tR\004name" + - "\022L\n\002in\030\004 \001(\0162<.grpc.gateway.protoc_gen_o" + - "penapiv2.options.SecurityScheme.InR\002in\022R" + - "\n\004flow\030\005 \001(\0162>.grpc.gateway.protoc_gen_o" + - "penapiv2.options.SecurityScheme.FlowR\004fl" + - "ow\022+\n\021authorization_url\030\006 \001(\tR\020authoriza" + - "tionUrl\022\033\n\ttoken_url\030\007 \001(\tR\010tokenUrl\022I\n\006" + - "scopes\030\010 \001(\01321.grpc.gateway.protoc_gen_o" + - "penapiv2.options.ScopesR\006scopes\022i\n\nexten" + - "sions\030\t \003(\0132I.grpc.gateway.protoc_gen_op" + - "enapiv2.options.SecurityScheme.Extension" + - "sEntryR\nextensions\032U\n\017ExtensionsEntry\022\020\n" + - "\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google." + - "protobuf.ValueR\005value:\0028\001\"K\n\004Type\022\020\n\014TYP" + - "E_INVALID\020\000\022\016\n\nTYPE_BASIC\020\001\022\020\n\014TYPE_API_" + - "KEY\020\002\022\017\n\013TYPE_OAUTH2\020\003\"1\n\002In\022\016\n\nIN_INVAL" + - "ID\020\000\022\014\n\010IN_QUERY\020\001\022\r\n\tIN_HEADER\020\002\"j\n\004Flo" + - "w\022\020\n\014FLOW_INVALID\020\000\022\021\n\rFLOW_IMPLICIT\020\001\022\021" + - "\n\rFLOW_PASSWORD\020\002\022\024\n\020FLOW_APPLICATION\020\003\022" + - "\024\n\020FLOW_ACCESS_CODE\020\004\"\366\002\n\023SecurityRequir" + - "ement\022\212\001\n\024security_requirement\030\001 \003(\0132W.g" + - "rpc.gateway.protoc_gen_openapiv2.options" + - ".SecurityRequirement.SecurityRequirement" + - "EntryR\023securityRequirement\0320\n\030SecurityRe" + - "quirementValue\022\024\n\005scope\030\001 \003(\tR\005scope\032\237\001\n" + - "\030SecurityRequirementEntry\022\020\n\003key\030\001 \001(\tR\003" + - "key\022m\n\005value\030\002 \001(\0132W.grpc.gateway.protoc" + - "_gen_openapiv2.options.SecurityRequireme" + - "nt.SecurityRequirementValueR\005value:\0028\001\"\226" + - "\001\n\006Scopes\022R\n\005scope\030\001 \003(\0132<.grpc.gateway." + - "protoc_gen_openapiv2.options.Scopes.Scop" + - "eEntryR\005scope\0328\n\nScopeEntry\022\020\n\003key\030\001 \001(\t" + - "R\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001*;\n\006Schem" + - "e\022\013\n\007UNKNOWN\020\000\022\010\n\004HTTP\020\001\022\t\n\005HTTPS\020\002\022\006\n\002W" + - "S\020\003\022\007\n\003WSS\020\004B\230\002B\016Openapiv2ProtoP\001ZFgithu" + - "b.com/grpc-ecosystem/grpc-gateway/v2/pro" + - "toc-gen-openapiv2/options\242\002\004GGPO\252\002\'Grpc." + - "Gateway.ProtocGenOpenapiv2.Options\312\002\'Grp" + - "c\\Gateway\\ProtocGenOpenapiv2\\Options\342\0023G" + - "rpc\\Gateway\\ProtocGenOpenapiv2\\Options\\G" + - "PBMetadata\352\002*Grpc::Gateway::ProtocGenOpe" + - "napiv2::Optionsb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.StructProto.getDescriptor(), - }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor, - new java.lang.String[] { "Swagger", "Info", "Host", "BasePath", "Schemes", "Consumes", "Produces", "Responses", "SecurityDefinitions", "Security", "Tags", "ExternalDocs", "Extensions", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor.getNestedTypes().get(1); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor, - new java.lang.String[] { "Tags", "Summary", "Description", "ExternalDocs", "OperationId", "Consumes", "Produces", "Responses", "Schemes", "Deprecated", "Security", "Extensions", "Parameters", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor.getNestedTypes().get(1); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor, - new java.lang.String[] { "Headers", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor, - new java.lang.String[] { "Name", "Description", "Type", "Format", "Required", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor, - new java.lang.String[] { "Description", "Type", "Format", "Default", "Pattern", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor, - new java.lang.String[] { "Description", "Schema", "Headers", "Examples", "Extensions", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(1); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(2); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor, - new java.lang.String[] { "Title", "Description", "TermsOfService", "Contact", "License", "Version", "Extensions", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor, - new java.lang.String[] { "Name", "Url", "Email", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor, - new java.lang.String[] { "Name", "Url", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor, - new java.lang.String[] { "Description", "Url", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor, - new java.lang.String[] { "JsonSchema", "Discriminator", "ReadOnly", "ExternalDocs", "Example", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor, - new java.lang.String[] { "Ref", "Title", "Description", "Default", "ReadOnly", "Example", "MultipleOf", "Maximum", "ExclusiveMaximum", "Minimum", "ExclusiveMinimum", "MaxLength", "MinLength", "Pattern", "MaxItems", "MinItems", "UniqueItems", "MaxProperties", "MinProperties", "Required", "Array", "Type", "Format", "Enum", "FieldConfiguration", "Extensions", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor, - new java.lang.String[] { "PathParamName", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor.getNestedTypes().get(1); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor, - new java.lang.String[] { "Name", "Description", "ExternalDocs", "Extensions", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor, - new java.lang.String[] { "Security", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor, - new java.lang.String[] { "Type", "Description", "Name", "In", "Flow", "AuthorizationUrl", "TokenUrl", "Scopes", "Extensions", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor, - new java.lang.String[] { "SecurityRequirement", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor, - new java.lang.String[] { "Scope", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor.getNestedTypes().get(1); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor, - new java.lang.String[] { "Scope", }); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor = - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor.getNestedTypes().get(0); - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.protobuf.StructProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Operation.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Operation.java deleted file mode 100644 index e7f4eac3..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Operation.java +++ /dev/null @@ -1,3977 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Operation` is a representation of OpenAPI v2 specification's Operation object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
- *
- * Example:
- *
- *  service EchoService {
- *    rpc Echo(SimpleMessage) returns (SimpleMessage) {
- *      option (google.api.http) = {
- *        get: "/v1/example/echo/{id}"
- *      };
- *
- *      option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- *        summary: "Get a message.";
- *        operation_id: "getMessage";
- *        tags: "echo";
- *        responses: {
- *          key: "200"
- *            value: {
- *            description: "OK";
- *          }
- *        }
- *      };
- *    }
- *  }
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Operation} - */ -public final class Operation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Operation) - OperationOrBuilder { -private static final long serialVersionUID = 0L; - // Use Operation.newBuilder() to construct. - private Operation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Operation() { - tags_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - summary_ = ""; - description_ = ""; - operationId_ = ""; - consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - schemes_ = java.util.Collections.emptyList(); - security_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Operation(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 9: - return internalGetResponses(); - case 13: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Operation.class, grpc.gateway.protoc_gen_openapiv2.options.Operation.Builder.class); - } - - private int bitField0_; - public static final int TAGS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList tags_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @return A list containing the tags. - */ - public com.google.protobuf.ProtocolStringList - getTagsList() { - return tags_; - } - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @return The count of tags. - */ - public int getTagsCount() { - return tags_.size(); - } - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param index The index of the element to return. - * @return The tags at the given index. - */ - public java.lang.String getTags(int index) { - return tags_.get(index); - } - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param index The index of the value to return. - * @return The bytes of the tags at the given index. - */ - public com.google.protobuf.ByteString - getTagsBytes(int index) { - return tags_.getByteString(index); - } - - public static final int SUMMARY_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object summary_ = ""; - /** - *
-   * A short summary of what the operation does. For maximum readability in the
-   * swagger-ui, this field SHOULD be less than 120 characters.
-   * 
- * - * string summary = 2 [json_name = "summary"]; - * @return The summary. - */ - @java.lang.Override - public java.lang.String getSummary() { - java.lang.Object ref = summary_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - summary_ = s; - return s; - } - } - /** - *
-   * A short summary of what the operation does. For maximum readability in the
-   * swagger-ui, this field SHOULD be less than 120 characters.
-   * 
- * - * string summary = 2 [json_name = "summary"]; - * @return The bytes for summary. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSummaryBytes() { - java.lang.Object ref = summary_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - summary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * A verbose explanation of the operation behavior. GFM syntax can be used for
-   * rich text representation.
-   * 
- * - * string description = 3 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A verbose explanation of the operation behavior. GFM syntax can be used for
-   * rich text representation.
-   * 
- * - * string description = 3 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTERNAL_DOCS_FIELD_NUMBER = 4; - private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; - /** - *
-   * Additional external documentation for this operation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - @java.lang.Override - public boolean hasExternalDocs() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Additional external documentation for this operation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - /** - *
-   * Additional external documentation for this operation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - - public static final int OPERATION_ID_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private volatile java.lang.Object operationId_ = ""; - /** - *
-   * Unique string used to identify the operation. The id MUST be unique among
-   * all operations described in the API. Tools and libraries MAY use the
-   * operationId to uniquely identify an operation, therefore, it is recommended
-   * to follow common programming naming conventions.
-   * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @return The operationId. - */ - @java.lang.Override - public java.lang.String getOperationId() { - java.lang.Object ref = operationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operationId_ = s; - return s; - } - } - /** - *
-   * Unique string used to identify the operation. The id MUST be unique among
-   * all operations described in the API. Tools and libraries MAY use the
-   * operationId to uniquely identify an operation, therefore, it is recommended
-   * to follow common programming naming conventions.
-   * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @return The bytes for operationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOperationIdBytes() { - java.lang.Object ref = operationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - operationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONSUMES_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * A list of MIME types the operation can consume. This overrides the consumes
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return A list containing the consumes. - */ - public com.google.protobuf.ProtocolStringList - getConsumesList() { - return consumes_; - } - /** - *
-   * A list of MIME types the operation can consume. This overrides the consumes
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return The count of consumes. - */ - public int getConsumesCount() { - return consumes_.size(); - } - /** - *
-   * A list of MIME types the operation can consume. This overrides the consumes
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the element to return. - * @return The consumes at the given index. - */ - public java.lang.String getConsumes(int index) { - return consumes_.get(index); - } - /** - *
-   * A list of MIME types the operation can consume. This overrides the consumes
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the value to return. - * @return The bytes of the consumes at the given index. - */ - public com.google.protobuf.ByteString - getConsumesBytes(int index) { - return consumes_.getByteString(index); - } - - public static final int PRODUCES_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * A list of MIME types the operation can produce. This overrides the produces
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return A list containing the produces. - */ - public com.google.protobuf.ProtocolStringList - getProducesList() { - return produces_; - } - /** - *
-   * A list of MIME types the operation can produce. This overrides the produces
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return The count of produces. - */ - public int getProducesCount() { - return produces_.size(); - } - /** - *
-   * A list of MIME types the operation can produce. This overrides the produces
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the element to return. - * @return The produces at the given index. - */ - public java.lang.String getProduces(int index) { - return produces_.get(index); - } - /** - *
-   * A list of MIME types the operation can produce. This overrides the produces
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the value to return. - * @return The bytes of the produces at the given index. - */ - public com.google.protobuf.ByteString - getProducesBytes(int index) { - return produces_.getByteString(index); - } - - public static final int RESPONSES_FIELD_NUMBER = 9; - private static final class ResponsesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Response> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Response> responses_; - private com.google.protobuf.MapField - internalGetResponses() { - if (responses_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ResponsesDefaultEntryHolder.defaultEntry); - } - return responses_; - } - public int getResponsesCount() { - return internalGetResponses().getMap().size(); - } - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - @java.lang.Override - public boolean containsResponses( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResponses().getMap().containsKey(key); - } - /** - * Use {@link #getResponsesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResponses() { - return getResponsesMap(); - } - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - @java.lang.Override - public java.util.Map getResponsesMap() { - return internalGetResponses().getMap(); - } - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResponses().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResponses().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int SCHEMES_FIELD_NUMBER = 10; - @SuppressWarnings("serial") - private java.util.List schemes_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme> schemes_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>() { - public grpc.gateway.protoc_gen_openapiv2.options.Scheme convert(java.lang.Integer from) { - grpc.gateway.protoc_gen_openapiv2.options.Scheme result = grpc.gateway.protoc_gen_openapiv2.options.Scheme.forNumber(from); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Scheme.UNRECOGNIZED : result; - } - }; - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return A list containing the schemes. - */ - @java.lang.Override - public java.util.List getSchemesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); - } - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return The count of schemes. - */ - @java.lang.Override - public int getSchemesCount() { - return schemes_.size(); - } - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param index The index of the element to return. - * @return The schemes at the given index. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { - return schemes_converter_.convert(schemes_.get(index)); - } - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return A list containing the enum numeric values on the wire for schemes. - */ - @java.lang.Override - public java.util.List - getSchemesValueList() { - return schemes_; - } - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of schemes at the given index. - */ - @java.lang.Override - public int getSchemesValue(int index) { - return schemes_.get(index); - } - private int schemesMemoizedSerializedSize; - - public static final int DEPRECATED_FIELD_NUMBER = 11; - private boolean deprecated_ = false; - /** - *
-   * Declares this operation to be deprecated. Usage of the declared operation
-   * should be refrained. Default value is false.
-   * 
- * - * bool deprecated = 11 [json_name = "deprecated"]; - * @return The deprecated. - */ - @java.lang.Override - public boolean getDeprecated() { - return deprecated_; - } - - public static final int SECURITY_FIELD_NUMBER = 12; - @SuppressWarnings("serial") - private java.util.List security_; - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public java.util.List getSecurityList() { - return security_; - } - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public java.util.List - getSecurityOrBuilderList() { - return security_; - } - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public int getSecurityCount() { - return security_.size(); - } - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { - return security_.get(index); - } - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( - int index) { - return security_.get(index); - } - - public static final int EXTENSIONS_FIELD_NUMBER = 13; - private static final class ExtensionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> extensions_; - private com.google.protobuf.MapField - internalGetExtensions() { - if (extensions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExtensionsDefaultEntryHolder.defaultEntry); - } - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().getMap().size(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().getMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int PARAMETERS_FIELD_NUMBER = 14; - private grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters_; - /** - *
-   * Custom parameters such as HTTP request headers.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-   * and https://swagger.io/specification/v2/#parameter-object.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Custom parameters such as HTTP request headers.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-   * and https://swagger.io/specification/v2/#parameter-object.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - * @return The parameters. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters() { - return parameters_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; - } - /** - *
-   * Custom parameters such as HTTP request headers.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-   * and https://swagger.io/specification/v2/#parameter-object.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder() { - return parameters_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - for (int i = 0; i < tags_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tags_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, summary_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getExternalDocs()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, operationId_); - } - for (int i = 0; i < consumes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, consumes_.getRaw(i)); - } - for (int i = 0; i < produces_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, produces_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetResponses(), - ResponsesDefaultEntryHolder.defaultEntry, - 9); - if (getSchemesList().size() > 0) { - output.writeUInt32NoTag(82); - output.writeUInt32NoTag(schemesMemoizedSerializedSize); - } - for (int i = 0; i < schemes_.size(); i++) { - output.writeEnumNoTag(schemes_.get(i)); - } - if (deprecated_ != false) { - output.writeBool(11, deprecated_); - } - for (int i = 0; i < security_.size(); i++) { - output.writeMessage(12, security_.get(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExtensions(), - ExtensionsDefaultEntryHolder.defaultEntry, - 13); - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(14, getParameters()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < tags_.size(); i++) { - dataSize += computeStringSizeNoTag(tags_.getRaw(i)); - } - size += dataSize; - size += 1 * getTagsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, summary_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getExternalDocs()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, operationId_); - } - { - int dataSize = 0; - for (int i = 0; i < consumes_.size(); i++) { - dataSize += computeStringSizeNoTag(consumes_.getRaw(i)); - } - size += dataSize; - size += 1 * getConsumesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < produces_.size(); i++) { - dataSize += computeStringSizeNoTag(produces_.getRaw(i)); - } - size += dataSize; - size += 1 * getProducesList().size(); - } - for (java.util.Map.Entry entry - : internalGetResponses().getMap().entrySet()) { - com.google.protobuf.MapEntry - responses__ = ResponsesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, responses__); - } - { - int dataSize = 0; - for (int i = 0; i < schemes_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(schemes_.get(i)); - } - size += dataSize; - if (!getSchemesList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }schemesMemoizedSerializedSize = dataSize; - } - if (deprecated_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(11, deprecated_); - } - for (int i = 0; i < security_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, security_.get(i)); - } - for (java.util.Map.Entry entry - : internalGetExtensions().getMap().entrySet()) { - com.google.protobuf.MapEntry - extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, extensions__); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getParameters()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Operation)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Operation other = (grpc.gateway.protoc_gen_openapiv2.options.Operation) obj; - - if (!getTagsList() - .equals(other.getTagsList())) return false; - if (!getSummary() - .equals(other.getSummary())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasExternalDocs() != other.hasExternalDocs()) return false; - if (hasExternalDocs()) { - if (!getExternalDocs() - .equals(other.getExternalDocs())) return false; - } - if (!getOperationId() - .equals(other.getOperationId())) return false; - if (!getConsumesList() - .equals(other.getConsumesList())) return false; - if (!getProducesList() - .equals(other.getProducesList())) return false; - if (!internalGetResponses().equals( - other.internalGetResponses())) return false; - if (!schemes_.equals(other.schemes_)) return false; - if (getDeprecated() - != other.getDeprecated()) return false; - if (!getSecurityList() - .equals(other.getSecurityList())) return false; - if (!internalGetExtensions().equals( - other.internalGetExtensions())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters() - .equals(other.getParameters())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTagsCount() > 0) { - hash = (37 * hash) + TAGS_FIELD_NUMBER; - hash = (53 * hash) + getTagsList().hashCode(); - } - hash = (37 * hash) + SUMMARY_FIELD_NUMBER; - hash = (53 * hash) + getSummary().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasExternalDocs()) { - hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; - hash = (53 * hash) + getExternalDocs().hashCode(); - } - hash = (37 * hash) + OPERATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getOperationId().hashCode(); - if (getConsumesCount() > 0) { - hash = (37 * hash) + CONSUMES_FIELD_NUMBER; - hash = (53 * hash) + getConsumesList().hashCode(); - } - if (getProducesCount() > 0) { - hash = (37 * hash) + PRODUCES_FIELD_NUMBER; - hash = (53 * hash) + getProducesList().hashCode(); - } - if (!internalGetResponses().getMap().isEmpty()) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + internalGetResponses().hashCode(); - } - if (getSchemesCount() > 0) { - hash = (37 * hash) + SCHEMES_FIELD_NUMBER; - hash = (53 * hash) + schemes_.hashCode(); - } - hash = (37 * hash) + DEPRECATED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getDeprecated()); - if (getSecurityCount() > 0) { - hash = (37 * hash) + SECURITY_FIELD_NUMBER; - hash = (53 * hash) + getSecurityList().hashCode(); - } - if (!internalGetExtensions().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtensions().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Operation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Operation` is a representation of OpenAPI v2 specification's Operation object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
-   *
-   * Example:
-   *
-   *  service EchoService {
-   *    rpc Echo(SimpleMessage) returns (SimpleMessage) {
-   *      option (google.api.http) = {
-   *        get: "/v1/example/echo/{id}"
-   *      };
-   *
-   *      option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
-   *        summary: "Get a message.";
-   *        operation_id: "getMessage";
-   *        tags: "echo";
-   *        responses: {
-   *          key: "200"
-   *            value: {
-   *            description: "OK";
-   *          }
-   *        }
-   *      };
-   *    }
-   *  }
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Operation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Operation) - grpc.gateway.protoc_gen_openapiv2.options.OperationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 9: - return internalGetResponses(); - case 13: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 9: - return internalGetMutableResponses(); - case 13: - return internalGetMutableExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Operation.class, grpc.gateway.protoc_gen_openapiv2.options.Operation.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Operation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getExternalDocsFieldBuilder(); - getSecurityFieldBuilder(); - getParametersFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - tags_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - summary_ = ""; - description_ = ""; - externalDocs_ = null; - if (externalDocsBuilder_ != null) { - externalDocsBuilder_.dispose(); - externalDocsBuilder_ = null; - } - operationId_ = ""; - consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - internalGetMutableResponses().clear(); - schemes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - deprecated_ = false; - if (securityBuilder_ == null) { - security_ = java.util.Collections.emptyList(); - } else { - security_ = null; - securityBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000400); - internalGetMutableExtensions().clear(); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Operation build() { - grpc.gateway.protoc_gen_openapiv2.options.Operation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Operation buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Operation result = new grpc.gateway.protoc_gen_openapiv2.options.Operation(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Operation result) { - if (((bitField0_ & 0x00000100) != 0)) { - schemes_ = java.util.Collections.unmodifiableList(schemes_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.schemes_ = schemes_; - if (securityBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { - security_ = java.util.Collections.unmodifiableList(security_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.security_ = security_; - } else { - result.security_ = securityBuilder_.build(); - } - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Operation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - tags_.makeImmutable(); - result.tags_ = tags_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.summary_ = summary_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.externalDocs_ = externalDocsBuilder_ == null - ? externalDocs_ - : externalDocsBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.operationId_ = operationId_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - consumes_.makeImmutable(); - result.consumes_ = consumes_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - produces_.makeImmutable(); - result.produces_ = produces_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.responses_ = internalGetResponses().build(ResponsesDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.deprecated_ = deprecated_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.parameters_ = parametersBuilder_ == null - ? parameters_ - : parametersBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Operation) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Operation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Operation other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance()) return this; - if (!other.tags_.isEmpty()) { - if (tags_.isEmpty()) { - tags_ = other.tags_; - bitField0_ |= 0x00000001; - } else { - ensureTagsIsMutable(); - tags_.addAll(other.tags_); - } - onChanged(); - } - if (!other.getSummary().isEmpty()) { - summary_ = other.summary_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasExternalDocs()) { - mergeExternalDocs(other.getExternalDocs()); - } - if (!other.getOperationId().isEmpty()) { - operationId_ = other.operationId_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.consumes_.isEmpty()) { - if (consumes_.isEmpty()) { - consumes_ = other.consumes_; - bitField0_ |= 0x00000020; - } else { - ensureConsumesIsMutable(); - consumes_.addAll(other.consumes_); - } - onChanged(); - } - if (!other.produces_.isEmpty()) { - if (produces_.isEmpty()) { - produces_ = other.produces_; - bitField0_ |= 0x00000040; - } else { - ensureProducesIsMutable(); - produces_.addAll(other.produces_); - } - onChanged(); - } - internalGetMutableResponses().mergeFrom( - other.internalGetResponses()); - bitField0_ |= 0x00000080; - if (!other.schemes_.isEmpty()) { - if (schemes_.isEmpty()) { - schemes_ = other.schemes_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureSchemesIsMutable(); - schemes_.addAll(other.schemes_); - } - onChanged(); - } - if (other.getDeprecated() != false) { - setDeprecated(other.getDeprecated()); - } - if (securityBuilder_ == null) { - if (!other.security_.isEmpty()) { - if (security_.isEmpty()) { - security_ = other.security_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureSecurityIsMutable(); - security_.addAll(other.security_); - } - onChanged(); - } - } else { - if (!other.security_.isEmpty()) { - if (securityBuilder_.isEmpty()) { - securityBuilder_.dispose(); - securityBuilder_ = null; - security_ = other.security_; - bitField0_ = (bitField0_ & ~0x00000400); - securityBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSecurityFieldBuilder() : null; - } else { - securityBuilder_.addAllMessages(other.security_); - } - } - } - internalGetMutableExtensions().mergeFrom( - other.internalGetExtensions()); - bitField0_ |= 0x00000800; - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureTagsIsMutable(); - tags_.add(s); - break; - } // case 10 - case 18: { - summary_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getExternalDocsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - operationId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - ensureConsumesIsMutable(); - consumes_.add(s); - break; - } // case 50 - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - ensureProducesIsMutable(); - produces_.add(s); - break; - } // case 58 - case 74: { - com.google.protobuf.MapEntry - responses__ = input.readMessage( - ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableResponses().ensureBuilderMap().put( - responses__.getKey(), responses__.getValue()); - bitField0_ |= 0x00000080; - break; - } // case 74 - case 80: { - int tmpRaw = input.readEnum(); - ensureSchemesIsMutable(); - schemes_.add(tmpRaw); - break; - } // case 80 - case 82: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureSchemesIsMutable(); - schemes_.add(tmpRaw); - } - input.popLimit(oldLimit); - break; - } // case 82 - case 88: { - deprecated_ = input.readBool(); - bitField0_ |= 0x00000200; - break; - } // case 88 - case 98: { - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement m = - input.readMessage( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.parser(), - extensionRegistry); - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(m); - } else { - securityBuilder_.addMessage(m); - } - break; - } // case 98 - case 106: { - com.google.protobuf.MapEntry - extensions__ = input.readMessage( - ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExtensions().ensureBuilderMap().put( - extensions__.getKey(), extensions__.getValue()); - bitField0_ |= 0x00000800; - break; - } // case 106 - case 114: { - input.readMessage( - getParametersFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 114 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringArrayList tags_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureTagsIsMutable() { - if (!tags_.isModifiable()) { - tags_ = new com.google.protobuf.LazyStringArrayList(tags_); - } - bitField0_ |= 0x00000001; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @return A list containing the tags. - */ - public com.google.protobuf.ProtocolStringList - getTagsList() { - tags_.makeImmutable(); - return tags_; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @return The count of tags. - */ - public int getTagsCount() { - return tags_.size(); - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param index The index of the element to return. - * @return The tags at the given index. - */ - public java.lang.String getTags(int index) { - return tags_.get(index); - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param index The index of the value to return. - * @return The bytes of the tags at the given index. - */ - public com.google.protobuf.ByteString - getTagsBytes(int index) { - return tags_.getByteString(index); - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param index The index to set the value at. - * @param value The tags to set. - * @return This builder for chaining. - */ - public Builder setTags( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureTagsIsMutable(); - tags_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param value The tags to add. - * @return This builder for chaining. - */ - public Builder addTags( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureTagsIsMutable(); - tags_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param values The tags to add. - * @return This builder for chaining. - */ - public Builder addAllTags( - java.lang.Iterable values) { - ensureTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tags_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @return This builder for chaining. - */ - public Builder clearTags() { - tags_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param value The bytes of the tags to add. - * @return This builder for chaining. - */ - public Builder addTagsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureTagsIsMutable(); - tags_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object summary_ = ""; - /** - *
-     * A short summary of what the operation does. For maximum readability in the
-     * swagger-ui, this field SHOULD be less than 120 characters.
-     * 
- * - * string summary = 2 [json_name = "summary"]; - * @return The summary. - */ - public java.lang.String getSummary() { - java.lang.Object ref = summary_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - summary_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A short summary of what the operation does. For maximum readability in the
-     * swagger-ui, this field SHOULD be less than 120 characters.
-     * 
- * - * string summary = 2 [json_name = "summary"]; - * @return The bytes for summary. - */ - public com.google.protobuf.ByteString - getSummaryBytes() { - java.lang.Object ref = summary_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - summary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A short summary of what the operation does. For maximum readability in the
-     * swagger-ui, this field SHOULD be less than 120 characters.
-     * 
- * - * string summary = 2 [json_name = "summary"]; - * @param value The summary to set. - * @return This builder for chaining. - */ - public Builder setSummary( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - summary_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A short summary of what the operation does. For maximum readability in the
-     * swagger-ui, this field SHOULD be less than 120 characters.
-     * 
- * - * string summary = 2 [json_name = "summary"]; - * @return This builder for chaining. - */ - public Builder clearSummary() { - summary_ = getDefaultInstance().getSummary(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A short summary of what the operation does. For maximum readability in the
-     * swagger-ui, this field SHOULD be less than 120 characters.
-     * 
- * - * string summary = 2 [json_name = "summary"]; - * @param value The bytes for summary to set. - * @return This builder for chaining. - */ - public Builder setSummaryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - summary_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A verbose explanation of the operation behavior. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 3 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A verbose explanation of the operation behavior. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 3 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A verbose explanation of the operation behavior. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 3 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * A verbose explanation of the operation behavior. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 3 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * A verbose explanation of the operation behavior. GFM syntax can be used for
-     * rich text representation.
-     * 
- * - * string description = 3 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - public boolean hasExternalDocs() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { - if (externalDocsBuilder_ == null) { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } else { - return externalDocsBuilder_.getMessage(); - } - } - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { - if (externalDocsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - externalDocs_ = value; - } else { - externalDocsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - public Builder setExternalDocs( - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { - if (externalDocsBuilder_ == null) { - externalDocs_ = builderForValue.build(); - } else { - externalDocsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { - if (externalDocsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - externalDocs_ != null && - externalDocs_ != grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { - getExternalDocsBuilder().mergeFrom(value); - } else { - externalDocs_ = value; - } - } else { - externalDocsBuilder_.mergeFrom(value); - } - if (externalDocs_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - public Builder clearExternalDocs() { - bitField0_ = (bitField0_ & ~0x00000008); - externalDocs_ = null; - if (externalDocsBuilder_ != null) { - externalDocsBuilder_.dispose(); - externalDocsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getExternalDocsFieldBuilder().getBuilder(); - } - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { - if (externalDocsBuilder_ != null) { - return externalDocsBuilder_.getMessageOrBuilder(); - } else { - return externalDocs_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - } - /** - *
-     * Additional external documentation for this operation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> - getExternalDocsFieldBuilder() { - if (externalDocsBuilder_ == null) { - externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( - getExternalDocs(), - getParentForChildren(), - isClean()); - externalDocs_ = null; - } - return externalDocsBuilder_; - } - - private java.lang.Object operationId_ = ""; - /** - *
-     * Unique string used to identify the operation. The id MUST be unique among
-     * all operations described in the API. Tools and libraries MAY use the
-     * operationId to uniquely identify an operation, therefore, it is recommended
-     * to follow common programming naming conventions.
-     * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @return The operationId. - */ - public java.lang.String getOperationId() { - java.lang.Object ref = operationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Unique string used to identify the operation. The id MUST be unique among
-     * all operations described in the API. Tools and libraries MAY use the
-     * operationId to uniquely identify an operation, therefore, it is recommended
-     * to follow common programming naming conventions.
-     * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @return The bytes for operationId. - */ - public com.google.protobuf.ByteString - getOperationIdBytes() { - java.lang.Object ref = operationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - operationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Unique string used to identify the operation. The id MUST be unique among
-     * all operations described in the API. Tools and libraries MAY use the
-     * operationId to uniquely identify an operation, therefore, it is recommended
-     * to follow common programming naming conventions.
-     * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @param value The operationId to set. - * @return This builder for chaining. - */ - public Builder setOperationId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - operationId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Unique string used to identify the operation. The id MUST be unique among
-     * all operations described in the API. Tools and libraries MAY use the
-     * operationId to uniquely identify an operation, therefore, it is recommended
-     * to follow common programming naming conventions.
-     * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @return This builder for chaining. - */ - public Builder clearOperationId() { - operationId_ = getDefaultInstance().getOperationId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * Unique string used to identify the operation. The id MUST be unique among
-     * all operations described in the API. Tools and libraries MAY use the
-     * operationId to uniquely identify an operation, therefore, it is recommended
-     * to follow common programming naming conventions.
-     * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @param value The bytes for operationId to set. - * @return This builder for chaining. - */ - public Builder setOperationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - operationId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureConsumesIsMutable() { - if (!consumes_.isModifiable()) { - consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return A list containing the consumes. - */ - public com.google.protobuf.ProtocolStringList - getConsumesList() { - consumes_.makeImmutable(); - return consumes_; - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return The count of consumes. - */ - public int getConsumesCount() { - return consumes_.size(); - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the element to return. - * @return The consumes at the given index. - */ - public java.lang.String getConsumes(int index) { - return consumes_.get(index); - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the value to return. - * @return The bytes of the consumes at the given index. - */ - public com.google.protobuf.ByteString - getConsumesBytes(int index) { - return consumes_.getByteString(index); - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index to set the value at. - * @param value The consumes to set. - * @return This builder for chaining. - */ - public Builder setConsumes( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureConsumesIsMutable(); - consumes_.set(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param value The consumes to add. - * @return This builder for chaining. - */ - public Builder addConsumes( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureConsumesIsMutable(); - consumes_.add(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param values The consumes to add. - * @return This builder for chaining. - */ - public Builder addAllConsumes( - java.lang.Iterable values) { - ensureConsumesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, consumes_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return This builder for chaining. - */ - public Builder clearConsumes() { - consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020);; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the operation can consume. This overrides the consumes
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param value The bytes of the consumes to add. - * @return This builder for chaining. - */ - public Builder addConsumesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureConsumesIsMutable(); - consumes_.add(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureProducesIsMutable() { - if (!produces_.isModifiable()) { - produces_ = new com.google.protobuf.LazyStringArrayList(produces_); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return A list containing the produces. - */ - public com.google.protobuf.ProtocolStringList - getProducesList() { - produces_.makeImmutable(); - return produces_; - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return The count of produces. - */ - public int getProducesCount() { - return produces_.size(); - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the element to return. - * @return The produces at the given index. - */ - public java.lang.String getProduces(int index) { - return produces_.get(index); - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the value to return. - * @return The bytes of the produces at the given index. - */ - public com.google.protobuf.ByteString - getProducesBytes(int index) { - return produces_.getByteString(index); - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index to set the value at. - * @param value The produces to set. - * @return This builder for chaining. - */ - public Builder setProduces( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureProducesIsMutable(); - produces_.set(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param value The produces to add. - * @return This builder for chaining. - */ - public Builder addProduces( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureProducesIsMutable(); - produces_.add(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param values The produces to add. - * @return This builder for chaining. - */ - public Builder addAllProduces( - java.lang.Iterable values) { - ensureProducesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, produces_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return This builder for chaining. - */ - public Builder clearProduces() { - produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040);; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the operation can produce. This overrides the produces
-     * definition at the OpenAPI Object. An empty value MAY be used to clear the
-     * global definition. Value MUST be as described under Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param value The bytes of the produces to add. - * @return This builder for chaining. - */ - public Builder addProducesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureProducesIsMutable(); - produces_.add(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private static final class ResponsesConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response build(grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder val) { - if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { return (grpc.gateway.protoc_gen_openapiv2.options.Response) val; } - return ((grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ResponsesDefaultEntryHolder.defaultEntry; - } - }; - private static final ResponsesConverter responsesConverter = new ResponsesConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.Response, grpc.gateway.protoc_gen_openapiv2.options.Response.Builder> responses_; - private com.google.protobuf.MapFieldBuilder - internalGetResponses() { - if (responses_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(responsesConverter); - } - return responses_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableResponses() { - if (responses_ == null) { - responses_ = new com.google.protobuf.MapFieldBuilder<>(responsesConverter); - } - bitField0_ |= 0x00000080; - onChanged(); - return responses_; - } - public int getResponsesCount() { - return internalGetResponses().ensureBuilderMap().size(); - } - /** - *
-     * The list of possible responses as they are returned from executing this
-     * operation.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - @java.lang.Override - public boolean containsResponses( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResponses().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getResponsesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResponses() { - return getResponsesMap(); - } - /** - *
-     * The list of possible responses as they are returned from executing this
-     * operation.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - @java.lang.Override - public java.util.Map getResponsesMap() { - return internalGetResponses().getImmutableMap(); - } - /** - *
-     * The list of possible responses as they are returned from executing this
-     * operation.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); - return map.containsKey(key) ? responsesConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * The list of possible responses as they are returned from executing this
-     * operation.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return responsesConverter.build(map.get(key)); - } - public Builder clearResponses() { - bitField0_ = (bitField0_ & ~0x00000080); - internalGetMutableResponses().clear(); - return this; - } - /** - *
-     * The list of possible responses as they are returned from executing this
-     * operation.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - public Builder removeResponses( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableResponses().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableResponses() { - bitField0_ |= 0x00000080; - return internalGetMutableResponses().ensureMessageMap(); - } - /** - *
-     * The list of possible responses as they are returned from executing this
-     * operation.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - public Builder putResponses( - java.lang.String key, - grpc.gateway.protoc_gen_openapiv2.options.Response value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableResponses().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000080; - return this; - } - /** - *
-     * The list of possible responses as they are returned from executing this
-     * operation.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - public Builder putAllResponses( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableResponses().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000080; - return this; - } - /** - *
-     * The list of possible responses as they are returned from executing this
-     * operation.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Response.Builder putResponsesBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableResponses().ensureBuilderMap(); - grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { - entry = ((grpc.gateway.protoc_gen_openapiv2.options.Response) entry).toBuilder(); - builderMap.put(key, entry); - } - return (grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) entry; - } - - private java.util.List schemes_ = - java.util.Collections.emptyList(); - private void ensureSchemesIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - schemes_ = new java.util.ArrayList(schemes_); - bitField0_ |= 0x00000100; - } - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return A list containing the schemes. - */ - public java.util.List getSchemesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return The count of schemes. - */ - public int getSchemesCount() { - return schemes_.size(); - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param index The index of the element to return. - * @return The schemes at the given index. - */ - public grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { - return schemes_converter_.convert(schemes_.get(index)); - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param index The index to set the value at. - * @param value The schemes to set. - * @return This builder for chaining. - */ - public Builder setSchemes( - int index, grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchemesIsMutable(); - schemes_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param value The schemes to add. - * @return This builder for chaining. - */ - public Builder addSchemes(grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchemesIsMutable(); - schemes_.add(value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param values The schemes to add. - * @return This builder for chaining. - */ - public Builder addAllSchemes( - java.lang.Iterable values) { - ensureSchemesIsMutable(); - for (grpc.gateway.protoc_gen_openapiv2.options.Scheme value : values) { - schemes_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return This builder for chaining. - */ - public Builder clearSchemes() { - schemes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return A list containing the enum numeric values on the wire for schemes. - */ - public java.util.List - getSchemesValueList() { - return java.util.Collections.unmodifiableList(schemes_); - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of schemes at the given index. - */ - public int getSchemesValue(int index) { - return schemes_.get(index); - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for schemes to set. - * @return This builder for chaining. - */ - public Builder setSchemesValue( - int index, int value) { - ensureSchemesIsMutable(); - schemes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param value The enum numeric value on the wire for schemes to add. - * @return This builder for chaining. - */ - public Builder addSchemesValue(int value) { - ensureSchemesIsMutable(); - schemes_.add(value); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol for the operation. Values MUST be from the list:
-     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-     * schemes definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param values The enum numeric values on the wire for schemes to add. - * @return This builder for chaining. - */ - public Builder addAllSchemesValue( - java.lang.Iterable values) { - ensureSchemesIsMutable(); - for (int value : values) { - schemes_.add(value); - } - onChanged(); - return this; - } - - private boolean deprecated_ ; - /** - *
-     * Declares this operation to be deprecated. Usage of the declared operation
-     * should be refrained. Default value is false.
-     * 
- * - * bool deprecated = 11 [json_name = "deprecated"]; - * @return The deprecated. - */ - @java.lang.Override - public boolean getDeprecated() { - return deprecated_; - } - /** - *
-     * Declares this operation to be deprecated. Usage of the declared operation
-     * should be refrained. Default value is false.
-     * 
- * - * bool deprecated = 11 [json_name = "deprecated"]; - * @param value The deprecated to set. - * @return This builder for chaining. - */ - public Builder setDeprecated(boolean value) { - - deprecated_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * Declares this operation to be deprecated. Usage of the declared operation
-     * should be refrained. Default value is false.
-     * 
- * - * bool deprecated = 11 [json_name = "deprecated"]; - * @return This builder for chaining. - */ - public Builder clearDeprecated() { - bitField0_ = (bitField0_ & ~0x00000200); - deprecated_ = false; - onChanged(); - return this; - } - - private java.util.List security_ = - java.util.Collections.emptyList(); - private void ensureSecurityIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { - security_ = new java.util.ArrayList(security_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> securityBuilder_; - - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public java.util.List getSecurityList() { - if (securityBuilder_ == null) { - return java.util.Collections.unmodifiableList(security_); - } else { - return securityBuilder_.getMessageList(); - } - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public int getSecurityCount() { - if (securityBuilder_ == null) { - return security_.size(); - } else { - return securityBuilder_.getCount(); - } - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { - if (securityBuilder_ == null) { - return security_.get(index); - } else { - return securityBuilder_.getMessage(index); - } - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder setSecurity( - int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { - if (securityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSecurityIsMutable(); - security_.set(index, value); - onChanged(); - } else { - securityBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder setSecurity( - int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.set(index, builderForValue.build()); - onChanged(); - } else { - securityBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addSecurity(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { - if (securityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSecurityIsMutable(); - security_.add(value); - onChanged(); - } else { - securityBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addSecurity( - int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { - if (securityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSecurityIsMutable(); - security_.add(index, value); - onChanged(); - } else { - securityBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addSecurity( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(builderForValue.build()); - onChanged(); - } else { - securityBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addSecurity( - int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(index, builderForValue.build()); - onChanged(); - } else { - securityBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addAllSecurity( - java.lang.Iterable values) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, security_); - onChanged(); - } else { - securityBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder clearSecurity() { - if (securityBuilder_ == null) { - security_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - securityBuilder_.clear(); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder removeSecurity(int index) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.remove(index); - onChanged(); - } else { - securityBuilder_.remove(index); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder getSecurityBuilder( - int index) { - return getSecurityFieldBuilder().getBuilder(index); - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( - int index) { - if (securityBuilder_ == null) { - return security_.get(index); } else { - return securityBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public java.util.List - getSecurityOrBuilderList() { - if (securityBuilder_ != null) { - return securityBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(security_); - } - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder() { - return getSecurityFieldBuilder().addBuilder( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder( - int index) { - return getSecurityFieldBuilder().addBuilder( - index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); - } - /** - *
-     * A declaration of which security schemes are applied for this operation. The
-     * list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements). This
-     * definition overrides any declared top-level security. To remove a top-level
-     * security declaration, an empty array can be used.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public java.util.List - getSecurityBuilderList() { - return getSecurityFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> - getSecurityFieldBuilder() { - if (securityBuilder_ == null) { - securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder>( - security_, - ((bitField0_ & 0x00000400) != 0), - getParentForChildren(), - isClean()); - security_ = null; - } - return securityBuilder_; - } - - private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ExtensionsDefaultEntryHolder.defaultEntry; - } - }; - private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; - private com.google.protobuf.MapFieldBuilder - internalGetExtensions() { - if (extensions_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - return extensions_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableExtensions() { - if (extensions_ == null) { - extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - bitField0_ |= 0x00000800; - onChanged(); - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().ensureBuilderMap().size(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getImmutableMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return extensionsConverter.build(map.get(key)); - } - public Builder clearExtensions() { - bitField0_ = (bitField0_ & ~0x00000800); - internalGetMutableExtensions().clear(); - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - public Builder removeExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtensions().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExtensions() { - bitField0_ |= 0x00000800; - return internalGetMutableExtensions().ensureMessageMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - public Builder putExtensions( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableExtensions().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000800; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - public Builder putAllExtensions( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableExtensions().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000800; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - - private grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Parameters, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder> parametersBuilder_; - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - * @return The parameters. - */ - public grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - public Builder setParameters(grpc.gateway.protoc_gen_openapiv2.options.Parameters value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - public Builder setParameters( - grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - public Builder mergeParameters(grpc.gateway.protoc_gen_openapiv2.options.Parameters value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) && - parameters_ != null && - parameters_ != grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00001000; - onChanged(); - } - return this; - } - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00001000); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder getParametersBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return getParametersFieldBuilder().getBuilder(); - } - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; - } - } - /** - *
-     * Custom parameters such as HTTP request headers.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-     * and https://swagger.io/specification/v2/#parameter-object.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Parameters, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder> - getParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Parameters, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder>( - getParameters(), - getParentForChildren(), - isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Operation) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Operation) - private static final grpc.gateway.protoc_gen_openapiv2.options.Operation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Operation(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Operation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java deleted file mode 100644 index bbe84c0c..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface OperationOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Operation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @return A list containing the tags. - */ - java.util.List - getTagsList(); - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @return The count of tags. - */ - int getTagsCount(); - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param index The index of the element to return. - * @return The tags at the given index. - */ - java.lang.String getTags(int index); - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated string tags = 1 [json_name = "tags"]; - * @param index The index of the value to return. - * @return The bytes of the tags at the given index. - */ - com.google.protobuf.ByteString - getTagsBytes(int index); - - /** - *
-   * A short summary of what the operation does. For maximum readability in the
-   * swagger-ui, this field SHOULD be less than 120 characters.
-   * 
- * - * string summary = 2 [json_name = "summary"]; - * @return The summary. - */ - java.lang.String getSummary(); - /** - *
-   * A short summary of what the operation does. For maximum readability in the
-   * swagger-ui, this field SHOULD be less than 120 characters.
-   * 
- * - * string summary = 2 [json_name = "summary"]; - * @return The bytes for summary. - */ - com.google.protobuf.ByteString - getSummaryBytes(); - - /** - *
-   * A verbose explanation of the operation behavior. GFM syntax can be used for
-   * rich text representation.
-   * 
- * - * string description = 3 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A verbose explanation of the operation behavior. GFM syntax can be used for
-   * rich text representation.
-   * 
- * - * string description = 3 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Additional external documentation for this operation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - boolean hasExternalDocs(); - /** - *
-   * Additional external documentation for this operation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); - /** - *
-   * Additional external documentation for this operation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); - - /** - *
-   * Unique string used to identify the operation. The id MUST be unique among
-   * all operations described in the API. Tools and libraries MAY use the
-   * operationId to uniquely identify an operation, therefore, it is recommended
-   * to follow common programming naming conventions.
-   * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @return The operationId. - */ - java.lang.String getOperationId(); - /** - *
-   * Unique string used to identify the operation. The id MUST be unique among
-   * all operations described in the API. Tools and libraries MAY use the
-   * operationId to uniquely identify an operation, therefore, it is recommended
-   * to follow common programming naming conventions.
-   * 
- * - * string operation_id = 5 [json_name = "operationId"]; - * @return The bytes for operationId. - */ - com.google.protobuf.ByteString - getOperationIdBytes(); - - /** - *
-   * A list of MIME types the operation can consume. This overrides the consumes
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return A list containing the consumes. - */ - java.util.List - getConsumesList(); - /** - *
-   * A list of MIME types the operation can consume. This overrides the consumes
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return The count of consumes. - */ - int getConsumesCount(); - /** - *
-   * A list of MIME types the operation can consume. This overrides the consumes
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the element to return. - * @return The consumes at the given index. - */ - java.lang.String getConsumes(int index); - /** - *
-   * A list of MIME types the operation can consume. This overrides the consumes
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the value to return. - * @return The bytes of the consumes at the given index. - */ - com.google.protobuf.ByteString - getConsumesBytes(int index); - - /** - *
-   * A list of MIME types the operation can produce. This overrides the produces
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return A list containing the produces. - */ - java.util.List - getProducesList(); - /** - *
-   * A list of MIME types the operation can produce. This overrides the produces
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return The count of produces. - */ - int getProducesCount(); - /** - *
-   * A list of MIME types the operation can produce. This overrides the produces
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the element to return. - * @return The produces at the given index. - */ - java.lang.String getProduces(int index); - /** - *
-   * A list of MIME types the operation can produce. This overrides the produces
-   * definition at the OpenAPI Object. An empty value MAY be used to clear the
-   * global definition. Value MUST be as described under Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the value to return. - * @return The bytes of the produces at the given index. - */ - com.google.protobuf.ByteString - getProducesBytes(int index); - - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - int getResponsesCount(); - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - boolean containsResponses( - java.lang.String key); - /** - * Use {@link #getResponsesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getResponses(); - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - java.util.Map - getResponsesMap(); - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue); - /** - *
-   * The list of possible responses as they are returned from executing this
-   * operation.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( - java.lang.String key); - - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return A list containing the schemes. - */ - java.util.List getSchemesList(); - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return The count of schemes. - */ - int getSchemesCount(); - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param index The index of the element to return. - * @return The schemes at the given index. - */ - grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index); - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @return A list containing the enum numeric values on the wire for schemes. - */ - java.util.List - getSchemesValueList(); - /** - *
-   * The transfer protocol for the operation. Values MUST be from the list:
-   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
-   * schemes definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of schemes at the given index. - */ - int getSchemesValue(int index); - - /** - *
-   * Declares this operation to be deprecated. Usage of the declared operation
-   * should be refrained. Default value is false.
-   * 
- * - * bool deprecated = 11 [json_name = "deprecated"]; - * @return The deprecated. - */ - boolean getDeprecated(); - - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - java.util.List - getSecurityList(); - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index); - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - int getSecurityCount(); - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - java.util.List - getSecurityOrBuilderList(); - /** - *
-   * A declaration of which security schemes are applied for this operation. The
-   * list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements). This
-   * definition overrides any declared top-level security. To remove a top-level
-   * security declaration, an empty array can be used.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( - int index); - - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - int getExtensionsCount(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - boolean containsExtensions( - java.lang.String key); - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExtensions(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - java.util.Map - getExtensionsMap(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; - */ - com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key); - - /** - *
-   * Custom parameters such as HTTP request headers.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-   * and https://swagger.io/specification/v2/#parameter-object.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - /** - *
-   * Custom parameters such as HTTP request headers.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-   * and https://swagger.io/specification/v2/#parameter-object.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - * @return The parameters. - */ - grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters(); - /** - *
-   * Custom parameters such as HTTP request headers.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
-   * and https://swagger.io/specification/v2/#parameter-object.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder(); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java deleted file mode 100644 index efd4cecd..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java +++ /dev/null @@ -1,891 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Parameters` is a representation of OpenAPI v2 specification's parameters object.
- * Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
- * allow header parameters to be set here since we do not want users specifying custom non-header
- * parameters beyond those inferred from the Protobuf schema.
- * See: https://swagger.io/specification/v2/#parameter-object
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters} - */ -public final class Parameters extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters) - ParametersOrBuilder { -private static final long serialVersionUID = 0L; - // Use Parameters.newBuilder() to construct. - private Parameters(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Parameters() { - headers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Parameters(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Parameters.class, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder.class); - } - - public static final int HEADERS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List headers_; - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - @java.lang.Override - public java.util.List getHeadersList() { - return headers_; - } - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - @java.lang.Override - public java.util.List - getHeadersOrBuilderList() { - return headers_; - } - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - @java.lang.Override - public int getHeadersCount() { - return headers_.size(); - } - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index) { - return headers_.get(index); - } - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( - int index) { - return headers_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < headers_.size(); i++) { - output.writeMessage(1, headers_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < headers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, headers_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Parameters)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Parameters other = (grpc.gateway.protoc_gen_openapiv2.options.Parameters) obj; - - if (!getHeadersList() - .equals(other.getHeadersList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getHeadersCount() > 0) { - hash = (37 * hash) + HEADERS_FIELD_NUMBER; - hash = (53 * hash) + getHeadersList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Parameters prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Parameters` is a representation of OpenAPI v2 specification's parameters object.
-   * Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
-   * allow header parameters to be set here since we do not want users specifying custom non-header
-   * parameters beyond those inferred from the Protobuf schema.
-   * See: https://swagger.io/specification/v2/#parameter-object
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters) - grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Parameters.class, grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Parameters.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (headersBuilder_ == null) { - headers_ = java.util.Collections.emptyList(); - } else { - headers_ = null; - headersBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Parameters build() { - grpc.gateway.protoc_gen_openapiv2.options.Parameters result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Parameters buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Parameters result = new grpc.gateway.protoc_gen_openapiv2.options.Parameters(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Parameters result) { - if (headersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - headers_ = java.util.Collections.unmodifiableList(headers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.headers_ = headers_; - } else { - result.headers_ = headersBuilder_.build(); - } - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Parameters result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Parameters) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Parameters)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Parameters other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance()) return this; - if (headersBuilder_ == null) { - if (!other.headers_.isEmpty()) { - if (headers_.isEmpty()) { - headers_ = other.headers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureHeadersIsMutable(); - headers_.addAll(other.headers_); - } - onChanged(); - } - } else { - if (!other.headers_.isEmpty()) { - if (headersBuilder_.isEmpty()) { - headersBuilder_.dispose(); - headersBuilder_ = null; - headers_ = other.headers_; - bitField0_ = (bitField0_ & ~0x00000001); - headersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getHeadersFieldBuilder() : null; - } else { - headersBuilder_.addAllMessages(other.headers_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter m = - input.readMessage( - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.parser(), - extensionRegistry); - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.add(m); - } else { - headersBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List headers_ = - java.util.Collections.emptyList(); - private void ensureHeadersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - headers_ = new java.util.ArrayList(headers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder> headersBuilder_; - - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public java.util.List getHeadersList() { - if (headersBuilder_ == null) { - return java.util.Collections.unmodifiableList(headers_); - } else { - return headersBuilder_.getMessageList(); - } - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public int getHeadersCount() { - if (headersBuilder_ == null) { - return headers_.size(); - } else { - return headersBuilder_.getCount(); - } - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index) { - if (headersBuilder_ == null) { - return headers_.get(index); - } else { - return headersBuilder_.getMessage(index); - } - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder setHeaders( - int index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { - if (headersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHeadersIsMutable(); - headers_.set(index, value); - onChanged(); - } else { - headersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder setHeaders( - int index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.set(index, builderForValue.build()); - onChanged(); - } else { - headersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder addHeaders(grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { - if (headersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHeadersIsMutable(); - headers_.add(value); - onChanged(); - } else { - headersBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder addHeaders( - int index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { - if (headersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHeadersIsMutable(); - headers_.add(index, value); - onChanged(); - } else { - headersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder addHeaders( - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.add(builderForValue.build()); - onChanged(); - } else { - headersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder addHeaders( - int index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.add(index, builderForValue.build()); - onChanged(); - } else { - headersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder addAllHeaders( - java.lang.Iterable values) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, headers_); - onChanged(); - } else { - headersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder clearHeaders() { - if (headersBuilder_ == null) { - headers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - headersBuilder_.clear(); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public Builder removeHeaders(int index) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.remove(index); - onChanged(); - } else { - headersBuilder_.remove(index); - } - return this; - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder getHeadersBuilder( - int index) { - return getHeadersFieldBuilder().getBuilder(index); - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( - int index) { - if (headersBuilder_ == null) { - return headers_.get(index); } else { - return headersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public java.util.List - getHeadersOrBuilderList() { - if (headersBuilder_ != null) { - return headersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(headers_); - } - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder addHeadersBuilder() { - return getHeadersFieldBuilder().addBuilder( - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()); - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder addHeadersBuilder( - int index) { - return getHeadersFieldBuilder().addBuilder( - index, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()); - } - /** - *
-     * `Headers` is one or more HTTP header parameter.
-     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - public java.util.List - getHeadersBuilderList() { - return getHeadersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder> - getHeadersFieldBuilder() { - if (headersBuilder_ == null) { - headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder>( - headers_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - headers_ = null; - } - return headersBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Parameters) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Parameters) - private static final grpc.gateway.protoc_gen_openapiv2.options.Parameters DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Parameters(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Parameters parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java deleted file mode 100644 index ae40a3a1..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface ParametersOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Parameters) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - java.util.List - getHeadersList(); - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index); - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - int getHeadersCount(); - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - java.util.List - getHeadersOrBuilderList(); - /** - *
-   * `Headers` is one or more HTTP header parameter.
-   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( - int index); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Response.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Response.java deleted file mode 100644 index 5cd221a8..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Response.java +++ /dev/null @@ -1,1876 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Response` is a representation of OpenAPI v2 specification's Response object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Response} - */ -public final class Response extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Response) - ResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use Response.newBuilder() to construct. - private Response(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Response() { - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Response(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetHeaders(); - case 4: - return internalGetExamples(); - case 5: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Response.class, grpc.gateway.protoc_gen_openapiv2.options.Response.Builder.class); - } - - private int bitField0_; - public static final int DESCRIPTION_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * `Description` is a short description of the response.
-   * GFM syntax can be used for rich text representation.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * `Description` is a short description of the response.
-   * GFM syntax can be used for rich text representation.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCHEMA_FIELD_NUMBER = 2; - private grpc.gateway.protoc_gen_openapiv2.options.Schema schema_; - /** - *
-   * `Schema` optionally defines the structure of the response.
-   * If `Schema` is not provided, it means there is no content to the response.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - * @return Whether the schema field is set. - */ - @java.lang.Override - public boolean hasSchema() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `Schema` optionally defines the structure of the response.
-   * If `Schema` is not provided, it means there is no content to the response.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - * @return The schema. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema() { - return schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; - } - /** - *
-   * `Schema` optionally defines the structure of the response.
-   * If `Schema` is not provided, it means there is no content to the response.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder() { - return schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; - } - - public static final int HEADERS_FIELD_NUMBER = 3; - private static final class HeadersDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Header> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Header> headers_; - private com.google.protobuf.MapField - internalGetHeaders() { - if (headers_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HeadersDefaultEntryHolder.defaultEntry); - } - return headers_; - } - public int getHeadersCount() { - return internalGetHeaders().getMap().size(); - } - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - @java.lang.Override - public boolean containsHeaders( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetHeaders().getMap().containsKey(key); - } - /** - * Use {@link #getHeadersMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getHeaders() { - return getHeadersMap(); - } - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - @java.lang.Override - public java.util.Map getHeadersMap() { - return internalGetHeaders().getMap(); - } - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeaders().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeaders().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int EXAMPLES_FIELD_NUMBER = 4; - private static final class ExamplesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> examples_; - private com.google.protobuf.MapField - internalGetExamples() { - if (examples_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExamplesDefaultEntryHolder.defaultEntry); - } - return examples_; - } - public int getExamplesCount() { - return internalGetExamples().getMap().size(); - } - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - @java.lang.Override - public boolean containsExamples( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExamples().getMap().containsKey(key); - } - /** - * Use {@link #getExamplesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExamples() { - return getExamplesMap(); - } - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - @java.lang.Override - public java.util.Map getExamplesMap() { - return internalGetExamples().getMap(); - } - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getExamplesOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExamples().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - @java.lang.Override - public java.lang.String getExamplesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExamples().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int EXTENSIONS_FIELD_NUMBER = 5; - private static final class ExtensionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> extensions_; - private com.google.protobuf.MapField - internalGetExtensions() { - if (extensions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExtensionsDefaultEntryHolder.defaultEntry); - } - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().getMap().size(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().getMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getSchema()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetHeaders(), - HeadersDefaultEntryHolder.defaultEntry, - 3); - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExamples(), - ExamplesDefaultEntryHolder.defaultEntry, - 4); - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExtensions(), - ExtensionsDefaultEntryHolder.defaultEntry, - 5); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSchema()); - } - for (java.util.Map.Entry entry - : internalGetHeaders().getMap().entrySet()) { - com.google.protobuf.MapEntry - headers__ = HeadersDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, headers__); - } - for (java.util.Map.Entry entry - : internalGetExamples().getMap().entrySet()) { - com.google.protobuf.MapEntry - examples__ = ExamplesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, examples__); - } - for (java.util.Map.Entry entry - : internalGetExtensions().getMap().entrySet()) { - com.google.protobuf.MapEntry - extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, extensions__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Response)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Response other = (grpc.gateway.protoc_gen_openapiv2.options.Response) obj; - - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasSchema() != other.hasSchema()) return false; - if (hasSchema()) { - if (!getSchema() - .equals(other.getSchema())) return false; - } - if (!internalGetHeaders().equals( - other.internalGetHeaders())) return false; - if (!internalGetExamples().equals( - other.internalGetExamples())) return false; - if (!internalGetExtensions().equals( - other.internalGetExtensions())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasSchema()) { - hash = (37 * hash) + SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getSchema().hashCode(); - } - if (!internalGetHeaders().getMap().isEmpty()) { - hash = (37 * hash) + HEADERS_FIELD_NUMBER; - hash = (53 * hash) + internalGetHeaders().hashCode(); - } - if (!internalGetExamples().getMap().isEmpty()) { - hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; - hash = (53 * hash) + internalGetExamples().hashCode(); - } - if (!internalGetExtensions().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtensions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Response prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Response` is a representation of OpenAPI v2 specification's Response object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Response} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Response) - grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetHeaders(); - case 4: - return internalGetExamples(); - case 5: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetMutableHeaders(); - case 4: - return internalGetMutableExamples(); - case 5: - return internalGetMutableExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Response.class, grpc.gateway.protoc_gen_openapiv2.options.Response.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSchemaFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - description_ = ""; - schema_ = null; - if (schemaBuilder_ != null) { - schemaBuilder_.dispose(); - schemaBuilder_ = null; - } - internalGetMutableHeaders().clear(); - internalGetMutableExamples().clear(); - internalGetMutableExtensions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response build() { - grpc.gateway.protoc_gen_openapiv2.options.Response result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Response result = new grpc.gateway.protoc_gen_openapiv2.options.Response(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Response result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.description_ = description_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.schema_ = schemaBuilder_ == null - ? schema_ - : schemaBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.headers_ = internalGetHeaders().build(HeadersDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.examples_ = internalGetExamples(); - result.examples_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Response)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Response other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()) return this; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasSchema()) { - mergeSchema(other.getSchema()); - } - internalGetMutableHeaders().mergeFrom( - other.internalGetHeaders()); - bitField0_ |= 0x00000004; - internalGetMutableExamples().mergeFrom( - other.internalGetExamples()); - bitField0_ |= 0x00000008; - internalGetMutableExtensions().mergeFrom( - other.internalGetExtensions()); - bitField0_ |= 0x00000010; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getSchemaFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - com.google.protobuf.MapEntry - headers__ = input.readMessage( - HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableHeaders().ensureBuilderMap().put( - headers__.getKey(), headers__.getValue()); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - com.google.protobuf.MapEntry - examples__ = input.readMessage( - ExamplesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExamples().getMutableMap().put( - examples__.getKey(), examples__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - com.google.protobuf.MapEntry - extensions__ = input.readMessage( - ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExtensions().ensureBuilderMap().put( - extensions__.getKey(), extensions__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object description_ = ""; - /** - *
-     * `Description` is a short description of the response.
-     * GFM syntax can be used for rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `Description` is a short description of the response.
-     * GFM syntax can be used for rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `Description` is a short description of the response.
-     * GFM syntax can be used for rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `Description` is a short description of the response.
-     * GFM syntax can be used for rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * `Description` is a short description of the response.
-     * GFM syntax can be used for rich text representation.
-     * 
- * - * string description = 1 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private grpc.gateway.protoc_gen_openapiv2.options.Schema schema_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Schema, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder> schemaBuilder_; - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - * @return Whether the schema field is set. - */ - public boolean hasSchema() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - * @return The schema. - */ - public grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema() { - if (schemaBuilder_ == null) { - return schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; - } else { - return schemaBuilder_.getMessage(); - } - } - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - public Builder setSchema(grpc.gateway.protoc_gen_openapiv2.options.Schema value) { - if (schemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - schema_ = value; - } else { - schemaBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - public Builder setSchema( - grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder builderForValue) { - if (schemaBuilder_ == null) { - schema_ = builderForValue.build(); - } else { - schemaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - public Builder mergeSchema(grpc.gateway.protoc_gen_openapiv2.options.Schema value) { - if (schemaBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - schema_ != null && - schema_ != grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()) { - getSchemaBuilder().mergeFrom(value); - } else { - schema_ = value; - } - } else { - schemaBuilder_.mergeFrom(value); - } - if (schema_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - public Builder clearSchema() { - bitField0_ = (bitField0_ & ~0x00000002); - schema_ = null; - if (schemaBuilder_ != null) { - schemaBuilder_.dispose(); - schemaBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder getSchemaBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getSchemaFieldBuilder().getBuilder(); - } - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder() { - if (schemaBuilder_ != null) { - return schemaBuilder_.getMessageOrBuilder(); - } else { - return schema_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; - } - } - /** - *
-     * `Schema` optionally defines the structure of the response.
-     * If `Schema` is not provided, it means there is no content to the response.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Schema, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder> - getSchemaFieldBuilder() { - if (schemaBuilder_ == null) { - schemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Schema, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder>( - getSchema(), - getParentForChildren(), - isClean()); - schema_ = null; - } - return schemaBuilder_; - } - - private static final class HeadersConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Header build(grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder val) { - if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.Header) { return (grpc.gateway.protoc_gen_openapiv2.options.Header) val; } - return ((grpc.gateway.protoc_gen_openapiv2.options.Header.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return HeadersDefaultEntryHolder.defaultEntry; - } - }; - private static final HeadersConverter headersConverter = new HeadersConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.Header, grpc.gateway.protoc_gen_openapiv2.options.Header.Builder> headers_; - private com.google.protobuf.MapFieldBuilder - internalGetHeaders() { - if (headers_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(headersConverter); - } - return headers_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableHeaders() { - if (headers_ == null) { - headers_ = new com.google.protobuf.MapFieldBuilder<>(headersConverter); - } - bitField0_ |= 0x00000004; - onChanged(); - return headers_; - } - public int getHeadersCount() { - return internalGetHeaders().ensureBuilderMap().size(); - } - /** - *
-     * `Headers` A list of headers that are sent with the response.
-     * `Header` name is expected to be a string in the canonical format of the MIME header key
-     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - @java.lang.Override - public boolean containsHeaders( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetHeaders().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getHeadersMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getHeaders() { - return getHeadersMap(); - } - /** - *
-     * `Headers` A list of headers that are sent with the response.
-     * `Header` name is expected to be a string in the canonical format of the MIME header key
-     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - @java.lang.Override - public java.util.Map getHeadersMap() { - return internalGetHeaders().getImmutableMap(); - } - /** - *
-     * `Headers` A list of headers that are sent with the response.
-     * `Header` name is expected to be a string in the canonical format of the MIME header key
-     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableHeaders().ensureBuilderMap(); - return map.containsKey(key) ? headersConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * `Headers` A list of headers that are sent with the response.
-     * `Header` name is expected to be a string in the canonical format of the MIME header key
-     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableHeaders().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return headersConverter.build(map.get(key)); - } - public Builder clearHeaders() { - bitField0_ = (bitField0_ & ~0x00000004); - internalGetMutableHeaders().clear(); - return this; - } - /** - *
-     * `Headers` A list of headers that are sent with the response.
-     * `Header` name is expected to be a string in the canonical format of the MIME header key
-     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - public Builder removeHeaders( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableHeaders().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableHeaders() { - bitField0_ |= 0x00000004; - return internalGetMutableHeaders().ensureMessageMap(); - } - /** - *
-     * `Headers` A list of headers that are sent with the response.
-     * `Header` name is expected to be a string in the canonical format of the MIME header key
-     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - public Builder putHeaders( - java.lang.String key, - grpc.gateway.protoc_gen_openapiv2.options.Header value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableHeaders().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000004; - return this; - } - /** - *
-     * `Headers` A list of headers that are sent with the response.
-     * `Header` name is expected to be a string in the canonical format of the MIME header key
-     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - public Builder putAllHeaders( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableHeaders().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000004; - return this; - } - /** - *
-     * `Headers` A list of headers that are sent with the response.
-     * `Header` name is expected to be a string in the canonical format of the MIME header key
-     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Header.Builder putHeadersBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableHeaders().ensureBuilderMap(); - grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = grpc.gateway.protoc_gen_openapiv2.options.Header.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.Header) { - entry = ((grpc.gateway.protoc_gen_openapiv2.options.Header) entry).toBuilder(); - builderMap.put(key, entry); - } - return (grpc.gateway.protoc_gen_openapiv2.options.Header.Builder) entry; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> examples_; - private com.google.protobuf.MapField - internalGetExamples() { - if (examples_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExamplesDefaultEntryHolder.defaultEntry); - } - return examples_; - } - private com.google.protobuf.MapField - internalGetMutableExamples() { - if (examples_ == null) { - examples_ = com.google.protobuf.MapField.newMapField( - ExamplesDefaultEntryHolder.defaultEntry); - } - if (!examples_.isMutable()) { - examples_ = examples_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return examples_; - } - public int getExamplesCount() { - return internalGetExamples().getMap().size(); - } - /** - *
-     * `Examples` gives per-mimetype response examples.
-     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-     * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - @java.lang.Override - public boolean containsExamples( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExamples().getMap().containsKey(key); - } - /** - * Use {@link #getExamplesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExamples() { - return getExamplesMap(); - } - /** - *
-     * `Examples` gives per-mimetype response examples.
-     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-     * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - @java.lang.Override - public java.util.Map getExamplesMap() { - return internalGetExamples().getMap(); - } - /** - *
-     * `Examples` gives per-mimetype response examples.
-     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-     * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getExamplesOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExamples().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * `Examples` gives per-mimetype response examples.
-     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-     * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - @java.lang.Override - public java.lang.String getExamplesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExamples().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearExamples() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableExamples().getMutableMap() - .clear(); - return this; - } - /** - *
-     * `Examples` gives per-mimetype response examples.
-     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-     * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - public Builder removeExamples( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExamples().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExamples() { - bitField0_ |= 0x00000008; - return internalGetMutableExamples().getMutableMap(); - } - /** - *
-     * `Examples` gives per-mimetype response examples.
-     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-     * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - public Builder putExamples( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableExamples().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000008; - return this; - } - /** - *
-     * `Examples` gives per-mimetype response examples.
-     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-     * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - public Builder putAllExamples( - java.util.Map values) { - internalGetMutableExamples().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000008; - return this; - } - - private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ExtensionsDefaultEntryHolder.defaultEntry; - } - }; - private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; - private com.google.protobuf.MapFieldBuilder - internalGetExtensions() { - if (extensions_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - return extensions_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableExtensions() { - if (extensions_ == null) { - extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - bitField0_ |= 0x00000010; - onChanged(); - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().ensureBuilderMap().size(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getImmutableMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return extensionsConverter.build(map.get(key)); - } - public Builder clearExtensions() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableExtensions().clear(); - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - public Builder removeExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtensions().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExtensions() { - bitField0_ |= 0x00000010; - return internalGetMutableExtensions().ensureMessageMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - public Builder putExtensions( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableExtensions().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000010; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - public Builder putAllExtensions( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableExtensions().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000010; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Response) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Response) - private static final grpc.gateway.protoc_gen_openapiv2.options.Response DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Response(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Response parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java deleted file mode 100644 index 9b36a101..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java +++ /dev/null @@ -1,249 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface ResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Response) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `Description` is a short description of the response.
-   * GFM syntax can be used for rich text representation.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * `Description` is a short description of the response.
-   * GFM syntax can be used for rich text representation.
-   * 
- * - * string description = 1 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * `Schema` optionally defines the structure of the response.
-   * If `Schema` is not provided, it means there is no content to the response.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - * @return Whether the schema field is set. - */ - boolean hasSchema(); - /** - *
-   * `Schema` optionally defines the structure of the response.
-   * If `Schema` is not provided, it means there is no content to the response.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - * @return The schema. - */ - grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema(); - /** - *
-   * `Schema` optionally defines the structure of the response.
-   * If `Schema` is not provided, it means there is no content to the response.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder(); - - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - int getHeadersCount(); - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - boolean containsHeaders( - java.lang.String key); - /** - * Use {@link #getHeadersMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getHeaders(); - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - java.util.Map - getHeadersMap(); - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue); - /** - *
-   * `Headers` A list of headers that are sent with the response.
-   * `Header` name is expected to be a string in the canonical format of the MIME header key
-   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( - java.lang.String key); - - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - int getExamplesCount(); - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - boolean containsExamples( - java.lang.String key); - /** - * Use {@link #getExamplesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExamples(); - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - java.util.Map - getExamplesMap(); - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - /* nullable */ -java.lang.String getExamplesOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * `Examples` gives per-mimetype response examples.
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
-   * 
- * - * map<string, string> examples = 4 [json_name = "examples"]; - */ - java.lang.String getExamplesOrThrow( - java.lang.String key); - - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - int getExtensionsCount(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - boolean containsExtensions( - java.lang.String key); - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExtensions(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - java.util.Map - getExtensionsMap(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; - */ - com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Schema.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Schema.java deleted file mode 100644 index 20ebb4b5..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Schema.java +++ /dev/null @@ -1,1306 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Schema` is a representation of OpenAPI v2 specification's Schema object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Schema} - */ -public final class Schema extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Schema) - SchemaOrBuilder { -private static final long serialVersionUID = 0L; - // Use Schema.newBuilder() to construct. - private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Schema() { - discriminator_ = ""; - example_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Schema(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Schema.class, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder.class); - } - - private int bitField0_; - public static final int JSON_SCHEMA_FIELD_NUMBER = 1; - private grpc.gateway.protoc_gen_openapiv2.options.JSONSchema jsonSchema_; - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - * @return Whether the jsonSchema field is set. - */ - @java.lang.Override - public boolean hasJsonSchema() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - * @return The jsonSchema. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema() { - return jsonSchema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder() { - return jsonSchema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; - } - - public static final int DISCRIMINATOR_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object discriminator_ = ""; - /** - *
-   * Adds support for polymorphism. The discriminator is the schema property
-   * name that is used to differentiate between other schema that inherit this
-   * schema. The property name used MUST be defined at this schema and it MUST
-   * be in the required property list. When used, the value MUST be the name of
-   * this schema or any schema that inherits it.
-   * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @return The discriminator. - */ - @java.lang.Override - public java.lang.String getDiscriminator() { - java.lang.Object ref = discriminator_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discriminator_ = s; - return s; - } - } - /** - *
-   * Adds support for polymorphism. The discriminator is the schema property
-   * name that is used to differentiate between other schema that inherit this
-   * schema. The property name used MUST be defined at this schema and it MUST
-   * be in the required property list. When used, the value MUST be the name of
-   * this schema or any schema that inherits it.
-   * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @return The bytes for discriminator. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscriminatorBytes() { - java.lang.Object ref = discriminator_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discriminator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_ONLY_FIELD_NUMBER = 3; - private boolean readOnly_ = false; - /** - *
-   * Relevant only for Schema "properties" definitions. Declares the property as
-   * "read only". This means that it MAY be sent as part of a response but MUST
-   * NOT be sent as part of the request. Properties marked as readOnly being
-   * true SHOULD NOT be in the required list of the defined schema. Default
-   * value is false.
-   * 
- * - * bool read_only = 3 [json_name = "readOnly"]; - * @return The readOnly. - */ - @java.lang.Override - public boolean getReadOnly() { - return readOnly_; - } - - public static final int EXTERNAL_DOCS_FIELD_NUMBER = 5; - private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; - /** - *
-   * Additional external documentation for this schema.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - @java.lang.Override - public boolean hasExternalDocs() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Additional external documentation for this schema.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - /** - *
-   * Additional external documentation for this schema.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - - public static final int EXAMPLE_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object example_ = ""; - /** - *
-   * A free-form property to include an example of an instance for this schema in JSON.
-   * This is copied verbatim to the output.
-   * 
- * - * string example = 6 [json_name = "example"]; - * @return The example. - */ - @java.lang.Override - public java.lang.String getExample() { - java.lang.Object ref = example_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - example_ = s; - return s; - } - } - /** - *
-   * A free-form property to include an example of an instance for this schema in JSON.
-   * This is copied verbatim to the output.
-   * 
- * - * string example = 6 [json_name = "example"]; - * @return The bytes for example. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExampleBytes() { - java.lang.Object ref = example_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - example_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getJsonSchema()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discriminator_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discriminator_); - } - if (readOnly_ != false) { - output.writeBool(3, readOnly_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(5, getExternalDocs()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(example_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, example_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getJsonSchema()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discriminator_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discriminator_); - } - if (readOnly_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, readOnly_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getExternalDocs()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(example_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, example_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Schema)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Schema other = (grpc.gateway.protoc_gen_openapiv2.options.Schema) obj; - - if (hasJsonSchema() != other.hasJsonSchema()) return false; - if (hasJsonSchema()) { - if (!getJsonSchema() - .equals(other.getJsonSchema())) return false; - } - if (!getDiscriminator() - .equals(other.getDiscriminator())) return false; - if (getReadOnly() - != other.getReadOnly()) return false; - if (hasExternalDocs() != other.hasExternalDocs()) return false; - if (hasExternalDocs()) { - if (!getExternalDocs() - .equals(other.getExternalDocs())) return false; - } - if (!getExample() - .equals(other.getExample())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasJsonSchema()) { - hash = (37 * hash) + JSON_SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getJsonSchema().hashCode(); - } - hash = (37 * hash) + DISCRIMINATOR_FIELD_NUMBER; - hash = (53 * hash) + getDiscriminator().hashCode(); - hash = (37 * hash) + READ_ONLY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReadOnly()); - if (hasExternalDocs()) { - hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; - hash = (53 * hash) + getExternalDocs().hashCode(); - } - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExample().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Schema prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Schema` is a representation of OpenAPI v2 specification's Schema object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Schema} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Schema) - grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Schema.class, grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Schema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getJsonSchemaFieldBuilder(); - getExternalDocsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - jsonSchema_ = null; - if (jsonSchemaBuilder_ != null) { - jsonSchemaBuilder_.dispose(); - jsonSchemaBuilder_ = null; - } - discriminator_ = ""; - readOnly_ = false; - externalDocs_ = null; - if (externalDocsBuilder_ != null) { - externalDocsBuilder_.dispose(); - externalDocsBuilder_ = null; - } - example_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Schema build() { - grpc.gateway.protoc_gen_openapiv2.options.Schema result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Schema buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Schema result = new grpc.gateway.protoc_gen_openapiv2.options.Schema(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Schema result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.jsonSchema_ = jsonSchemaBuilder_ == null - ? jsonSchema_ - : jsonSchemaBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.discriminator_ = discriminator_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.readOnly_ = readOnly_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.externalDocs_ = externalDocsBuilder_ == null - ? externalDocs_ - : externalDocsBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Schema) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Schema)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Schema other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()) return this; - if (other.hasJsonSchema()) { - mergeJsonSchema(other.getJsonSchema()); - } - if (!other.getDiscriminator().isEmpty()) { - discriminator_ = other.discriminator_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getReadOnly() != false) { - setReadOnly(other.getReadOnly()); - } - if (other.hasExternalDocs()) { - mergeExternalDocs(other.getExternalDocs()); - } - if (!other.getExample().isEmpty()) { - example_ = other.example_; - bitField0_ |= 0x00000010; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getJsonSchemaFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - discriminator_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - readOnly_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 42: { - input.readMessage( - getExternalDocsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 42 - case 50: { - example_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private grpc.gateway.protoc_gen_openapiv2.options.JSONSchema jsonSchema_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder> jsonSchemaBuilder_; - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - * @return Whether the jsonSchema field is set. - */ - public boolean hasJsonSchema() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - * @return The jsonSchema. - */ - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema() { - if (jsonSchemaBuilder_ == null) { - return jsonSchema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; - } else { - return jsonSchemaBuilder_.getMessage(); - } - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - public Builder setJsonSchema(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema value) { - if (jsonSchemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jsonSchema_ = value; - } else { - jsonSchemaBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - public Builder setJsonSchema( - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder builderForValue) { - if (jsonSchemaBuilder_ == null) { - jsonSchema_ = builderForValue.build(); - } else { - jsonSchemaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - public Builder mergeJsonSchema(grpc.gateway.protoc_gen_openapiv2.options.JSONSchema value) { - if (jsonSchemaBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - jsonSchema_ != null && - jsonSchema_ != grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()) { - getJsonSchemaBuilder().mergeFrom(value); - } else { - jsonSchema_ = value; - } - } else { - jsonSchemaBuilder_.mergeFrom(value); - } - if (jsonSchema_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - public Builder clearJsonSchema() { - bitField0_ = (bitField0_ & ~0x00000001); - jsonSchema_ = null; - if (jsonSchemaBuilder_ != null) { - jsonSchemaBuilder_.dispose(); - jsonSchemaBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder getJsonSchemaBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getJsonSchemaFieldBuilder().getBuilder(); - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder() { - if (jsonSchemaBuilder_ != null) { - return jsonSchemaBuilder_.getMessageOrBuilder(); - } else { - return jsonSchema_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; - } - } - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder> - getJsonSchemaFieldBuilder() { - if (jsonSchemaBuilder_ == null) { - jsonSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder>( - getJsonSchema(), - getParentForChildren(), - isClean()); - jsonSchema_ = null; - } - return jsonSchemaBuilder_; - } - - private java.lang.Object discriminator_ = ""; - /** - *
-     * Adds support for polymorphism. The discriminator is the schema property
-     * name that is used to differentiate between other schema that inherit this
-     * schema. The property name used MUST be defined at this schema and it MUST
-     * be in the required property list. When used, the value MUST be the name of
-     * this schema or any schema that inherits it.
-     * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @return The discriminator. - */ - public java.lang.String getDiscriminator() { - java.lang.Object ref = discriminator_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discriminator_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Adds support for polymorphism. The discriminator is the schema property
-     * name that is used to differentiate between other schema that inherit this
-     * schema. The property name used MUST be defined at this schema and it MUST
-     * be in the required property list. When used, the value MUST be the name of
-     * this schema or any schema that inherits it.
-     * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @return The bytes for discriminator. - */ - public com.google.protobuf.ByteString - getDiscriminatorBytes() { - java.lang.Object ref = discriminator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discriminator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Adds support for polymorphism. The discriminator is the schema property
-     * name that is used to differentiate between other schema that inherit this
-     * schema. The property name used MUST be defined at this schema and it MUST
-     * be in the required property list. When used, the value MUST be the name of
-     * this schema or any schema that inherits it.
-     * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @param value The discriminator to set. - * @return This builder for chaining. - */ - public Builder setDiscriminator( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - discriminator_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Adds support for polymorphism. The discriminator is the schema property
-     * name that is used to differentiate between other schema that inherit this
-     * schema. The property name used MUST be defined at this schema and it MUST
-     * be in the required property list. When used, the value MUST be the name of
-     * this schema or any schema that inherits it.
-     * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @return This builder for chaining. - */ - public Builder clearDiscriminator() { - discriminator_ = getDefaultInstance().getDiscriminator(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Adds support for polymorphism. The discriminator is the schema property
-     * name that is used to differentiate between other schema that inherit this
-     * schema. The property name used MUST be defined at this schema and it MUST
-     * be in the required property list. When used, the value MUST be the name of
-     * this schema or any schema that inherits it.
-     * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @param value The bytes for discriminator to set. - * @return This builder for chaining. - */ - public Builder setDiscriminatorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - discriminator_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private boolean readOnly_ ; - /** - *
-     * Relevant only for Schema "properties" definitions. Declares the property as
-     * "read only". This means that it MAY be sent as part of a response but MUST
-     * NOT be sent as part of the request. Properties marked as readOnly being
-     * true SHOULD NOT be in the required list of the defined schema. Default
-     * value is false.
-     * 
- * - * bool read_only = 3 [json_name = "readOnly"]; - * @return The readOnly. - */ - @java.lang.Override - public boolean getReadOnly() { - return readOnly_; - } - /** - *
-     * Relevant only for Schema "properties" definitions. Declares the property as
-     * "read only". This means that it MAY be sent as part of a response but MUST
-     * NOT be sent as part of the request. Properties marked as readOnly being
-     * true SHOULD NOT be in the required list of the defined schema. Default
-     * value is false.
-     * 
- * - * bool read_only = 3 [json_name = "readOnly"]; - * @param value The readOnly to set. - * @return This builder for chaining. - */ - public Builder setReadOnly(boolean value) { - - readOnly_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Relevant only for Schema "properties" definitions. Declares the property as
-     * "read only". This means that it MAY be sent as part of a response but MUST
-     * NOT be sent as part of the request. Properties marked as readOnly being
-     * true SHOULD NOT be in the required list of the defined schema. Default
-     * value is false.
-     * 
- * - * bool read_only = 3 [json_name = "readOnly"]; - * @return This builder for chaining. - */ - public Builder clearReadOnly() { - bitField0_ = (bitField0_ & ~0x00000004); - readOnly_ = false; - onChanged(); - return this; - } - - private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - public boolean hasExternalDocs() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { - if (externalDocsBuilder_ == null) { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } else { - return externalDocsBuilder_.getMessage(); - } - } - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { - if (externalDocsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - externalDocs_ = value; - } else { - externalDocsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - public Builder setExternalDocs( - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { - if (externalDocsBuilder_ == null) { - externalDocs_ = builderForValue.build(); - } else { - externalDocsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { - if (externalDocsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - externalDocs_ != null && - externalDocs_ != grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { - getExternalDocsBuilder().mergeFrom(value); - } else { - externalDocs_ = value; - } - } else { - externalDocsBuilder_.mergeFrom(value); - } - if (externalDocs_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - public Builder clearExternalDocs() { - bitField0_ = (bitField0_ & ~0x00000008); - externalDocs_ = null; - if (externalDocsBuilder_ != null) { - externalDocsBuilder_.dispose(); - externalDocsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getExternalDocsFieldBuilder().getBuilder(); - } - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { - if (externalDocsBuilder_ != null) { - return externalDocsBuilder_.getMessageOrBuilder(); - } else { - return externalDocs_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - } - /** - *
-     * Additional external documentation for this schema.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> - getExternalDocsFieldBuilder() { - if (externalDocsBuilder_ == null) { - externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( - getExternalDocs(), - getParentForChildren(), - isClean()); - externalDocs_ = null; - } - return externalDocsBuilder_; - } - - private java.lang.Object example_ = ""; - /** - *
-     * A free-form property to include an example of an instance for this schema in JSON.
-     * This is copied verbatim to the output.
-     * 
- * - * string example = 6 [json_name = "example"]; - * @return The example. - */ - public java.lang.String getExample() { - java.lang.Object ref = example_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - example_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A free-form property to include an example of an instance for this schema in JSON.
-     * This is copied verbatim to the output.
-     * 
- * - * string example = 6 [json_name = "example"]; - * @return The bytes for example. - */ - public com.google.protobuf.ByteString - getExampleBytes() { - java.lang.Object ref = example_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - example_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A free-form property to include an example of an instance for this schema in JSON.
-     * This is copied verbatim to the output.
-     * 
- * - * string example = 6 [json_name = "example"]; - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - example_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * A free-form property to include an example of an instance for this schema in JSON.
-     * This is copied verbatim to the output.
-     * 
- * - * string example = 6 [json_name = "example"]; - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = getDefaultInstance().getExample(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * A free-form property to include an example of an instance for this schema in JSON.
-     * This is copied verbatim to the output.
-     * 
- * - * string example = 6 [json_name = "example"]; - * @param value The bytes for example to set. - * @return This builder for chaining. - */ - public Builder setExampleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - example_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Schema) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Schema) - private static final grpc.gateway.protoc_gen_openapiv2.options.Schema DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Schema(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Schema parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java deleted file mode 100644 index ce8d35c8..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java +++ /dev/null @@ -1,116 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface SchemaOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Schema) - com.google.protobuf.MessageOrBuilder { - - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - * @return Whether the jsonSchema field is set. - */ - boolean hasJsonSchema(); - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - * @return The jsonSchema. - */ - grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema(); - /** - * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder(); - - /** - *
-   * Adds support for polymorphism. The discriminator is the schema property
-   * name that is used to differentiate between other schema that inherit this
-   * schema. The property name used MUST be defined at this schema and it MUST
-   * be in the required property list. When used, the value MUST be the name of
-   * this schema or any schema that inherits it.
-   * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @return The discriminator. - */ - java.lang.String getDiscriminator(); - /** - *
-   * Adds support for polymorphism. The discriminator is the schema property
-   * name that is used to differentiate between other schema that inherit this
-   * schema. The property name used MUST be defined at this schema and it MUST
-   * be in the required property list. When used, the value MUST be the name of
-   * this schema or any schema that inherits it.
-   * 
- * - * string discriminator = 2 [json_name = "discriminator"]; - * @return The bytes for discriminator. - */ - com.google.protobuf.ByteString - getDiscriminatorBytes(); - - /** - *
-   * Relevant only for Schema "properties" definitions. Declares the property as
-   * "read only". This means that it MAY be sent as part of a response but MUST
-   * NOT be sent as part of the request. Properties marked as readOnly being
-   * true SHOULD NOT be in the required list of the defined schema. Default
-   * value is false.
-   * 
- * - * bool read_only = 3 [json_name = "readOnly"]; - * @return The readOnly. - */ - boolean getReadOnly(); - - /** - *
-   * Additional external documentation for this schema.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - boolean hasExternalDocs(); - /** - *
-   * Additional external documentation for this schema.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); - /** - *
-   * Additional external documentation for this schema.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); - - /** - *
-   * A free-form property to include an example of an instance for this schema in JSON.
-   * This is copied verbatim to the output.
-   * 
- * - * string example = 6 [json_name = "example"]; - * @return The example. - */ - java.lang.String getExample(); - /** - *
-   * A free-form property to include an example of an instance for this schema in JSON.
-   * This is copied verbatim to the output.
-   * 
- * - * string example = 6 [json_name = "example"]; - * @return The bytes for example. - */ - com.google.protobuf.ByteString - getExampleBytes(); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java deleted file mode 100644 index e47f0c06..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * Scheme describes the schemes supported by the OpenAPI Swagger
- * and Operation objects.
- * 
- * - * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.Scheme} - */ -public enum Scheme - implements com.google.protobuf.ProtocolMessageEnum { - /** - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * HTTP = 1; - */ - HTTP(1), - /** - * HTTPS = 2; - */ - HTTPS(2), - /** - * WS = 3; - */ - WS(3), - /** - * WSS = 4; - */ - WSS(4), - UNRECOGNIZED(-1), - ; - - /** - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - * HTTP = 1; - */ - public static final int HTTP_VALUE = 1; - /** - * HTTPS = 2; - */ - public static final int HTTPS_VALUE = 2; - /** - * WS = 3; - */ - public static final int WS_VALUE = 3; - /** - * WSS = 4; - */ - public static final int WSS_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Scheme valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Scheme forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return HTTP; - case 2: return HTTPS; - case 3: return WS; - case 4: return WSS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Scheme> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Scheme findValueByNumber(int number) { - return Scheme.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor().getEnumTypes().get(0); - } - - private static final Scheme[] VALUES = values(); - - public static Scheme valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Scheme(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.Scheme) -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java deleted file mode 100644 index 4136ec14..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java +++ /dev/null @@ -1,756 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
- *
- * Lists the available scopes for an OAuth2 security scheme.
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Scopes} - */ -public final class Scopes extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Scopes) - ScopesOrBuilder { -private static final long serialVersionUID = 0L; - // Use Scopes.newBuilder() to construct. - private Scopes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Scopes() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Scopes(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetScope(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Scopes.class, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder.class); - } - - public static final int SCOPE_FIELD_NUMBER = 1; - private static final class ScopeDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> scope_; - private com.google.protobuf.MapField - internalGetScope() { - if (scope_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ScopeDefaultEntryHolder.defaultEntry); - } - return scope_; - } - public int getScopeCount() { - return internalGetScope().getMap().size(); - } - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - @java.lang.Override - public boolean containsScope( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetScope().getMap().containsKey(key); - } - /** - * Use {@link #getScopeMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getScope() { - return getScopeMap(); - } - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - @java.lang.Override - public java.util.Map getScopeMap() { - return internalGetScope().getMap(); - } - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getScopeOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetScope().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - @java.lang.Override - public java.lang.String getScopeOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetScope().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetScope(), - ScopeDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetScope().getMap().entrySet()) { - com.google.protobuf.MapEntry - scope__ = ScopeDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, scope__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Scopes)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Scopes other = (grpc.gateway.protoc_gen_openapiv2.options.Scopes) obj; - - if (!internalGetScope().equals( - other.internalGetScope())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetScope().getMap().isEmpty()) { - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + internalGetScope().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Scopes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
-   *
-   * Lists the available scopes for an OAuth2 security scheme.
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Scopes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Scopes) - grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetScope(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableScope(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Scopes.class, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Scopes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableScope().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Scopes build() { - grpc.gateway.protoc_gen_openapiv2.options.Scopes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Scopes buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Scopes result = new grpc.gateway.protoc_gen_openapiv2.options.Scopes(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Scopes result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.scope_ = internalGetScope(); - result.scope_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Scopes) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Scopes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Scopes other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance()) return this; - internalGetMutableScope().mergeFrom( - other.internalGetScope()); - bitField0_ |= 0x00000001; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.MapEntry - scope__ = input.readMessage( - ScopeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableScope().getMutableMap().put( - scope__.getKey(), scope__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> scope_; - private com.google.protobuf.MapField - internalGetScope() { - if (scope_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ScopeDefaultEntryHolder.defaultEntry); - } - return scope_; - } - private com.google.protobuf.MapField - internalGetMutableScope() { - if (scope_ == null) { - scope_ = com.google.protobuf.MapField.newMapField( - ScopeDefaultEntryHolder.defaultEntry); - } - if (!scope_.isMutable()) { - scope_ = scope_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return scope_; - } - public int getScopeCount() { - return internalGetScope().getMap().size(); - } - /** - *
-     * Maps between a name of a scope to a short description of it (as the value
-     * of the property).
-     * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - @java.lang.Override - public boolean containsScope( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetScope().getMap().containsKey(key); - } - /** - * Use {@link #getScopeMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getScope() { - return getScopeMap(); - } - /** - *
-     * Maps between a name of a scope to a short description of it (as the value
-     * of the property).
-     * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - @java.lang.Override - public java.util.Map getScopeMap() { - return internalGetScope().getMap(); - } - /** - *
-     * Maps between a name of a scope to a short description of it (as the value
-     * of the property).
-     * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getScopeOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetScope().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Maps between a name of a scope to a short description of it (as the value
-     * of the property).
-     * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - @java.lang.Override - public java.lang.String getScopeOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetScope().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearScope() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableScope().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Maps between a name of a scope to a short description of it (as the value
-     * of the property).
-     * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - public Builder removeScope( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableScope().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableScope() { - bitField0_ |= 0x00000001; - return internalGetMutableScope().getMutableMap(); - } - /** - *
-     * Maps between a name of a scope to a short description of it (as the value
-     * of the property).
-     * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - public Builder putScope( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableScope().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - *
-     * Maps between a name of a scope to a short description of it (as the value
-     * of the property).
-     * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - public Builder putAllScope( - java.util.Map values) { - internalGetMutableScope().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Scopes) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Scopes) - private static final grpc.gateway.protoc_gen_openapiv2.options.Scopes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Scopes(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Scopes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java deleted file mode 100644 index 5b65104d..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface ScopesOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Scopes) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - int getScopeCount(); - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - boolean containsScope( - java.lang.String key); - /** - * Use {@link #getScopeMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getScope(); - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - java.util.Map - getScopeMap(); - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - /* nullable */ -java.lang.String getScopeOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Maps between a name of a scope to a short description of it (as the value
-   * of the property).
-   * 
- * - * map<string, string> scope = 1 [json_name = "scope"]; - */ - java.lang.String getScopeOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java deleted file mode 100644 index fdb029e0..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java +++ /dev/null @@ -1,794 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `SecurityDefinitions` is a representation of OpenAPI v2 specification's
- * Security Definitions object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
- *
- * A declaration of the security schemes available to be used in the
- * specification. This does not enforce the security schemes on the operations
- * and only serves to provide the relevant details for each scheme.
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} - */ -public final class SecurityDefinitions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) - SecurityDefinitionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use SecurityDefinitions.newBuilder() to construct. - private SecurityDefinitions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SecurityDefinitions() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SecurityDefinitions(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetSecurity(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder.class); - } - - public static final int SECURITY_FIELD_NUMBER = 1; - private static final class SecurityDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security_; - private com.google.protobuf.MapField - internalGetSecurity() { - if (security_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SecurityDefaultEntryHolder.defaultEntry); - } - return security_; - } - public int getSecurityCount() { - return internalGetSecurity().getMap().size(); - } - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - @java.lang.Override - public boolean containsSecurity( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetSecurity().getMap().containsKey(key); - } - /** - * Use {@link #getSecurityMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSecurity() { - return getSecurityMap(); - } - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - @java.lang.Override - public java.util.Map getSecurityMap() { - return internalGetSecurity().getMap(); - } - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetSecurity().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetSecurity().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetSecurity(), - SecurityDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetSecurity().getMap().entrySet()) { - com.google.protobuf.MapEntry - security__ = SecurityDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, security__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions other = (grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) obj; - - if (!internalGetSecurity().equals( - other.internalGetSecurity())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetSecurity().getMap().isEmpty()) { - hash = (37 * hash) + SECURITY_FIELD_NUMBER; - hash = (53 * hash) + internalGetSecurity().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `SecurityDefinitions` is a representation of OpenAPI v2 specification's
-   * Security Definitions object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
-   *
-   * A declaration of the security schemes available to be used in the
-   * specification. This does not enforce the security schemes on the operations
-   * and only serves to provide the relevant details for each scheme.
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetSecurity(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableSecurity(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableSecurity().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions build() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result = new grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.security_ = internalGetSecurity().build(SecurityDefaultEntryHolder.defaultEntry); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance()) return this; - internalGetMutableSecurity().mergeFrom( - other.internalGetSecurity()); - bitField0_ |= 0x00000001; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.MapEntry - security__ = input.readMessage( - SecurityDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableSecurity().ensureBuilderMap().put( - security__.getKey(), security__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private static final class SecurityConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme build(grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder val) { - if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { return (grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) val; } - return ((grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return SecurityDefaultEntryHolder.defaultEntry; - } - }; - private static final SecurityConverter securityConverter = new SecurityConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder> security_; - private com.google.protobuf.MapFieldBuilder - internalGetSecurity() { - if (security_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(securityConverter); - } - return security_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableSecurity() { - if (security_ == null) { - security_ = new com.google.protobuf.MapFieldBuilder<>(securityConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return security_; - } - public int getSecurityCount() { - return internalGetSecurity().ensureBuilderMap().size(); - } - /** - *
-     * A single security scheme definition, mapping a "name" to the scheme it
-     * defines.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - @java.lang.Override - public boolean containsSecurity( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetSecurity().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getSecurityMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSecurity() { - return getSecurityMap(); - } - /** - *
-     * A single security scheme definition, mapping a "name" to the scheme it
-     * defines.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - @java.lang.Override - public java.util.Map getSecurityMap() { - return internalGetSecurity().getImmutableMap(); - } - /** - *
-     * A single security scheme definition, mapping a "name" to the scheme it
-     * defines.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableSecurity().ensureBuilderMap(); - return map.containsKey(key) ? securityConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * A single security scheme definition, mapping a "name" to the scheme it
-     * defines.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableSecurity().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return securityConverter.build(map.get(key)); - } - public Builder clearSecurity() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableSecurity().clear(); - return this; - } - /** - *
-     * A single security scheme definition, mapping a "name" to the scheme it
-     * defines.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - public Builder removeSecurity( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableSecurity().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableSecurity() { - bitField0_ |= 0x00000001; - return internalGetMutableSecurity().ensureMessageMap(); - } - /** - *
-     * A single security scheme definition, mapping a "name" to the scheme it
-     * defines.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - public Builder putSecurity( - java.lang.String key, - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableSecurity().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - *
-     * A single security scheme definition, mapping a "name" to the scheme it
-     * defines.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - public Builder putAllSecurity( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableSecurity().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - *
-     * A single security scheme definition, mapping a "name" to the scheme it
-     * defines.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder putSecurityBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableSecurity().ensureBuilderMap(); - grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { - entry = ((grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) entry).toBuilder(); - builderMap.put(key, entry); - } - return (grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) - private static final grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SecurityDefinitions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java deleted file mode 100644 index b454ca55..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface SecurityDefinitionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - int getSecurityCount(); - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - boolean containsSecurity( - java.lang.String key); - /** - * Use {@link #getSecurityMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getSecurity(); - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - java.util.Map - getSecurityMap(); - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue); - /** - *
-   * A single security scheme definition, mapping a "name" to the scheme it
-   * defines.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java deleted file mode 100644 index e7a9ccb3..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java +++ /dev/null @@ -1,1454 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `SecurityRequirement` is a representation of OpenAPI v2 specification's
- * Security Requirement object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
- *
- * Lists the required security schemes to execute this operation. The object can
- * have multiple security schemes declared in it which are all required (that
- * is, there is a logical AND between the schemes).
- *
- * The name used for each property MUST correspond to a security scheme
- * declared in the Security Definitions.
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} - */ -public final class SecurityRequirement extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) - SecurityRequirementOrBuilder { -private static final long serialVersionUID = 0L; - // Use SecurityRequirement.newBuilder() to construct. - private SecurityRequirement(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SecurityRequirement() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SecurityRequirement(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetSecurityRequirement(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder.class); - } - - public interface SecurityRequirementValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string scope = 1 [json_name = "scope"]; - * @return A list containing the scope. - */ - java.util.List - getScopeList(); - /** - * repeated string scope = 1 [json_name = "scope"]; - * @return The count of scope. - */ - int getScopeCount(); - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param index The index of the element to return. - * @return The scope at the given index. - */ - java.lang.String getScope(int index); - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param index The index of the value to return. - * @return The bytes of the scope at the given index. - */ - com.google.protobuf.ByteString - getScopeBytes(int index); - } - /** - *
-   * If the security scheme is of type "oauth2", then the value is a list of
-   * scope names required for the execution. For other security scheme types,
-   * the array MUST be empty.
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} - */ - public static final class SecurityRequirementValue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) - SecurityRequirementValueOrBuilder { - private static final long serialVersionUID = 0L; - // Use SecurityRequirementValue.newBuilder() to construct. - private SecurityRequirementValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SecurityRequirementValue() { - scope_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SecurityRequirementValue(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder.class); - } - - public static final int SCOPE_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList scope_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string scope = 1 [json_name = "scope"]; - * @return A list containing the scope. - */ - public com.google.protobuf.ProtocolStringList - getScopeList() { - return scope_; - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @return The count of scope. - */ - public int getScopeCount() { - return scope_.size(); - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param index The index of the element to return. - * @return The scope at the given index. - */ - public java.lang.String getScope(int index) { - return scope_.get(index); - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param index The index of the value to return. - * @return The bytes of the scope at the given index. - */ - public com.google.protobuf.ByteString - getScopeBytes(int index) { - return scope_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < scope_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < scope_.size(); i++) { - dataSize += computeStringSizeNoTag(scope_.getRaw(i)); - } - size += dataSize; - size += 1 * getScopeList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue other = (grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) obj; - - if (!getScopeList() - .equals(other.getScopeList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getScopeCount() > 0) { - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + getScopeList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * If the security scheme is of type "oauth2", then the value is a list of
-     * scope names required for the execution. For other security scheme types,
-     * the array MUST be empty.
-     * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - scope_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue build() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result = new grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - scope_.makeImmutable(); - result.scope_ = scope_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance()) return this; - if (!other.scope_.isEmpty()) { - if (scope_.isEmpty()) { - scope_ = other.scope_; - bitField0_ |= 0x00000001; - } else { - ensureScopeIsMutable(); - scope_.addAll(other.scope_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureScopeIsMutable(); - scope_.add(s); - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringArrayList scope_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureScopeIsMutable() { - if (!scope_.isModifiable()) { - scope_ = new com.google.protobuf.LazyStringArrayList(scope_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @return A list containing the scope. - */ - public com.google.protobuf.ProtocolStringList - getScopeList() { - scope_.makeImmutable(); - return scope_; - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @return The count of scope. - */ - public int getScopeCount() { - return scope_.size(); - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param index The index of the element to return. - * @return The scope at the given index. - */ - public java.lang.String getScope(int index) { - return scope_.get(index); - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param index The index of the value to return. - * @return The bytes of the scope at the given index. - */ - public com.google.protobuf.ByteString - getScopeBytes(int index) { - return scope_.getByteString(index); - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param index The index to set the value at. - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureScopeIsMutable(); - scope_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param value The scope to add. - * @return This builder for chaining. - */ - public Builder addScope( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureScopeIsMutable(); - scope_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param values The scope to add. - * @return This builder for chaining. - */ - public Builder addAllScope( - java.lang.Iterable values) { - ensureScopeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, scope_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @return This builder for chaining. - */ - public Builder clearScope() { - scope_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string scope = 1 [json_name = "scope"]; - * @param value The bytes of the scope to add. - * @return This builder for chaining. - */ - public Builder addScopeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureScopeIsMutable(); - scope_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) - private static final grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SecurityRequirementValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int SECURITY_REQUIREMENT_FIELD_NUMBER = 1; - private static final class SecurityRequirementDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> securityRequirement_; - private com.google.protobuf.MapField - internalGetSecurityRequirement() { - if (securityRequirement_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SecurityRequirementDefaultEntryHolder.defaultEntry); - } - return securityRequirement_; - } - public int getSecurityRequirementCount() { - return internalGetSecurityRequirement().getMap().size(); - } - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - @java.lang.Override - public boolean containsSecurityRequirement( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetSecurityRequirement().getMap().containsKey(key); - } - /** - * Use {@link #getSecurityRequirementMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSecurityRequirement() { - return getSecurityRequirementMap(); - } - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - @java.lang.Override - public java.util.Map getSecurityRequirementMap() { - return internalGetSecurityRequirement().getMap(); - } - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetSecurityRequirement().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetSecurityRequirement().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetSecurityRequirement(), - SecurityRequirementDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetSecurityRequirement().getMap().entrySet()) { - com.google.protobuf.MapEntry - securityRequirement__ = SecurityRequirementDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, securityRequirement__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement other = (grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) obj; - - if (!internalGetSecurityRequirement().equals( - other.internalGetSecurityRequirement())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetSecurityRequirement().getMap().isEmpty()) { - hash = (37 * hash) + SECURITY_REQUIREMENT_FIELD_NUMBER; - hash = (53 * hash) + internalGetSecurityRequirement().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `SecurityRequirement` is a representation of OpenAPI v2 specification's
-   * Security Requirement object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
-   *
-   * Lists the required security schemes to execute this operation. The object can
-   * have multiple security schemes declared in it which are all required (that
-   * is, there is a logical AND between the schemes).
-   *
-   * The name used for each property MUST correspond to a security scheme
-   * declared in the Security Definitions.
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetSecurityRequirement(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableSecurityRequirement(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableSecurityRequirement().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement build() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result = new grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.securityRequirement_ = internalGetSecurityRequirement().build(SecurityRequirementDefaultEntryHolder.defaultEntry); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()) return this; - internalGetMutableSecurityRequirement().mergeFrom( - other.internalGetSecurityRequirement()); - bitField0_ |= 0x00000001; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.MapEntry - securityRequirement__ = input.readMessage( - SecurityRequirementDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableSecurityRequirement().ensureBuilderMap().put( - securityRequirement__.getKey(), securityRequirement__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private static final class SecurityRequirementConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue build(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder val) { - if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { return (grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) val; } - return ((grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return SecurityRequirementDefaultEntryHolder.defaultEntry; - } - }; - private static final SecurityRequirementConverter securityRequirementConverter = new SecurityRequirementConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder> securityRequirement_; - private com.google.protobuf.MapFieldBuilder - internalGetSecurityRequirement() { - if (securityRequirement_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(securityRequirementConverter); - } - return securityRequirement_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableSecurityRequirement() { - if (securityRequirement_ == null) { - securityRequirement_ = new com.google.protobuf.MapFieldBuilder<>(securityRequirementConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return securityRequirement_; - } - public int getSecurityRequirementCount() { - return internalGetSecurityRequirement().ensureBuilderMap().size(); - } - /** - *
-     * Each name must correspond to a security scheme which is declared in
-     * the Security Definitions. If the security scheme is of type "oauth2",
-     * then the value is a list of scope names required for the execution.
-     * For other security scheme types, the array MUST be empty.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - @java.lang.Override - public boolean containsSecurityRequirement( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetSecurityRequirement().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getSecurityRequirementMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSecurityRequirement() { - return getSecurityRequirementMap(); - } - /** - *
-     * Each name must correspond to a security scheme which is declared in
-     * the Security Definitions. If the security scheme is of type "oauth2",
-     * then the value is a list of scope names required for the execution.
-     * For other security scheme types, the array MUST be empty.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - @java.lang.Override - public java.util.Map getSecurityRequirementMap() { - return internalGetSecurityRequirement().getImmutableMap(); - } - /** - *
-     * Each name must correspond to a security scheme which is declared in
-     * the Security Definitions. If the security scheme is of type "oauth2",
-     * then the value is a list of scope names required for the execution.
-     * For other security scheme types, the array MUST be empty.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableSecurityRequirement().ensureBuilderMap(); - return map.containsKey(key) ? securityRequirementConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * Each name must correspond to a security scheme which is declared in
-     * the Security Definitions. If the security scheme is of type "oauth2",
-     * then the value is a list of scope names required for the execution.
-     * For other security scheme types, the array MUST be empty.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableSecurityRequirement().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return securityRequirementConverter.build(map.get(key)); - } - public Builder clearSecurityRequirement() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableSecurityRequirement().clear(); - return this; - } - /** - *
-     * Each name must correspond to a security scheme which is declared in
-     * the Security Definitions. If the security scheme is of type "oauth2",
-     * then the value is a list of scope names required for the execution.
-     * For other security scheme types, the array MUST be empty.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - public Builder removeSecurityRequirement( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableSecurityRequirement().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableSecurityRequirement() { - bitField0_ |= 0x00000001; - return internalGetMutableSecurityRequirement().ensureMessageMap(); - } - /** - *
-     * Each name must correspond to a security scheme which is declared in
-     * the Security Definitions. If the security scheme is of type "oauth2",
-     * then the value is a list of scope names required for the execution.
-     * For other security scheme types, the array MUST be empty.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - public Builder putSecurityRequirement( - java.lang.String key, - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableSecurityRequirement().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - *
-     * Each name must correspond to a security scheme which is declared in
-     * the Security Definitions. If the security scheme is of type "oauth2",
-     * then the value is a list of scope names required for the execution.
-     * For other security scheme types, the array MUST be empty.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - public Builder putAllSecurityRequirement( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableSecurityRequirement().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - *
-     * Each name must correspond to a security scheme which is declared in
-     * the Security Definitions. If the security scheme is of type "oauth2",
-     * then the value is a list of scope names required for the execution.
-     * For other security scheme types, the array MUST be empty.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder putSecurityRequirementBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableSecurityRequirement().ensureBuilderMap(); - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { - entry = ((grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) entry).toBuilder(); - builderMap.put(key, entry); - } - return (grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) - private static final grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SecurityRequirement parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java deleted file mode 100644 index ca490070..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java +++ /dev/null @@ -1,79 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface SecurityRequirementOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - int getSecurityRequirementCount(); - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - boolean containsSecurityRequirement( - java.lang.String key); - /** - * Use {@link #getSecurityRequirementMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getSecurityRequirement(); - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - java.util.Map - getSecurityRequirementMap(); - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue); - /** - *
-   * Each name must correspond to a security scheme which is declared in
-   * the Security Definitions. If the security scheme is of type "oauth2",
-   * then the value is a list of scope names required for the execution.
-   * For other security scheme types, the array MUST be empty.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java deleted file mode 100644 index dbd92383..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java +++ /dev/null @@ -1,2545 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `SecurityScheme` is a representation of OpenAPI v2 specification's
- * Security Scheme object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
- *
- * Allows the definition of a security scheme that can be used by the
- * operations. Supported schemes are basic authentication, an API key (either as
- * a header or as a query parameter) and OAuth2's common flows (implicit,
- * password, application and access code).
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} - */ -public final class SecurityScheme extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) - SecuritySchemeOrBuilder { -private static final long serialVersionUID = 0L; - // Use SecurityScheme.newBuilder() to construct. - private SecurityScheme(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SecurityScheme() { - type_ = 0; - description_ = ""; - name_ = ""; - in_ = 0; - flow_ = 0; - authorizationUrl_ = ""; - tokenUrl_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SecurityScheme(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 9: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder.class); - } - - /** - *
-   * The type of the security scheme. Valid values are "basic",
-   * "apiKey" or "oauth2".
-   * 
- * - * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - * TYPE_INVALID = 0; - */ - TYPE_INVALID(0), - /** - * TYPE_BASIC = 1; - */ - TYPE_BASIC(1), - /** - * TYPE_API_KEY = 2; - */ - TYPE_API_KEY(2), - /** - * TYPE_OAUTH2 = 3; - */ - TYPE_OAUTH2(3), - UNRECOGNIZED(-1), - ; - - /** - * TYPE_INVALID = 0; - */ - public static final int TYPE_INVALID_VALUE = 0; - /** - * TYPE_BASIC = 1; - */ - public static final int TYPE_BASIC_VALUE = 1; - /** - * TYPE_API_KEY = 2; - */ - public static final int TYPE_API_KEY_VALUE = 2; - /** - * TYPE_OAUTH2 = 3; - */ - public static final int TYPE_OAUTH2_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return TYPE_INVALID; - case 1: return TYPE_BASIC; - case 2: return TYPE_API_KEY; - case 3: return TYPE_OAUTH2; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type) - } - - /** - *
-   * The location of the API key. Valid values are "query" or "header".
-   * 
- * - * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} - */ - public enum In - implements com.google.protobuf.ProtocolMessageEnum { - /** - * IN_INVALID = 0; - */ - IN_INVALID(0), - /** - * IN_QUERY = 1; - */ - IN_QUERY(1), - /** - * IN_HEADER = 2; - */ - IN_HEADER(2), - UNRECOGNIZED(-1), - ; - - /** - * IN_INVALID = 0; - */ - public static final int IN_INVALID_VALUE = 0; - /** - * IN_QUERY = 1; - */ - public static final int IN_QUERY_VALUE = 1; - /** - * IN_HEADER = 2; - */ - public static final int IN_HEADER_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static In valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static In forNumber(int value) { - switch (value) { - case 0: return IN_INVALID; - case 1: return IN_QUERY; - case 2: return IN_HEADER; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - In> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public In findValueByNumber(int number) { - return In.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(1); - } - - private static final In[] VALUES = values(); - - public static In valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private In(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In) - } - - /** - *
-   * The flow used by the OAuth2 security scheme. Valid values are
-   * "implicit", "password", "application" or "accessCode".
-   * 
- * - * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} - */ - public enum Flow - implements com.google.protobuf.ProtocolMessageEnum { - /** - * FLOW_INVALID = 0; - */ - FLOW_INVALID(0), - /** - * FLOW_IMPLICIT = 1; - */ - FLOW_IMPLICIT(1), - /** - * FLOW_PASSWORD = 2; - */ - FLOW_PASSWORD(2), - /** - * FLOW_APPLICATION = 3; - */ - FLOW_APPLICATION(3), - /** - * FLOW_ACCESS_CODE = 4; - */ - FLOW_ACCESS_CODE(4), - UNRECOGNIZED(-1), - ; - - /** - * FLOW_INVALID = 0; - */ - public static final int FLOW_INVALID_VALUE = 0; - /** - * FLOW_IMPLICIT = 1; - */ - public static final int FLOW_IMPLICIT_VALUE = 1; - /** - * FLOW_PASSWORD = 2; - */ - public static final int FLOW_PASSWORD_VALUE = 2; - /** - * FLOW_APPLICATION = 3; - */ - public static final int FLOW_APPLICATION_VALUE = 3; - /** - * FLOW_ACCESS_CODE = 4; - */ - public static final int FLOW_ACCESS_CODE_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Flow valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Flow forNumber(int value) { - switch (value) { - case 0: return FLOW_INVALID; - case 1: return FLOW_IMPLICIT; - case 2: return FLOW_PASSWORD; - case 3: return FLOW_APPLICATION; - case 4: return FLOW_ACCESS_CODE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Flow> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Flow findValueByNumber(int number) { - return Flow.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(2); - } - - private static final Flow[] VALUES = values(); - - public static Flow valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Flow(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow) - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private int type_ = 0; - /** - *
-   * The type of the security scheme. Valid values are "basic",
-   * "apiKey" or "oauth2".
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The type of the security scheme. Valid values are "basic",
-   * "apiKey" or "oauth2".
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @return The type. - */ - @java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.forNumber(type_); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.UNRECOGNIZED : result; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * A short description for security scheme.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A short description for security scheme.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the header or query parameter to be used.
-   * Valid for apiKey.
-   * 
- * - * string name = 3 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the header or query parameter to be used.
-   * Valid for apiKey.
-   * 
- * - * string name = 3 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IN_FIELD_NUMBER = 4; - private int in_ = 0; - /** - *
-   * The location of the API key. Valid values are "query" or
-   * "header".
-   * Valid for apiKey.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @return The enum numeric value on the wire for in. - */ - @java.lang.Override public int getInValue() { - return in_; - } - /** - *
-   * The location of the API key. Valid values are "query" or
-   * "header".
-   * Valid for apiKey.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @return The in. - */ - @java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.forNumber(in_); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.UNRECOGNIZED : result; - } - - public static final int FLOW_FIELD_NUMBER = 5; - private int flow_ = 0; - /** - *
-   * The flow used by the OAuth2 security scheme. Valid values are
-   * "implicit", "password", "application" or "accessCode".
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @return The enum numeric value on the wire for flow. - */ - @java.lang.Override public int getFlowValue() { - return flow_; - } - /** - *
-   * The flow used by the OAuth2 security scheme. Valid values are
-   * "implicit", "password", "application" or "accessCode".
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @return The flow. - */ - @java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.forNumber(flow_); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.UNRECOGNIZED : result; - } - - public static final int AUTHORIZATION_URL_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object authorizationUrl_ = ""; - /** - *
-   * The authorization URL to be used for this flow. This SHOULD be in
-   * the form of a URL.
-   * Valid for oauth2/implicit and oauth2/accessCode.
-   * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @return The authorizationUrl. - */ - @java.lang.Override - public java.lang.String getAuthorizationUrl() { - java.lang.Object ref = authorizationUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - authorizationUrl_ = s; - return s; - } - } - /** - *
-   * The authorization URL to be used for this flow. This SHOULD be in
-   * the form of a URL.
-   * Valid for oauth2/implicit and oauth2/accessCode.
-   * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @return The bytes for authorizationUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAuthorizationUrlBytes() { - java.lang.Object ref = authorizationUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - authorizationUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOKEN_URL_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private volatile java.lang.Object tokenUrl_ = ""; - /** - *
-   * The token URL to be used for this flow. This SHOULD be in the
-   * form of a URL.
-   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-   * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @return The tokenUrl. - */ - @java.lang.Override - public java.lang.String getTokenUrl() { - java.lang.Object ref = tokenUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tokenUrl_ = s; - return s; - } - } - /** - *
-   * The token URL to be used for this flow. This SHOULD be in the
-   * form of a URL.
-   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-   * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @return The bytes for tokenUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTokenUrlBytes() { - java.lang.Object ref = tokenUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tokenUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCOPES_FIELD_NUMBER = 8; - private grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes_; - /** - *
-   * The available scopes for the OAuth2 security scheme.
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - * @return Whether the scopes field is set. - */ - @java.lang.Override - public boolean hasScopes() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * The available scopes for the OAuth2 security scheme.
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - * @return The scopes. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes() { - return scopes_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; - } - /** - *
-   * The available scopes for the OAuth2 security scheme.
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder() { - return scopes_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; - } - - public static final int EXTENSIONS_FIELD_NUMBER = 9; - private static final class ExtensionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> extensions_; - private com.google.protobuf.MapField - internalGetExtensions() { - if (extensions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExtensionsDefaultEntryHolder.defaultEntry); - } - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().getMap().size(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().getMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.TYPE_INVALID.getNumber()) { - output.writeEnum(1, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (in_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.IN_INVALID.getNumber()) { - output.writeEnum(4, in_); - } - if (flow_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.FLOW_INVALID.getNumber()) { - output.writeEnum(5, flow_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizationUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, authorizationUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, tokenUrl_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(8, getScopes()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExtensions(), - ExtensionsDefaultEntryHolder.defaultEntry, - 9); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.TYPE_INVALID.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (in_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.IN_INVALID.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, in_); - } - if (flow_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.FLOW_INVALID.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, flow_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizationUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, authorizationUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, tokenUrl_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getScopes()); - } - for (java.util.Map.Entry entry - : internalGetExtensions().getMap().entrySet()) { - com.google.protobuf.MapEntry - extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, extensions__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme other = (grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) obj; - - if (type_ != other.type_) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getName() - .equals(other.getName())) return false; - if (in_ != other.in_) return false; - if (flow_ != other.flow_) return false; - if (!getAuthorizationUrl() - .equals(other.getAuthorizationUrl())) return false; - if (!getTokenUrl() - .equals(other.getTokenUrl())) return false; - if (hasScopes() != other.hasScopes()) return false; - if (hasScopes()) { - if (!getScopes() - .equals(other.getScopes())) return false; - } - if (!internalGetExtensions().equals( - other.internalGetExtensions())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + in_; - hash = (37 * hash) + FLOW_FIELD_NUMBER; - hash = (53 * hash) + flow_; - hash = (37 * hash) + AUTHORIZATION_URL_FIELD_NUMBER; - hash = (53 * hash) + getAuthorizationUrl().hashCode(); - hash = (37 * hash) + TOKEN_URL_FIELD_NUMBER; - hash = (53 * hash) + getTokenUrl().hashCode(); - if (hasScopes()) { - hash = (37 * hash) + SCOPES_FIELD_NUMBER; - hash = (53 * hash) + getScopes().hashCode(); - } - if (!internalGetExtensions().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtensions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `SecurityScheme` is a representation of OpenAPI v2 specification's
-   * Security Scheme object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
-   *
-   * Allows the definition of a security scheme that can be used by the
-   * operations. Supported schemes are basic authentication, an API key (either as
-   * a header or as a query parameter) and OAuth2's common flows (implicit,
-   * password, application and access code).
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) - grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 9: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 9: - return internalGetMutableExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.class, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getScopesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = 0; - description_ = ""; - name_ = ""; - in_ = 0; - flow_ = 0; - authorizationUrl_ = ""; - tokenUrl_ = ""; - scopes_ = null; - if (scopesBuilder_ != null) { - scopesBuilder_.dispose(); - scopesBuilder_ = null; - } - internalGetMutableExtensions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme build() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result = new grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.flow_ = flow_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.authorizationUrl_ = authorizationUrl_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.tokenUrl_ = tokenUrl_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000080) != 0)) { - result.scopes_ = scopesBuilder_ == null - ? scopes_ - : scopesBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.in_ != 0) { - setInValue(other.getInValue()); - } - if (other.flow_ != 0) { - setFlowValue(other.getFlowValue()); - } - if (!other.getAuthorizationUrl().isEmpty()) { - authorizationUrl_ = other.authorizationUrl_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getTokenUrl().isEmpty()) { - tokenUrl_ = other.tokenUrl_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.hasScopes()) { - mergeScopes(other.getScopes()); - } - internalGetMutableExtensions().mergeFrom( - other.internalGetExtensions()); - bitField0_ |= 0x00000100; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - type_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - in_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: { - flow_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: { - authorizationUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - tokenUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - input.readMessage( - getScopesFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: { - com.google.protobuf.MapEntry - extensions__ = input.readMessage( - ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExtensions().ensureBuilderMap().put( - extensions__.getKey(), extensions__.getValue()); - bitField0_ |= 0x00000100; - break; - } // case 74 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int type_ = 0; - /** - *
-     * The type of the security scheme. Valid values are "basic",
-     * "apiKey" or "oauth2".
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The type of the security scheme. Valid values are "basic",
-     * "apiKey" or "oauth2".
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The type of the security scheme. Valid values are "basic",
-     * "apiKey" or "oauth2".
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @return The type. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.forNumber(type_); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.UNRECOGNIZED : result; - } - /** - *
-     * The type of the security scheme. Valid values are "basic",
-     * "apiKey" or "oauth2".
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The type of the security scheme. Valid values are "basic",
-     * "apiKey" or "oauth2".
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A short description for security scheme.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A short description for security scheme.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A short description for security scheme.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A short description for security scheme.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A short description for security scheme.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the header or query parameter to be used.
-     * Valid for apiKey.
-     * 
- * - * string name = 3 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the header or query parameter to be used.
-     * Valid for apiKey.
-     * 
- * - * string name = 3 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the header or query parameter to be used.
-     * Valid for apiKey.
-     * 
- * - * string name = 3 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The name of the header or query parameter to be used.
-     * Valid for apiKey.
-     * 
- * - * string name = 3 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The name of the header or query parameter to be used.
-     * Valid for apiKey.
-     * 
- * - * string name = 3 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int in_ = 0; - /** - *
-     * The location of the API key. Valid values are "query" or
-     * "header".
-     * Valid for apiKey.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @return The enum numeric value on the wire for in. - */ - @java.lang.Override public int getInValue() { - return in_; - } - /** - *
-     * The location of the API key. Valid values are "query" or
-     * "header".
-     * Valid for apiKey.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @param value The enum numeric value on the wire for in to set. - * @return This builder for chaining. - */ - public Builder setInValue(int value) { - in_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The location of the API key. Valid values are "query" or
-     * "header".
-     * Valid for apiKey.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @return The in. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.forNumber(in_); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.UNRECOGNIZED : result; - } - /** - *
-     * The location of the API key. Valid values are "query" or
-     * "header".
-     * Valid for apiKey.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - in_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The location of the API key. Valid values are "query" or
-     * "header".
-     * Valid for apiKey.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @return This builder for chaining. - */ - public Builder clearIn() { - bitField0_ = (bitField0_ & ~0x00000008); - in_ = 0; - onChanged(); - return this; - } - - private int flow_ = 0; - /** - *
-     * The flow used by the OAuth2 security scheme. Valid values are
-     * "implicit", "password", "application" or "accessCode".
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @return The enum numeric value on the wire for flow. - */ - @java.lang.Override public int getFlowValue() { - return flow_; - } - /** - *
-     * The flow used by the OAuth2 security scheme. Valid values are
-     * "implicit", "password", "application" or "accessCode".
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @param value The enum numeric value on the wire for flow to set. - * @return This builder for chaining. - */ - public Builder setFlowValue(int value) { - flow_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The flow used by the OAuth2 security scheme. Valid values are
-     * "implicit", "password", "application" or "accessCode".
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @return The flow. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow() { - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow result = grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.forNumber(flow_); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.UNRECOGNIZED : result; - } - /** - *
-     * The flow used by the OAuth2 security scheme. Valid values are
-     * "implicit", "password", "application" or "accessCode".
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @param value The flow to set. - * @return This builder for chaining. - */ - public Builder setFlow(grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - flow_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The flow used by the OAuth2 security scheme. Valid values are
-     * "implicit", "password", "application" or "accessCode".
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @return This builder for chaining. - */ - public Builder clearFlow() { - bitField0_ = (bitField0_ & ~0x00000010); - flow_ = 0; - onChanged(); - return this; - } - - private java.lang.Object authorizationUrl_ = ""; - /** - *
-     * The authorization URL to be used for this flow. This SHOULD be in
-     * the form of a URL.
-     * Valid for oauth2/implicit and oauth2/accessCode.
-     * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @return The authorizationUrl. - */ - public java.lang.String getAuthorizationUrl() { - java.lang.Object ref = authorizationUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - authorizationUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The authorization URL to be used for this flow. This SHOULD be in
-     * the form of a URL.
-     * Valid for oauth2/implicit and oauth2/accessCode.
-     * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @return The bytes for authorizationUrl. - */ - public com.google.protobuf.ByteString - getAuthorizationUrlBytes() { - java.lang.Object ref = authorizationUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - authorizationUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The authorization URL to be used for this flow. This SHOULD be in
-     * the form of a URL.
-     * Valid for oauth2/implicit and oauth2/accessCode.
-     * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @param value The authorizationUrl to set. - * @return This builder for chaining. - */ - public Builder setAuthorizationUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - authorizationUrl_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * The authorization URL to be used for this flow. This SHOULD be in
-     * the form of a URL.
-     * Valid for oauth2/implicit and oauth2/accessCode.
-     * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @return This builder for chaining. - */ - public Builder clearAuthorizationUrl() { - authorizationUrl_ = getDefaultInstance().getAuthorizationUrl(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - *
-     * The authorization URL to be used for this flow. This SHOULD be in
-     * the form of a URL.
-     * Valid for oauth2/implicit and oauth2/accessCode.
-     * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @param value The bytes for authorizationUrl to set. - * @return This builder for chaining. - */ - public Builder setAuthorizationUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - authorizationUrl_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object tokenUrl_ = ""; - /** - *
-     * The token URL to be used for this flow. This SHOULD be in the
-     * form of a URL.
-     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-     * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @return The tokenUrl. - */ - public java.lang.String getTokenUrl() { - java.lang.Object ref = tokenUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tokenUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The token URL to be used for this flow. This SHOULD be in the
-     * form of a URL.
-     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-     * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @return The bytes for tokenUrl. - */ - public com.google.protobuf.ByteString - getTokenUrlBytes() { - java.lang.Object ref = tokenUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tokenUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The token URL to be used for this flow. This SHOULD be in the
-     * form of a URL.
-     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-     * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @param value The tokenUrl to set. - * @return This builder for chaining. - */ - public Builder setTokenUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - tokenUrl_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * The token URL to be used for this flow. This SHOULD be in the
-     * form of a URL.
-     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-     * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @return This builder for chaining. - */ - public Builder clearTokenUrl() { - tokenUrl_ = getDefaultInstance().getTokenUrl(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - *
-     * The token URL to be used for this flow. This SHOULD be in the
-     * form of a URL.
-     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-     * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @param value The bytes for tokenUrl to set. - * @return This builder for chaining. - */ - public Builder setTokenUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - tokenUrl_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Scopes, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder> scopesBuilder_; - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - * @return Whether the scopes field is set. - */ - public boolean hasScopes() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - * @return The scopes. - */ - public grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes() { - if (scopesBuilder_ == null) { - return scopes_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; - } else { - return scopesBuilder_.getMessage(); - } - } - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - public Builder setScopes(grpc.gateway.protoc_gen_openapiv2.options.Scopes value) { - if (scopesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - scopes_ = value; - } else { - scopesBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - public Builder setScopes( - grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder builderForValue) { - if (scopesBuilder_ == null) { - scopes_ = builderForValue.build(); - } else { - scopesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - public Builder mergeScopes(grpc.gateway.protoc_gen_openapiv2.options.Scopes value) { - if (scopesBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - scopes_ != null && - scopes_ != grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance()) { - getScopesBuilder().mergeFrom(value); - } else { - scopes_ = value; - } - } else { - scopesBuilder_.mergeFrom(value); - } - if (scopes_ != null) { - bitField0_ |= 0x00000080; - onChanged(); - } - return this; - } - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - public Builder clearScopes() { - bitField0_ = (bitField0_ & ~0x00000080); - scopes_ = null; - if (scopesBuilder_ != null) { - scopesBuilder_.dispose(); - scopesBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder getScopesBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getScopesFieldBuilder().getBuilder(); - } - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder() { - if (scopesBuilder_ != null) { - return scopesBuilder_.getMessageOrBuilder(); - } else { - return scopes_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; - } - } - /** - *
-     * The available scopes for the OAuth2 security scheme.
-     * Valid for oauth2.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Scopes, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder> - getScopesFieldBuilder() { - if (scopesBuilder_ == null) { - scopesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Scopes, grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder>( - getScopes(), - getParentForChildren(), - isClean()); - scopes_ = null; - } - return scopesBuilder_; - } - - private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ExtensionsDefaultEntryHolder.defaultEntry; - } - }; - private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; - private com.google.protobuf.MapFieldBuilder - internalGetExtensions() { - if (extensions_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - return extensions_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableExtensions() { - if (extensions_ == null) { - extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - bitField0_ |= 0x00000100; - onChanged(); - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().ensureBuilderMap().size(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getImmutableMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return extensionsConverter.build(map.get(key)); - } - public Builder clearExtensions() { - bitField0_ = (bitField0_ & ~0x00000100); - internalGetMutableExtensions().clear(); - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - public Builder removeExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtensions().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExtensions() { - bitField0_ |= 0x00000100; - return internalGetMutableExtensions().ensureMessageMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - public Builder putExtensions( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableExtensions().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000100; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - public Builder putAllExtensions( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableExtensions().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000100; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) - private static final grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SecurityScheme parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java deleted file mode 100644 index f047ad97..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java +++ /dev/null @@ -1,261 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface SecuritySchemeOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The type of the security scheme. Valid values are "basic",
-   * "apiKey" or "oauth2".
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The type of the security scheme. Valid values are "basic",
-   * "apiKey" or "oauth2".
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; - * @return The type. - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType(); - - /** - *
-   * A short description for security scheme.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A short description for security scheme.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * The name of the header or query parameter to be used.
-   * Valid for apiKey.
-   * 
- * - * string name = 3 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the header or query parameter to be used.
-   * Valid for apiKey.
-   * 
- * - * string name = 3 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The location of the API key. Valid values are "query" or
-   * "header".
-   * Valid for apiKey.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @return The enum numeric value on the wire for in. - */ - int getInValue(); - /** - *
-   * The location of the API key. Valid values are "query" or
-   * "header".
-   * Valid for apiKey.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; - * @return The in. - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn(); - - /** - *
-   * The flow used by the OAuth2 security scheme. Valid values are
-   * "implicit", "password", "application" or "accessCode".
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @return The enum numeric value on the wire for flow. - */ - int getFlowValue(); - /** - *
-   * The flow used by the OAuth2 security scheme. Valid values are
-   * "implicit", "password", "application" or "accessCode".
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; - * @return The flow. - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow(); - - /** - *
-   * The authorization URL to be used for this flow. This SHOULD be in
-   * the form of a URL.
-   * Valid for oauth2/implicit and oauth2/accessCode.
-   * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @return The authorizationUrl. - */ - java.lang.String getAuthorizationUrl(); - /** - *
-   * The authorization URL to be used for this flow. This SHOULD be in
-   * the form of a URL.
-   * Valid for oauth2/implicit and oauth2/accessCode.
-   * 
- * - * string authorization_url = 6 [json_name = "authorizationUrl"]; - * @return The bytes for authorizationUrl. - */ - com.google.protobuf.ByteString - getAuthorizationUrlBytes(); - - /** - *
-   * The token URL to be used for this flow. This SHOULD be in the
-   * form of a URL.
-   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-   * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @return The tokenUrl. - */ - java.lang.String getTokenUrl(); - /** - *
-   * The token URL to be used for this flow. This SHOULD be in the
-   * form of a URL.
-   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
-   * 
- * - * string token_url = 7 [json_name = "tokenUrl"]; - * @return The bytes for tokenUrl. - */ - com.google.protobuf.ByteString - getTokenUrlBytes(); - - /** - *
-   * The available scopes for the OAuth2 security scheme.
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - * @return Whether the scopes field is set. - */ - boolean hasScopes(); - /** - *
-   * The available scopes for the OAuth2 security scheme.
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - * @return The scopes. - */ - grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes(); - /** - *
-   * The available scopes for the OAuth2 security scheme.
-   * Valid for oauth2.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder(); - - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - int getExtensionsCount(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - boolean containsExtensions( - java.lang.String key); - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExtensions(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - java.util.Map - getExtensionsMap(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; - */ - com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java deleted file mode 100644 index 6f335b81..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java +++ /dev/null @@ -1,4356 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
- *
- * Example:
- *
- *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
- *    info: {
- *      title: "Echo API";
- *      version: "1.0";
- *      description: "";
- *      contact: {
- *        name: "gRPC-Gateway project";
- *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
- *        email: "none@example.com";
- *      };
- *      license: {
- *        name: "BSD 3-Clause License";
- *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
- *      };
- *    };
- *    schemes: HTTPS;
- *    consumes: "application/json";
- *    produces: "application/json";
- *  };
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Swagger} - */ -public final class Swagger extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Swagger) - SwaggerOrBuilder { -private static final long serialVersionUID = 0L; - // Use Swagger.newBuilder() to construct. - private Swagger(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Swagger() { - swagger_ = ""; - host_ = ""; - basePath_ = ""; - schemes_ = java.util.Collections.emptyList(); - consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - security_ = java.util.Collections.emptyList(); - tags_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Swagger(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 10: - return internalGetResponses(); - case 15: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, grpc.gateway.protoc_gen_openapiv2.options.Swagger.Builder.class); - } - - private int bitField0_; - public static final int SWAGGER_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object swagger_ = ""; - /** - *
-   * Specifies the OpenAPI Specification version being used. It can be
-   * used by the OpenAPI UI and other clients to interpret the API listing. The
-   * value MUST be "2.0".
-   * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @return The swagger. - */ - @java.lang.Override - public java.lang.String getSwagger() { - java.lang.Object ref = swagger_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - swagger_ = s; - return s; - } - } - /** - *
-   * Specifies the OpenAPI Specification version being used. It can be
-   * used by the OpenAPI UI and other clients to interpret the API listing. The
-   * value MUST be "2.0".
-   * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @return The bytes for swagger. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSwaggerBytes() { - java.lang.Object ref = swagger_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - swagger_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INFO_FIELD_NUMBER = 2; - private grpc.gateway.protoc_gen_openapiv2.options.Info info_; - /** - *
-   * Provides metadata about the API. The metadata can be used by the
-   * clients if needed.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - * @return Whether the info field is set. - */ - @java.lang.Override - public boolean hasInfo() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Provides metadata about the API. The metadata can be used by the
-   * clients if needed.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - * @return The info. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Info getInfo() { - return info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; - } - /** - *
-   * Provides metadata about the API. The metadata can be used by the
-   * clients if needed.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder() { - return info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; - } - - public static final int HOST_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object host_ = ""; - /** - *
-   * The host (name or ip) serving the API. This MUST be the host only and does
-   * not include the scheme nor sub-paths. It MAY include a port. If the host is
-   * not included, the host serving the documentation is to be used (including
-   * the port). The host does not support path templating.
-   * 
- * - * string host = 3 [json_name = "host"]; - * @return The host. - */ - @java.lang.Override - public java.lang.String getHost() { - java.lang.Object ref = host_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - host_ = s; - return s; - } - } - /** - *
-   * The host (name or ip) serving the API. This MUST be the host only and does
-   * not include the scheme nor sub-paths. It MAY include a port. If the host is
-   * not included, the host serving the documentation is to be used (including
-   * the port). The host does not support path templating.
-   * 
- * - * string host = 3 [json_name = "host"]; - * @return The bytes for host. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHostBytes() { - java.lang.Object ref = host_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - host_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BASE_PATH_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object basePath_ = ""; - /** - *
-   * The base path on which the API is served, which is relative to the host. If
-   * it is not included, the API is served directly under the host. The value
-   * MUST start with a leading slash (/). The basePath does not support path
-   * templating.
-   * Note that using `base_path` does not change the endpoint paths that are
-   * generated in the resulting OpenAPI file. If you wish to use `base_path`
-   * with relatively generated OpenAPI paths, the `base_path` prefix must be
-   * manually removed from your `google.api.http` paths and your code changed to
-   * serve the API from the `base_path`.
-   * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @return The basePath. - */ - @java.lang.Override - public java.lang.String getBasePath() { - java.lang.Object ref = basePath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - basePath_ = s; - return s; - } - } - /** - *
-   * The base path on which the API is served, which is relative to the host. If
-   * it is not included, the API is served directly under the host. The value
-   * MUST start with a leading slash (/). The basePath does not support path
-   * templating.
-   * Note that using `base_path` does not change the endpoint paths that are
-   * generated in the resulting OpenAPI file. If you wish to use `base_path`
-   * with relatively generated OpenAPI paths, the `base_path` prefix must be
-   * manually removed from your `google.api.http` paths and your code changed to
-   * serve the API from the `base_path`.
-   * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @return The bytes for basePath. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBasePathBytes() { - java.lang.Object ref = basePath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - basePath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCHEMES_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List schemes_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme> schemes_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>() { - public grpc.gateway.protoc_gen_openapiv2.options.Scheme convert(java.lang.Integer from) { - grpc.gateway.protoc_gen_openapiv2.options.Scheme result = grpc.gateway.protoc_gen_openapiv2.options.Scheme.forNumber(from); - return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Scheme.UNRECOGNIZED : result; - } - }; - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return A list containing the schemes. - */ - @java.lang.Override - public java.util.List getSchemesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); - } - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return The count of schemes. - */ - @java.lang.Override - public int getSchemesCount() { - return schemes_.size(); - } - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param index The index of the element to return. - * @return The schemes at the given index. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { - return schemes_converter_.convert(schemes_.get(index)); - } - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return A list containing the enum numeric values on the wire for schemes. - */ - @java.lang.Override - public java.util.List - getSchemesValueList() { - return schemes_; - } - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of schemes at the given index. - */ - @java.lang.Override - public int getSchemesValue(int index) { - return schemes_.get(index); - } - private int schemesMemoizedSerializedSize; - - public static final int CONSUMES_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * A list of MIME types the APIs can consume. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return A list containing the consumes. - */ - public com.google.protobuf.ProtocolStringList - getConsumesList() { - return consumes_; - } - /** - *
-   * A list of MIME types the APIs can consume. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return The count of consumes. - */ - public int getConsumesCount() { - return consumes_.size(); - } - /** - *
-   * A list of MIME types the APIs can consume. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the element to return. - * @return The consumes at the given index. - */ - public java.lang.String getConsumes(int index) { - return consumes_.get(index); - } - /** - *
-   * A list of MIME types the APIs can consume. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the value to return. - * @return The bytes of the consumes at the given index. - */ - public com.google.protobuf.ByteString - getConsumesBytes(int index) { - return consumes_.getByteString(index); - } - - public static final int PRODUCES_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * A list of MIME types the APIs can produce. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return A list containing the produces. - */ - public com.google.protobuf.ProtocolStringList - getProducesList() { - return produces_; - } - /** - *
-   * A list of MIME types the APIs can produce. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return The count of produces. - */ - public int getProducesCount() { - return produces_.size(); - } - /** - *
-   * A list of MIME types the APIs can produce. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the element to return. - * @return The produces at the given index. - */ - public java.lang.String getProduces(int index) { - return produces_.get(index); - } - /** - *
-   * A list of MIME types the APIs can produce. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the value to return. - * @return The bytes of the produces at the given index. - */ - public com.google.protobuf.ByteString - getProducesBytes(int index) { - return produces_.getByteString(index); - } - - public static final int RESPONSES_FIELD_NUMBER = 10; - private static final class ResponsesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Response> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Response> responses_; - private com.google.protobuf.MapField - internalGetResponses() { - if (responses_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ResponsesDefaultEntryHolder.defaultEntry); - } - return responses_; - } - public int getResponsesCount() { - return internalGetResponses().getMap().size(); - } - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - @java.lang.Override - public boolean containsResponses( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResponses().getMap().containsKey(key); - } - /** - * Use {@link #getResponsesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResponses() { - return getResponsesMap(); - } - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - @java.lang.Override - public java.util.Map getResponsesMap() { - return internalGetResponses().getMap(); - } - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResponses().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResponses().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int SECURITY_DEFINITIONS_FIELD_NUMBER = 11; - private grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions securityDefinitions_; - /** - *
-   * Security scheme definitions that can be used across the specification.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - * @return Whether the securityDefinitions field is set. - */ - @java.lang.Override - public boolean hasSecurityDefinitions() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Security scheme definitions that can be used across the specification.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - * @return The securityDefinitions. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions() { - return securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; - } - /** - *
-   * Security scheme definitions that can be used across the specification.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder() { - return securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; - } - - public static final int SECURITY_FIELD_NUMBER = 12; - @SuppressWarnings("serial") - private java.util.List security_; - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public java.util.List getSecurityList() { - return security_; - } - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public java.util.List - getSecurityOrBuilderList() { - return security_; - } - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public int getSecurityCount() { - return security_.size(); - } - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { - return security_.get(index); - } - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( - int index) { - return security_.get(index); - } - - public static final int TAGS_FIELD_NUMBER = 13; - @SuppressWarnings("serial") - private java.util.List tags_; - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - @java.lang.Override - public java.util.List getTagsList() { - return tags_; - } - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - @java.lang.Override - public java.util.List - getTagsOrBuilderList() { - return tags_; - } - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - @java.lang.Override - public int getTagsCount() { - return tags_.size(); - } - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index) { - return tags_.get(index); - } - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( - int index) { - return tags_.get(index); - } - - public static final int EXTERNAL_DOCS_FIELD_NUMBER = 14; - private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; - /** - *
-   * Additional external documentation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - @java.lang.Override - public boolean hasExternalDocs() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * Additional external documentation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - /** - *
-   * Additional external documentation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - - public static final int EXTENSIONS_FIELD_NUMBER = 15; - private static final class ExtensionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> extensions_; - private com.google.protobuf.MapField - internalGetExtensions() { - if (extensions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExtensionsDefaultEntryHolder.defaultEntry); - } - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().getMap().size(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().getMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(swagger_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, swagger_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getInfo()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, host_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(basePath_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, basePath_); - } - if (getSchemesList().size() > 0) { - output.writeUInt32NoTag(42); - output.writeUInt32NoTag(schemesMemoizedSerializedSize); - } - for (int i = 0; i < schemes_.size(); i++) { - output.writeEnumNoTag(schemes_.get(i)); - } - for (int i = 0; i < consumes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, consumes_.getRaw(i)); - } - for (int i = 0; i < produces_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, produces_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetResponses(), - ResponsesDefaultEntryHolder.defaultEntry, - 10); - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(11, getSecurityDefinitions()); - } - for (int i = 0; i < security_.size(); i++) { - output.writeMessage(12, security_.get(i)); - } - for (int i = 0; i < tags_.size(); i++) { - output.writeMessage(13, tags_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(14, getExternalDocs()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExtensions(), - ExtensionsDefaultEntryHolder.defaultEntry, - 15); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(swagger_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, swagger_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInfo()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, host_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(basePath_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, basePath_); - } - { - int dataSize = 0; - for (int i = 0; i < schemes_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(schemes_.get(i)); - } - size += dataSize; - if (!getSchemesList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }schemesMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < consumes_.size(); i++) { - dataSize += computeStringSizeNoTag(consumes_.getRaw(i)); - } - size += dataSize; - size += 1 * getConsumesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < produces_.size(); i++) { - dataSize += computeStringSizeNoTag(produces_.getRaw(i)); - } - size += dataSize; - size += 1 * getProducesList().size(); - } - for (java.util.Map.Entry entry - : internalGetResponses().getMap().entrySet()) { - com.google.protobuf.MapEntry - responses__ = ResponsesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, responses__); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getSecurityDefinitions()); - } - for (int i = 0; i < security_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, security_.get(i)); - } - for (int i = 0; i < tags_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, tags_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getExternalDocs()); - } - for (java.util.Map.Entry entry - : internalGetExtensions().getMap().entrySet()) { - com.google.protobuf.MapEntry - extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, extensions__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Swagger)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Swagger other = (grpc.gateway.protoc_gen_openapiv2.options.Swagger) obj; - - if (!getSwagger() - .equals(other.getSwagger())) return false; - if (hasInfo() != other.hasInfo()) return false; - if (hasInfo()) { - if (!getInfo() - .equals(other.getInfo())) return false; - } - if (!getHost() - .equals(other.getHost())) return false; - if (!getBasePath() - .equals(other.getBasePath())) return false; - if (!schemes_.equals(other.schemes_)) return false; - if (!getConsumesList() - .equals(other.getConsumesList())) return false; - if (!getProducesList() - .equals(other.getProducesList())) return false; - if (!internalGetResponses().equals( - other.internalGetResponses())) return false; - if (hasSecurityDefinitions() != other.hasSecurityDefinitions()) return false; - if (hasSecurityDefinitions()) { - if (!getSecurityDefinitions() - .equals(other.getSecurityDefinitions())) return false; - } - if (!getSecurityList() - .equals(other.getSecurityList())) return false; - if (!getTagsList() - .equals(other.getTagsList())) return false; - if (hasExternalDocs() != other.hasExternalDocs()) return false; - if (hasExternalDocs()) { - if (!getExternalDocs() - .equals(other.getExternalDocs())) return false; - } - if (!internalGetExtensions().equals( - other.internalGetExtensions())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SWAGGER_FIELD_NUMBER; - hash = (53 * hash) + getSwagger().hashCode(); - if (hasInfo()) { - hash = (37 * hash) + INFO_FIELD_NUMBER; - hash = (53 * hash) + getInfo().hashCode(); - } - hash = (37 * hash) + HOST_FIELD_NUMBER; - hash = (53 * hash) + getHost().hashCode(); - hash = (37 * hash) + BASE_PATH_FIELD_NUMBER; - hash = (53 * hash) + getBasePath().hashCode(); - if (getSchemesCount() > 0) { - hash = (37 * hash) + SCHEMES_FIELD_NUMBER; - hash = (53 * hash) + schemes_.hashCode(); - } - if (getConsumesCount() > 0) { - hash = (37 * hash) + CONSUMES_FIELD_NUMBER; - hash = (53 * hash) + getConsumesList().hashCode(); - } - if (getProducesCount() > 0) { - hash = (37 * hash) + PRODUCES_FIELD_NUMBER; - hash = (53 * hash) + getProducesList().hashCode(); - } - if (!internalGetResponses().getMap().isEmpty()) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + internalGetResponses().hashCode(); - } - if (hasSecurityDefinitions()) { - hash = (37 * hash) + SECURITY_DEFINITIONS_FIELD_NUMBER; - hash = (53 * hash) + getSecurityDefinitions().hashCode(); - } - if (getSecurityCount() > 0) { - hash = (37 * hash) + SECURITY_FIELD_NUMBER; - hash = (53 * hash) + getSecurityList().hashCode(); - } - if (getTagsCount() > 0) { - hash = (37 * hash) + TAGS_FIELD_NUMBER; - hash = (53 * hash) + getTagsList().hashCode(); - } - if (hasExternalDocs()) { - hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; - hash = (53 * hash) + getExternalDocs().hashCode(); - } - if (!internalGetExtensions().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtensions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Swagger prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
-   *
-   * Example:
-   *
-   *  option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
-   *    info: {
-   *      title: "Echo API";
-   *      version: "1.0";
-   *      description: "";
-   *      contact: {
-   *        name: "gRPC-Gateway project";
-   *        url: "https://github.com/grpc-ecosystem/grpc-gateway";
-   *        email: "none@example.com";
-   *      };
-   *      license: {
-   *        name: "BSD 3-Clause License";
-   *        url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
-   *      };
-   *    };
-   *    schemes: HTTPS;
-   *    consumes: "application/json";
-   *    produces: "application/json";
-   *  };
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Swagger} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Swagger) - grpc.gateway.protoc_gen_openapiv2.options.SwaggerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 10: - return internalGetResponses(); - case 15: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 10: - return internalGetMutableResponses(); - case 15: - return internalGetMutableExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, grpc.gateway.protoc_gen_openapiv2.options.Swagger.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Swagger.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoFieldBuilder(); - getSecurityDefinitionsFieldBuilder(); - getSecurityFieldBuilder(); - getTagsFieldBuilder(); - getExternalDocsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - swagger_ = ""; - info_ = null; - if (infoBuilder_ != null) { - infoBuilder_.dispose(); - infoBuilder_ = null; - } - host_ = ""; - basePath_ = ""; - schemes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - internalGetMutableResponses().clear(); - securityDefinitions_ = null; - if (securityDefinitionsBuilder_ != null) { - securityDefinitionsBuilder_.dispose(); - securityDefinitionsBuilder_ = null; - } - if (securityBuilder_ == null) { - security_ = java.util.Collections.emptyList(); - } else { - security_ = null; - securityBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000200); - if (tagsBuilder_ == null) { - tags_ = java.util.Collections.emptyList(); - } else { - tags_ = null; - tagsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000400); - externalDocs_ = null; - if (externalDocsBuilder_ != null) { - externalDocsBuilder_.dispose(); - externalDocsBuilder_ = null; - } - internalGetMutableExtensions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Swagger build() { - grpc.gateway.protoc_gen_openapiv2.options.Swagger result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Swagger buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Swagger result = new grpc.gateway.protoc_gen_openapiv2.options.Swagger(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Swagger result) { - if (((bitField0_ & 0x00000010) != 0)) { - schemes_ = java.util.Collections.unmodifiableList(schemes_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.schemes_ = schemes_; - if (securityBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { - security_ = java.util.Collections.unmodifiableList(security_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.security_ = security_; - } else { - result.security_ = securityBuilder_.build(); - } - if (tagsBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { - tags_ = java.util.Collections.unmodifiableList(tags_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.tags_ = tags_; - } else { - result.tags_ = tagsBuilder_.build(); - } - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Swagger result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.swagger_ = swagger_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.info_ = infoBuilder_ == null - ? info_ - : infoBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.host_ = host_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.basePath_ = basePath_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - consumes_.makeImmutable(); - result.consumes_ = consumes_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - produces_.makeImmutable(); - result.produces_ = produces_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.responses_ = internalGetResponses().build(ResponsesDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.securityDefinitions_ = securityDefinitionsBuilder_ == null - ? securityDefinitions_ - : securityDefinitionsBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.externalDocs_ = externalDocsBuilder_ == null - ? externalDocs_ - : externalDocsBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Swagger) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Swagger)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Swagger other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance()) return this; - if (!other.getSwagger().isEmpty()) { - swagger_ = other.swagger_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasInfo()) { - mergeInfo(other.getInfo()); - } - if (!other.getHost().isEmpty()) { - host_ = other.host_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getBasePath().isEmpty()) { - basePath_ = other.basePath_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.schemes_.isEmpty()) { - if (schemes_.isEmpty()) { - schemes_ = other.schemes_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureSchemesIsMutable(); - schemes_.addAll(other.schemes_); - } - onChanged(); - } - if (!other.consumes_.isEmpty()) { - if (consumes_.isEmpty()) { - consumes_ = other.consumes_; - bitField0_ |= 0x00000020; - } else { - ensureConsumesIsMutable(); - consumes_.addAll(other.consumes_); - } - onChanged(); - } - if (!other.produces_.isEmpty()) { - if (produces_.isEmpty()) { - produces_ = other.produces_; - bitField0_ |= 0x00000040; - } else { - ensureProducesIsMutable(); - produces_.addAll(other.produces_); - } - onChanged(); - } - internalGetMutableResponses().mergeFrom( - other.internalGetResponses()); - bitField0_ |= 0x00000080; - if (other.hasSecurityDefinitions()) { - mergeSecurityDefinitions(other.getSecurityDefinitions()); - } - if (securityBuilder_ == null) { - if (!other.security_.isEmpty()) { - if (security_.isEmpty()) { - security_ = other.security_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureSecurityIsMutable(); - security_.addAll(other.security_); - } - onChanged(); - } - } else { - if (!other.security_.isEmpty()) { - if (securityBuilder_.isEmpty()) { - securityBuilder_.dispose(); - securityBuilder_ = null; - security_ = other.security_; - bitField0_ = (bitField0_ & ~0x00000200); - securityBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSecurityFieldBuilder() : null; - } else { - securityBuilder_.addAllMessages(other.security_); - } - } - } - if (tagsBuilder_ == null) { - if (!other.tags_.isEmpty()) { - if (tags_.isEmpty()) { - tags_ = other.tags_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureTagsIsMutable(); - tags_.addAll(other.tags_); - } - onChanged(); - } - } else { - if (!other.tags_.isEmpty()) { - if (tagsBuilder_.isEmpty()) { - tagsBuilder_.dispose(); - tagsBuilder_ = null; - tags_ = other.tags_; - bitField0_ = (bitField0_ & ~0x00000400); - tagsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTagsFieldBuilder() : null; - } else { - tagsBuilder_.addAllMessages(other.tags_); - } - } - } - if (other.hasExternalDocs()) { - mergeExternalDocs(other.getExternalDocs()); - } - internalGetMutableExtensions().mergeFrom( - other.internalGetExtensions()); - bitField0_ |= 0x00001000; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - swagger_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getInfoFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - host_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - basePath_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - int tmpRaw = input.readEnum(); - ensureSchemesIsMutable(); - schemes_.add(tmpRaw); - break; - } // case 40 - case 42: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureSchemesIsMutable(); - schemes_.add(tmpRaw); - } - input.popLimit(oldLimit); - break; - } // case 42 - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - ensureConsumesIsMutable(); - consumes_.add(s); - break; - } // case 50 - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - ensureProducesIsMutable(); - produces_.add(s); - break; - } // case 58 - case 82: { - com.google.protobuf.MapEntry - responses__ = input.readMessage( - ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableResponses().ensureBuilderMap().put( - responses__.getKey(), responses__.getValue()); - bitField0_ |= 0x00000080; - break; - } // case 82 - case 90: { - input.readMessage( - getSecurityDefinitionsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 90 - case 98: { - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement m = - input.readMessage( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.parser(), - extensionRegistry); - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(m); - } else { - securityBuilder_.addMessage(m); - } - break; - } // case 98 - case 106: { - grpc.gateway.protoc_gen_openapiv2.options.Tag m = - input.readMessage( - grpc.gateway.protoc_gen_openapiv2.options.Tag.parser(), - extensionRegistry); - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.add(m); - } else { - tagsBuilder_.addMessage(m); - } - break; - } // case 106 - case 114: { - input.readMessage( - getExternalDocsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 114 - case 122: { - com.google.protobuf.MapEntry - extensions__ = input.readMessage( - ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExtensions().ensureBuilderMap().put( - extensions__.getKey(), extensions__.getValue()); - bitField0_ |= 0x00001000; - break; - } // case 122 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object swagger_ = ""; - /** - *
-     * Specifies the OpenAPI Specification version being used. It can be
-     * used by the OpenAPI UI and other clients to interpret the API listing. The
-     * value MUST be "2.0".
-     * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @return The swagger. - */ - public java.lang.String getSwagger() { - java.lang.Object ref = swagger_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - swagger_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Specifies the OpenAPI Specification version being used. It can be
-     * used by the OpenAPI UI and other clients to interpret the API listing. The
-     * value MUST be "2.0".
-     * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @return The bytes for swagger. - */ - public com.google.protobuf.ByteString - getSwaggerBytes() { - java.lang.Object ref = swagger_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - swagger_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Specifies the OpenAPI Specification version being used. It can be
-     * used by the OpenAPI UI and other clients to interpret the API listing. The
-     * value MUST be "2.0".
-     * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @param value The swagger to set. - * @return This builder for chaining. - */ - public Builder setSwagger( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - swagger_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Specifies the OpenAPI Specification version being used. It can be
-     * used by the OpenAPI UI and other clients to interpret the API listing. The
-     * value MUST be "2.0".
-     * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @return This builder for chaining. - */ - public Builder clearSwagger() { - swagger_ = getDefaultInstance().getSwagger(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Specifies the OpenAPI Specification version being used. It can be
-     * used by the OpenAPI UI and other clients to interpret the API listing. The
-     * value MUST be "2.0".
-     * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @param value The bytes for swagger to set. - * @return This builder for chaining. - */ - public Builder setSwaggerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - swagger_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private grpc.gateway.protoc_gen_openapiv2.options.Info info_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Info, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder> infoBuilder_; - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - * @return Whether the info field is set. - */ - public boolean hasInfo() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - * @return The info. - */ - public grpc.gateway.protoc_gen_openapiv2.options.Info getInfo() { - if (infoBuilder_ == null) { - return info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; - } else { - return infoBuilder_.getMessage(); - } - } - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - public Builder setInfo(grpc.gateway.protoc_gen_openapiv2.options.Info value) { - if (infoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - info_ = value; - } else { - infoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - public Builder setInfo( - grpc.gateway.protoc_gen_openapiv2.options.Info.Builder builderForValue) { - if (infoBuilder_ == null) { - info_ = builderForValue.build(); - } else { - infoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - public Builder mergeInfo(grpc.gateway.protoc_gen_openapiv2.options.Info value) { - if (infoBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - info_ != null && - info_ != grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance()) { - getInfoBuilder().mergeFrom(value); - } else { - info_ = value; - } - } else { - infoBuilder_.mergeFrom(value); - } - if (info_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - public Builder clearInfo() { - bitField0_ = (bitField0_ & ~0x00000002); - info_ = null; - if (infoBuilder_ != null) { - infoBuilder_.dispose(); - infoBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Info.Builder getInfoBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getInfoFieldBuilder().getBuilder(); - } - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder() { - if (infoBuilder_ != null) { - return infoBuilder_.getMessageOrBuilder(); - } else { - return info_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; - } - } - /** - *
-     * Provides metadata about the API. The metadata can be used by the
-     * clients if needed.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Info, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder> - getInfoFieldBuilder() { - if (infoBuilder_ == null) { - infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Info, grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder>( - getInfo(), - getParentForChildren(), - isClean()); - info_ = null; - } - return infoBuilder_; - } - - private java.lang.Object host_ = ""; - /** - *
-     * The host (name or ip) serving the API. This MUST be the host only and does
-     * not include the scheme nor sub-paths. It MAY include a port. If the host is
-     * not included, the host serving the documentation is to be used (including
-     * the port). The host does not support path templating.
-     * 
- * - * string host = 3 [json_name = "host"]; - * @return The host. - */ - public java.lang.String getHost() { - java.lang.Object ref = host_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - host_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The host (name or ip) serving the API. This MUST be the host only and does
-     * not include the scheme nor sub-paths. It MAY include a port. If the host is
-     * not included, the host serving the documentation is to be used (including
-     * the port). The host does not support path templating.
-     * 
- * - * string host = 3 [json_name = "host"]; - * @return The bytes for host. - */ - public com.google.protobuf.ByteString - getHostBytes() { - java.lang.Object ref = host_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - host_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The host (name or ip) serving the API. This MUST be the host only and does
-     * not include the scheme nor sub-paths. It MAY include a port. If the host is
-     * not included, the host serving the documentation is to be used (including
-     * the port). The host does not support path templating.
-     * 
- * - * string host = 3 [json_name = "host"]; - * @param value The host to set. - * @return This builder for chaining. - */ - public Builder setHost( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - host_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The host (name or ip) serving the API. This MUST be the host only and does
-     * not include the scheme nor sub-paths. It MAY include a port. If the host is
-     * not included, the host serving the documentation is to be used (including
-     * the port). The host does not support path templating.
-     * 
- * - * string host = 3 [json_name = "host"]; - * @return This builder for chaining. - */ - public Builder clearHost() { - host_ = getDefaultInstance().getHost(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The host (name or ip) serving the API. This MUST be the host only and does
-     * not include the scheme nor sub-paths. It MAY include a port. If the host is
-     * not included, the host serving the documentation is to be used (including
-     * the port). The host does not support path templating.
-     * 
- * - * string host = 3 [json_name = "host"]; - * @param value The bytes for host to set. - * @return This builder for chaining. - */ - public Builder setHostBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - host_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object basePath_ = ""; - /** - *
-     * The base path on which the API is served, which is relative to the host. If
-     * it is not included, the API is served directly under the host. The value
-     * MUST start with a leading slash (/). The basePath does not support path
-     * templating.
-     * Note that using `base_path` does not change the endpoint paths that are
-     * generated in the resulting OpenAPI file. If you wish to use `base_path`
-     * with relatively generated OpenAPI paths, the `base_path` prefix must be
-     * manually removed from your `google.api.http` paths and your code changed to
-     * serve the API from the `base_path`.
-     * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @return The basePath. - */ - public java.lang.String getBasePath() { - java.lang.Object ref = basePath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - basePath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The base path on which the API is served, which is relative to the host. If
-     * it is not included, the API is served directly under the host. The value
-     * MUST start with a leading slash (/). The basePath does not support path
-     * templating.
-     * Note that using `base_path` does not change the endpoint paths that are
-     * generated in the resulting OpenAPI file. If you wish to use `base_path`
-     * with relatively generated OpenAPI paths, the `base_path` prefix must be
-     * manually removed from your `google.api.http` paths and your code changed to
-     * serve the API from the `base_path`.
-     * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @return The bytes for basePath. - */ - public com.google.protobuf.ByteString - getBasePathBytes() { - java.lang.Object ref = basePath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - basePath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The base path on which the API is served, which is relative to the host. If
-     * it is not included, the API is served directly under the host. The value
-     * MUST start with a leading slash (/). The basePath does not support path
-     * templating.
-     * Note that using `base_path` does not change the endpoint paths that are
-     * generated in the resulting OpenAPI file. If you wish to use `base_path`
-     * with relatively generated OpenAPI paths, the `base_path` prefix must be
-     * manually removed from your `google.api.http` paths and your code changed to
-     * serve the API from the `base_path`.
-     * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @param value The basePath to set. - * @return This builder for chaining. - */ - public Builder setBasePath( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - basePath_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The base path on which the API is served, which is relative to the host. If
-     * it is not included, the API is served directly under the host. The value
-     * MUST start with a leading slash (/). The basePath does not support path
-     * templating.
-     * Note that using `base_path` does not change the endpoint paths that are
-     * generated in the resulting OpenAPI file. If you wish to use `base_path`
-     * with relatively generated OpenAPI paths, the `base_path` prefix must be
-     * manually removed from your `google.api.http` paths and your code changed to
-     * serve the API from the `base_path`.
-     * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @return This builder for chaining. - */ - public Builder clearBasePath() { - basePath_ = getDefaultInstance().getBasePath(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * The base path on which the API is served, which is relative to the host. If
-     * it is not included, the API is served directly under the host. The value
-     * MUST start with a leading slash (/). The basePath does not support path
-     * templating.
-     * Note that using `base_path` does not change the endpoint paths that are
-     * generated in the resulting OpenAPI file. If you wish to use `base_path`
-     * with relatively generated OpenAPI paths, the `base_path` prefix must be
-     * manually removed from your `google.api.http` paths and your code changed to
-     * serve the API from the `base_path`.
-     * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @param value The bytes for basePath to set. - * @return This builder for chaining. - */ - public Builder setBasePathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - basePath_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.util.List schemes_ = - java.util.Collections.emptyList(); - private void ensureSchemesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - schemes_ = new java.util.ArrayList(schemes_); - bitField0_ |= 0x00000010; - } - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return A list containing the schemes. - */ - public java.util.List getSchemesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return The count of schemes. - */ - public int getSchemesCount() { - return schemes_.size(); - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param index The index of the element to return. - * @return The schemes at the given index. - */ - public grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { - return schemes_converter_.convert(schemes_.get(index)); - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param index The index to set the value at. - * @param value The schemes to set. - * @return This builder for chaining. - */ - public Builder setSchemes( - int index, grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchemesIsMutable(); - schemes_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param value The schemes to add. - * @return This builder for chaining. - */ - public Builder addSchemes(grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSchemesIsMutable(); - schemes_.add(value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param values The schemes to add. - * @return This builder for chaining. - */ - public Builder addAllSchemes( - java.lang.Iterable values) { - ensureSchemesIsMutable(); - for (grpc.gateway.protoc_gen_openapiv2.options.Scheme value : values) { - schemes_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return This builder for chaining. - */ - public Builder clearSchemes() { - schemes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return A list containing the enum numeric values on the wire for schemes. - */ - public java.util.List - getSchemesValueList() { - return java.util.Collections.unmodifiableList(schemes_); - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of schemes at the given index. - */ - public int getSchemesValue(int index) { - return schemes_.get(index); - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for schemes to set. - * @return This builder for chaining. - */ - public Builder setSchemesValue( - int index, int value) { - ensureSchemesIsMutable(); - schemes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param value The enum numeric value on the wire for schemes to add. - * @return This builder for chaining. - */ - public Builder addSchemesValue(int value) { - ensureSchemesIsMutable(); - schemes_.add(value); - onChanged(); - return this; - } - /** - *
-     * The transfer protocol of the API. Values MUST be from the list: "http",
-     * "https", "ws", "wss". If the schemes is not included, the default scheme to
-     * be used is the one used to access the OpenAPI definition itself.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param values The enum numeric values on the wire for schemes to add. - * @return This builder for chaining. - */ - public Builder addAllSchemesValue( - java.lang.Iterable values) { - ensureSchemesIsMutable(); - for (int value : values) { - schemes_.add(value); - } - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureConsumesIsMutable() { - if (!consumes_.isModifiable()) { - consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return A list containing the consumes. - */ - public com.google.protobuf.ProtocolStringList - getConsumesList() { - consumes_.makeImmutable(); - return consumes_; - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return The count of consumes. - */ - public int getConsumesCount() { - return consumes_.size(); - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the element to return. - * @return The consumes at the given index. - */ - public java.lang.String getConsumes(int index) { - return consumes_.get(index); - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the value to return. - * @return The bytes of the consumes at the given index. - */ - public com.google.protobuf.ByteString - getConsumesBytes(int index) { - return consumes_.getByteString(index); - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index to set the value at. - * @param value The consumes to set. - * @return This builder for chaining. - */ - public Builder setConsumes( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureConsumesIsMutable(); - consumes_.set(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param value The consumes to add. - * @return This builder for chaining. - */ - public Builder addConsumes( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureConsumesIsMutable(); - consumes_.add(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param values The consumes to add. - * @return This builder for chaining. - */ - public Builder addAllConsumes( - java.lang.Iterable values) { - ensureConsumesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, consumes_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return This builder for chaining. - */ - public Builder clearConsumes() { - consumes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020);; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the APIs can consume. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param value The bytes of the consumes to add. - * @return This builder for chaining. - */ - public Builder addConsumesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureConsumesIsMutable(); - consumes_.add(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureProducesIsMutable() { - if (!produces_.isModifiable()) { - produces_ = new com.google.protobuf.LazyStringArrayList(produces_); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return A list containing the produces. - */ - public com.google.protobuf.ProtocolStringList - getProducesList() { - produces_.makeImmutable(); - return produces_; - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return The count of produces. - */ - public int getProducesCount() { - return produces_.size(); - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the element to return. - * @return The produces at the given index. - */ - public java.lang.String getProduces(int index) { - return produces_.get(index); - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the value to return. - * @return The bytes of the produces at the given index. - */ - public com.google.protobuf.ByteString - getProducesBytes(int index) { - return produces_.getByteString(index); - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index to set the value at. - * @param value The produces to set. - * @return This builder for chaining. - */ - public Builder setProduces( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureProducesIsMutable(); - produces_.set(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param value The produces to add. - * @return This builder for chaining. - */ - public Builder addProduces( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureProducesIsMutable(); - produces_.add(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param values The produces to add. - * @return This builder for chaining. - */ - public Builder addAllProduces( - java.lang.Iterable values) { - ensureProducesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, produces_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return This builder for chaining. - */ - public Builder clearProduces() { - produces_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040);; - onChanged(); - return this; - } - /** - *
-     * A list of MIME types the APIs can produce. This is global to all APIs but
-     * can be overridden on specific API calls. Value MUST be as described under
-     * Mime Types.
-     * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param value The bytes of the produces to add. - * @return This builder for chaining. - */ - public Builder addProducesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureProducesIsMutable(); - produces_.add(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private static final class ResponsesConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response build(grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder val) { - if (val instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { return (grpc.gateway.protoc_gen_openapiv2.options.Response) val; } - return ((grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ResponsesDefaultEntryHolder.defaultEntry; - } - }; - private static final ResponsesConverter responsesConverter = new ResponsesConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder, grpc.gateway.protoc_gen_openapiv2.options.Response, grpc.gateway.protoc_gen_openapiv2.options.Response.Builder> responses_; - private com.google.protobuf.MapFieldBuilder - internalGetResponses() { - if (responses_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(responsesConverter); - } - return responses_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableResponses() { - if (responses_ == null) { - responses_ = new com.google.protobuf.MapFieldBuilder<>(responsesConverter); - } - bitField0_ |= 0x00000080; - onChanged(); - return responses_; - } - public int getResponsesCount() { - return internalGetResponses().ensureBuilderMap().size(); - } - /** - *
-     * An object to hold responses that can be used across operations. This
-     * property does not define global responses for all operations.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - @java.lang.Override - public boolean containsResponses( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResponses().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getResponsesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResponses() { - return getResponsesMap(); - } - /** - *
-     * An object to hold responses that can be used across operations. This
-     * property does not define global responses for all operations.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - @java.lang.Override - public java.util.Map getResponsesMap() { - return internalGetResponses().getImmutableMap(); - } - /** - *
-     * An object to hold responses that can be used across operations. This
-     * property does not define global responses for all operations.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - @java.lang.Override - public /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); - return map.containsKey(key) ? responsesConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * An object to hold responses that can be used across operations. This
-     * property does not define global responses for all operations.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return responsesConverter.build(map.get(key)); - } - public Builder clearResponses() { - bitField0_ = (bitField0_ & ~0x00000080); - internalGetMutableResponses().clear(); - return this; - } - /** - *
-     * An object to hold responses that can be used across operations. This
-     * property does not define global responses for all operations.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - public Builder removeResponses( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableResponses().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableResponses() { - bitField0_ |= 0x00000080; - return internalGetMutableResponses().ensureMessageMap(); - } - /** - *
-     * An object to hold responses that can be used across operations. This
-     * property does not define global responses for all operations.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - public Builder putResponses( - java.lang.String key, - grpc.gateway.protoc_gen_openapiv2.options.Response value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableResponses().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000080; - return this; - } - /** - *
-     * An object to hold responses that can be used across operations. This
-     * property does not define global responses for all operations.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - public Builder putAllResponses( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableResponses().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000080; - return this; - } - /** - *
-     * An object to hold responses that can be used across operations. This
-     * property does not define global responses for all operations.
-     * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Response.Builder putResponsesBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableResponses().ensureBuilderMap(); - grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof grpc.gateway.protoc_gen_openapiv2.options.Response) { - entry = ((grpc.gateway.protoc_gen_openapiv2.options.Response) entry).toBuilder(); - builderMap.put(key, entry); - } - return (grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) entry; - } - - private grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions securityDefinitions_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder> securityDefinitionsBuilder_; - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - * @return Whether the securityDefinitions field is set. - */ - public boolean hasSecurityDefinitions() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - * @return The securityDefinitions. - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions() { - if (securityDefinitionsBuilder_ == null) { - return securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; - } else { - return securityDefinitionsBuilder_.getMessage(); - } - } - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - public Builder setSecurityDefinitions(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions value) { - if (securityDefinitionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - securityDefinitions_ = value; - } else { - securityDefinitionsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - public Builder setSecurityDefinitions( - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder builderForValue) { - if (securityDefinitionsBuilder_ == null) { - securityDefinitions_ = builderForValue.build(); - } else { - securityDefinitionsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - public Builder mergeSecurityDefinitions(grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions value) { - if (securityDefinitionsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) && - securityDefinitions_ != null && - securityDefinitions_ != grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance()) { - getSecurityDefinitionsBuilder().mergeFrom(value); - } else { - securityDefinitions_ = value; - } - } else { - securityDefinitionsBuilder_.mergeFrom(value); - } - if (securityDefinitions_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - public Builder clearSecurityDefinitions() { - bitField0_ = (bitField0_ & ~0x00000100); - securityDefinitions_ = null; - if (securityDefinitionsBuilder_ != null) { - securityDefinitionsBuilder_.dispose(); - securityDefinitionsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder getSecurityDefinitionsBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return getSecurityDefinitionsFieldBuilder().getBuilder(); - } - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder() { - if (securityDefinitionsBuilder_ != null) { - return securityDefinitionsBuilder_.getMessageOrBuilder(); - } else { - return securityDefinitions_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; - } - } - /** - *
-     * Security scheme definitions that can be used across the specification.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder> - getSecurityDefinitionsFieldBuilder() { - if (securityDefinitionsBuilder_ == null) { - securityDefinitionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder>( - getSecurityDefinitions(), - getParentForChildren(), - isClean()); - securityDefinitions_ = null; - } - return securityDefinitionsBuilder_; - } - - private java.util.List security_ = - java.util.Collections.emptyList(); - private void ensureSecurityIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - security_ = new java.util.ArrayList(security_); - bitField0_ |= 0x00000200; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> securityBuilder_; - - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public java.util.List getSecurityList() { - if (securityBuilder_ == null) { - return java.util.Collections.unmodifiableList(security_); - } else { - return securityBuilder_.getMessageList(); - } - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public int getSecurityCount() { - if (securityBuilder_ == null) { - return security_.size(); - } else { - return securityBuilder_.getCount(); - } - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { - if (securityBuilder_ == null) { - return security_.get(index); - } else { - return securityBuilder_.getMessage(index); - } - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder setSecurity( - int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { - if (securityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSecurityIsMutable(); - security_.set(index, value); - onChanged(); - } else { - securityBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder setSecurity( - int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.set(index, builderForValue.build()); - onChanged(); - } else { - securityBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addSecurity(grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { - if (securityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSecurityIsMutable(); - security_.add(value); - onChanged(); - } else { - securityBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addSecurity( - int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { - if (securityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSecurityIsMutable(); - security_.add(index, value); - onChanged(); - } else { - securityBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addSecurity( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(builderForValue.build()); - onChanged(); - } else { - securityBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addSecurity( - int index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(index, builderForValue.build()); - onChanged(); - } else { - securityBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder addAllSecurity( - java.lang.Iterable values) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, security_); - onChanged(); - } else { - securityBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder clearSecurity() { - if (securityBuilder_ == null) { - security_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - } else { - securityBuilder_.clear(); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public Builder removeSecurity(int index) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.remove(index); - onChanged(); - } else { - securityBuilder_.remove(index); - } - return this; - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder getSecurityBuilder( - int index) { - return getSecurityFieldBuilder().getBuilder(index); - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( - int index) { - if (securityBuilder_ == null) { - return security_.get(index); } else { - return securityBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public java.util.List - getSecurityOrBuilderList() { - if (securityBuilder_ != null) { - return securityBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(security_); - } - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder() { - return getSecurityFieldBuilder().addBuilder( - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder( - int index) { - return getSecurityFieldBuilder().addBuilder( - index, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); - } - /** - *
-     * A declaration of which security schemes are applied for the API as a whole.
-     * The list of values describes alternative security schemes that can be used
-     * (that is, there is a logical OR between the security requirements).
-     * Individual operations can override this definition.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - public java.util.List - getSecurityBuilderList() { - return getSecurityFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> - getSecurityFieldBuilder() { - if (securityBuilder_ == null) { - securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder>( - security_, - ((bitField0_ & 0x00000200) != 0), - getParentForChildren(), - isClean()); - security_ = null; - } - return securityBuilder_; - } - - private java.util.List tags_ = - java.util.Collections.emptyList(); - private void ensureTagsIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { - tags_ = new java.util.ArrayList(tags_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Tag, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder> tagsBuilder_; - - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public java.util.List getTagsList() { - if (tagsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tags_); - } else { - return tagsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public int getTagsCount() { - if (tagsBuilder_ == null) { - return tags_.size(); - } else { - return tagsBuilder_.getCount(); - } - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index) { - if (tagsBuilder_ == null) { - return tags_.get(index); - } else { - return tagsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder setTags( - int index, grpc.gateway.protoc_gen_openapiv2.options.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.set(index, value); - onChanged(); - } else { - tagsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder setTags( - int index, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.set(index, builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder addTags(grpc.gateway.protoc_gen_openapiv2.options.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(value); - onChanged(); - } else { - tagsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder addTags( - int index, grpc.gateway.protoc_gen_openapiv2.options.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(index, value); - onChanged(); - } else { - tagsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder addTags( - grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.add(builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder addTags( - int index, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.add(index, builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder addAllTags( - java.lang.Iterable values) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tags_); - onChanged(); - } else { - tagsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder clearTags() { - if (tagsBuilder_ == null) { - tags_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - tagsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public Builder removeTags(int index) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.remove(index); - onChanged(); - } else { - tagsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder getTagsBuilder( - int index) { - return getTagsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( - int index) { - if (tagsBuilder_ == null) { - return tags_.get(index); } else { - return tagsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public java.util.List - getTagsOrBuilderList() { - if (tagsBuilder_ != null) { - return tagsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tags_); - } - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder addTagsBuilder() { - return getTagsFieldBuilder().addBuilder( - grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder addTagsBuilder( - int index) { - return getTagsFieldBuilder().addBuilder( - index, grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); - } - /** - *
-     * A list of tags for API documentation control. Tags can be used for logical
-     * grouping of operations by resources or any other qualifier.
-     * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - public java.util.List - getTagsBuilderList() { - return getTagsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Tag, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder> - getTagsFieldBuilder() { - if (tagsBuilder_ == null) { - tagsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.Tag, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder>( - tags_, - ((bitField0_ & 0x00000400) != 0), - getParentForChildren(), - isClean()); - tags_ = null; - } - return tagsBuilder_; - } - - private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - public boolean hasExternalDocs() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { - if (externalDocsBuilder_ == null) { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } else { - return externalDocsBuilder_.getMessage(); - } - } - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { - if (externalDocsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - externalDocs_ = value; - } else { - externalDocsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - public Builder setExternalDocs( - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { - if (externalDocsBuilder_ == null) { - externalDocs_ = builderForValue.build(); - } else { - externalDocsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { - if (externalDocsBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) && - externalDocs_ != null && - externalDocs_ != grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { - getExternalDocsBuilder().mergeFrom(value); - } else { - externalDocs_ = value; - } - } else { - externalDocsBuilder_.mergeFrom(value); - } - if (externalDocs_ != null) { - bitField0_ |= 0x00000800; - onChanged(); - } - return this; - } - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - public Builder clearExternalDocs() { - bitField0_ = (bitField0_ & ~0x00000800); - externalDocs_ = null; - if (externalDocsBuilder_ != null) { - externalDocsBuilder_.dispose(); - externalDocsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return getExternalDocsFieldBuilder().getBuilder(); - } - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { - if (externalDocsBuilder_ != null) { - return externalDocsBuilder_.getMessageOrBuilder(); - } else { - return externalDocs_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - } - /** - *
-     * Additional external documentation.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> - getExternalDocsFieldBuilder() { - if (externalDocsBuilder_ == null) { - externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( - getExternalDocs(), - getParentForChildren(), - isClean()); - externalDocs_ = null; - } - return externalDocsBuilder_; - } - - private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ExtensionsDefaultEntryHolder.defaultEntry; - } - }; - private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; - private com.google.protobuf.MapFieldBuilder - internalGetExtensions() { - if (extensions_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - return extensions_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableExtensions() { - if (extensions_ == null) { - extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - bitField0_ |= 0x00001000; - onChanged(); - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().ensureBuilderMap().size(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getImmutableMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return extensionsConverter.build(map.get(key)); - } - public Builder clearExtensions() { - bitField0_ = (bitField0_ & ~0x00001000); - internalGetMutableExtensions().clear(); - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - public Builder removeExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtensions().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExtensions() { - bitField0_ |= 0x00001000; - return internalGetMutableExtensions().ensureMessageMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - public Builder putExtensions( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableExtensions().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00001000; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - public Builder putAllExtensions( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableExtensions().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00001000; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Swagger) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Swagger) - private static final grpc.gateway.protoc_gen_openapiv2.options.Swagger DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Swagger(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Swagger parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java deleted file mode 100644 index 4a29212a..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java +++ /dev/null @@ -1,568 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface SwaggerOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Swagger) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Specifies the OpenAPI Specification version being used. It can be
-   * used by the OpenAPI UI and other clients to interpret the API listing. The
-   * value MUST be "2.0".
-   * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @return The swagger. - */ - java.lang.String getSwagger(); - /** - *
-   * Specifies the OpenAPI Specification version being used. It can be
-   * used by the OpenAPI UI and other clients to interpret the API listing. The
-   * value MUST be "2.0".
-   * 
- * - * string swagger = 1 [json_name = "swagger"]; - * @return The bytes for swagger. - */ - com.google.protobuf.ByteString - getSwaggerBytes(); - - /** - *
-   * Provides metadata about the API. The metadata can be used by the
-   * clients if needed.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - * @return Whether the info field is set. - */ - boolean hasInfo(); - /** - *
-   * Provides metadata about the API. The metadata can be used by the
-   * clients if needed.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - * @return The info. - */ - grpc.gateway.protoc_gen_openapiv2.options.Info getInfo(); - /** - *
-   * Provides metadata about the API. The metadata can be used by the
-   * clients if needed.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder(); - - /** - *
-   * The host (name or ip) serving the API. This MUST be the host only and does
-   * not include the scheme nor sub-paths. It MAY include a port. If the host is
-   * not included, the host serving the documentation is to be used (including
-   * the port). The host does not support path templating.
-   * 
- * - * string host = 3 [json_name = "host"]; - * @return The host. - */ - java.lang.String getHost(); - /** - *
-   * The host (name or ip) serving the API. This MUST be the host only and does
-   * not include the scheme nor sub-paths. It MAY include a port. If the host is
-   * not included, the host serving the documentation is to be used (including
-   * the port). The host does not support path templating.
-   * 
- * - * string host = 3 [json_name = "host"]; - * @return The bytes for host. - */ - com.google.protobuf.ByteString - getHostBytes(); - - /** - *
-   * The base path on which the API is served, which is relative to the host. If
-   * it is not included, the API is served directly under the host. The value
-   * MUST start with a leading slash (/). The basePath does not support path
-   * templating.
-   * Note that using `base_path` does not change the endpoint paths that are
-   * generated in the resulting OpenAPI file. If you wish to use `base_path`
-   * with relatively generated OpenAPI paths, the `base_path` prefix must be
-   * manually removed from your `google.api.http` paths and your code changed to
-   * serve the API from the `base_path`.
-   * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @return The basePath. - */ - java.lang.String getBasePath(); - /** - *
-   * The base path on which the API is served, which is relative to the host. If
-   * it is not included, the API is served directly under the host. The value
-   * MUST start with a leading slash (/). The basePath does not support path
-   * templating.
-   * Note that using `base_path` does not change the endpoint paths that are
-   * generated in the resulting OpenAPI file. If you wish to use `base_path`
-   * with relatively generated OpenAPI paths, the `base_path` prefix must be
-   * manually removed from your `google.api.http` paths and your code changed to
-   * serve the API from the `base_path`.
-   * 
- * - * string base_path = 4 [json_name = "basePath"]; - * @return The bytes for basePath. - */ - com.google.protobuf.ByteString - getBasePathBytes(); - - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return A list containing the schemes. - */ - java.util.List getSchemesList(); - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return The count of schemes. - */ - int getSchemesCount(); - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param index The index of the element to return. - * @return The schemes at the given index. - */ - grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index); - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @return A list containing the enum numeric values on the wire for schemes. - */ - java.util.List - getSchemesValueList(); - /** - *
-   * The transfer protocol of the API. Values MUST be from the list: "http",
-   * "https", "ws", "wss". If the schemes is not included, the default scheme to
-   * be used is the one used to access the OpenAPI definition itself.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of schemes at the given index. - */ - int getSchemesValue(int index); - - /** - *
-   * A list of MIME types the APIs can consume. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return A list containing the consumes. - */ - java.util.List - getConsumesList(); - /** - *
-   * A list of MIME types the APIs can consume. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @return The count of consumes. - */ - int getConsumesCount(); - /** - *
-   * A list of MIME types the APIs can consume. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the element to return. - * @return The consumes at the given index. - */ - java.lang.String getConsumes(int index); - /** - *
-   * A list of MIME types the APIs can consume. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string consumes = 6 [json_name = "consumes"]; - * @param index The index of the value to return. - * @return The bytes of the consumes at the given index. - */ - com.google.protobuf.ByteString - getConsumesBytes(int index); - - /** - *
-   * A list of MIME types the APIs can produce. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return A list containing the produces. - */ - java.util.List - getProducesList(); - /** - *
-   * A list of MIME types the APIs can produce. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @return The count of produces. - */ - int getProducesCount(); - /** - *
-   * A list of MIME types the APIs can produce. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the element to return. - * @return The produces at the given index. - */ - java.lang.String getProduces(int index); - /** - *
-   * A list of MIME types the APIs can produce. This is global to all APIs but
-   * can be overridden on specific API calls. Value MUST be as described under
-   * Mime Types.
-   * 
- * - * repeated string produces = 7 [json_name = "produces"]; - * @param index The index of the value to return. - * @return The bytes of the produces at the given index. - */ - com.google.protobuf.ByteString - getProducesBytes(int index); - - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - int getResponsesCount(); - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - boolean containsResponses( - java.lang.String key); - /** - * Use {@link #getResponsesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getResponses(); - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - java.util.Map - getResponsesMap(); - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( - java.lang.String key, - /* nullable */ -grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue); - /** - *
-   * An object to hold responses that can be used across operations. This
-   * property does not define global responses for all operations.
-   * 
- * - * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( - java.lang.String key); - - /** - *
-   * Security scheme definitions that can be used across the specification.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - * @return Whether the securityDefinitions field is set. - */ - boolean hasSecurityDefinitions(); - /** - *
-   * Security scheme definitions that can be used across the specification.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - * @return The securityDefinitions. - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions(); - /** - *
-   * Security scheme definitions that can be used across the specification.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder(); - - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - java.util.List - getSecurityList(); - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index); - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - int getSecurityCount(); - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - java.util.List - getSecurityOrBuilderList(); - /** - *
-   * A declaration of which security schemes are applied for the API as a whole.
-   * The list of values describes alternative security schemes that can be used
-   * (that is, there is a logical OR between the security requirements).
-   * Individual operations can override this definition.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( - int index); - - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - java.util.List - getTagsList(); - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index); - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - int getTagsCount(); - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - java.util.List - getTagsOrBuilderList(); - /** - *
-   * A list of tags for API documentation control. Tags can be used for logical
-   * grouping of operations by resources or any other qualifier.
-   * 
- * - * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( - int index); - - /** - *
-   * Additional external documentation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - boolean hasExternalDocs(); - /** - *
-   * Additional external documentation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); - /** - *
-   * Additional external documentation.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); - - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - int getExtensionsCount(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - boolean containsExtensions( - java.lang.String key); - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExtensions(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - java.util.Map - getExtensionsMap(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; - */ - com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Tag.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Tag.java deleted file mode 100644 index 0b64e715..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/Tag.java +++ /dev/null @@ -1,1386 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -/** - *
- * `Tag` is a representation of OpenAPI v2 specification's Tag object.
- *
- * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
- * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Tag} - */ -public final class Tag extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Tag) - TagOrBuilder { -private static final long serialVersionUID = 0L; - // Use Tag.newBuilder() to construct. - private Tag(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Tag() { - name_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Tag(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Tag.class, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The name of the tag. Use it to allow override of the name of a
-   * global Tag object, then use that name to reference the tag throughout the
-   * OpenAPI file.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the tag. Use it to allow override of the name of a
-   * global Tag object, then use that name to reference the tag throughout the
-   * OpenAPI file.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - *
-   * A short description for the tag. GFM syntax can be used for rich text
-   * representation.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A short description for the tag. GFM syntax can be used for rich text
-   * representation.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTERNAL_DOCS_FIELD_NUMBER = 3; - private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; - /** - *
-   * Additional external documentation for this tag.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - @java.lang.Override - public boolean hasExternalDocs() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Additional external documentation for this tag.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - /** - *
-   * Additional external documentation for this tag.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - - public static final int EXTENSIONS_FIELD_NUMBER = 4; - private static final class ExtensionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> extensions_; - private com.google.protobuf.MapField - internalGetExtensions() { - if (extensions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExtensionsDefaultEntryHolder.defaultEntry); - } - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().getMap().size(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().getMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getMap(); - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetExtensions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getExternalDocs()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetExtensions(), - ExtensionsDefaultEntryHolder.defaultEntry, - 4); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getExternalDocs()); - } - for (java.util.Map.Entry entry - : internalGetExtensions().getMap().entrySet()) { - com.google.protobuf.MapEntry - extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, extensions__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Tag)) { - return super.equals(obj); - } - grpc.gateway.protoc_gen_openapiv2.options.Tag other = (grpc.gateway.protoc_gen_openapiv2.options.Tag) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasExternalDocs() != other.hasExternalDocs()) return false; - if (hasExternalDocs()) { - if (!getExternalDocs() - .equals(other.getExternalDocs())) return false; - } - if (!internalGetExtensions().equals( - other.internalGetExtensions())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasExternalDocs()) { - hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; - hash = (53 * hash) + getExternalDocs().hashCode(); - } - if (!internalGetExtensions().getMap().isEmpty()) { - hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetExtensions().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Tag prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * `Tag` is a representation of OpenAPI v2 specification's Tag object.
-   *
-   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
-   * 
- * - * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Tag} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Tag) - grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetMutableExtensions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable - .ensureFieldAccessorsInitialized( - grpc.gateway.protoc_gen_openapiv2.options.Tag.class, grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder.class); - } - - // Construct using grpc.gateway.protoc_gen_openapiv2.options.Tag.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getExternalDocsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - description_ = ""; - externalDocs_ = null; - if (externalDocsBuilder_ != null) { - externalDocsBuilder_.dispose(); - externalDocsBuilder_ = null; - } - internalGetMutableExtensions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstanceForType() { - return grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance(); - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Tag build() { - grpc.gateway.protoc_gen_openapiv2.options.Tag result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Tag buildPartial() { - grpc.gateway.protoc_gen_openapiv2.options.Tag result = new grpc.gateway.protoc_gen_openapiv2.options.Tag(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Tag result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.externalDocs_ = externalDocsBuilder_ == null - ? externalDocs_ - : externalDocsBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Tag) { - return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Tag)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Tag other) { - if (other == grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasExternalDocs()) { - mergeExternalDocs(other.getExternalDocs()); - } - internalGetMutableExtensions().mergeFrom( - other.internalGetExtensions()); - bitField0_ |= 0x00000008; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getExternalDocsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - com.google.protobuf.MapEntry - extensions__ = input.readMessage( - ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExtensions().ensureBuilderMap().put( - extensions__.getKey(), extensions__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the tag. Use it to allow override of the name of a
-     * global Tag object, then use that name to reference the tag throughout the
-     * OpenAPI file.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the tag. Use it to allow override of the name of a
-     * global Tag object, then use that name to reference the tag throughout the
-     * OpenAPI file.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the tag. Use it to allow override of the name of a
-     * global Tag object, then use that name to reference the tag throughout the
-     * OpenAPI file.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The name of the tag. Use it to allow override of the name of a
-     * global Tag object, then use that name to reference the tag throughout the
-     * OpenAPI file.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The name of the tag. Use it to allow override of the name of a
-     * global Tag object, then use that name to reference the tag throughout the
-     * OpenAPI file.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * A short description for the tag. GFM syntax can be used for rich text
-     * representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A short description for the tag. GFM syntax can be used for rich text
-     * representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A short description for the tag. GFM syntax can be used for rich text
-     * representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * A short description for the tag. GFM syntax can be used for rich text
-     * representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A short description for the tag. GFM syntax can be used for rich text
-     * representation.
-     * 
- * - * string description = 2 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - public boolean hasExternalDocs() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { - if (externalDocsBuilder_ == null) { - return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } else { - return externalDocsBuilder_.getMessage(); - } - } - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { - if (externalDocsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - externalDocs_ = value; - } else { - externalDocsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - public Builder setExternalDocs( - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { - if (externalDocsBuilder_ == null) { - externalDocs_ = builderForValue.build(); - } else { - externalDocsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { - if (externalDocsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - externalDocs_ != null && - externalDocs_ != grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { - getExternalDocsBuilder().mergeFrom(value); - } else { - externalDocs_ = value; - } - } else { - externalDocsBuilder_.mergeFrom(value); - } - if (externalDocs_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - public Builder clearExternalDocs() { - bitField0_ = (bitField0_ & ~0x00000004); - externalDocs_ = null; - if (externalDocsBuilder_ != null) { - externalDocsBuilder_.dispose(); - externalDocsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getExternalDocsFieldBuilder().getBuilder(); - } - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - public grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { - if (externalDocsBuilder_ != null) { - return externalDocsBuilder_.getMessageOrBuilder(); - } else { - return externalDocs_ == null ? - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; - } - } - /** - *
-     * Additional external documentation for this tag.
-     * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> - getExternalDocsFieldBuilder() { - if (externalDocsBuilder_ == null) { - externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( - getExternalDocs(), - getParentForChildren(), - isClean()); - externalDocs_ = null; - } - return externalDocsBuilder_; - } - - private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ExtensionsDefaultEntryHolder.defaultEntry; - } - }; - private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; - private com.google.protobuf.MapFieldBuilder - internalGetExtensions() { - if (extensions_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - return extensions_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableExtensions() { - if (extensions_ == null) { - extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); - } - bitField0_ |= 0x00000008; - onChanged(); - return extensions_; - } - public int getExtensionsCount() { - return internalGetExtensions().ensureBuilderMap().size(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - @java.lang.Override - public boolean containsExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetExtensions().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getExtensions() { - return getExtensionsMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - @java.lang.Override - public java.util.Map getExtensionsMap() { - return internalGetExtensions().getImmutableMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - @java.lang.Override - public com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return extensionsConverter.build(map.get(key)); - } - public Builder clearExtensions() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableExtensions().clear(); - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - public Builder removeExtensions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableExtensions().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableExtensions() { - bitField0_ |= 0x00000008; - return internalGetMutableExtensions().ensureMessageMap(); - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - public Builder putExtensions( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableExtensions().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000008; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - public Builder putAllExtensions( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableExtensions().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000008; - return this; - } - /** - *
-     * Custom properties that start with "x-" such as "x-foo" used to describe
-     * extra functionality that is not covered by the standard OpenAPI Specification.
-     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-     * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Tag) - } - - // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Tag) - private static final grpc.gateway.protoc_gen_openapiv2.options.Tag DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Tag(); - } - - public static grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Tag parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java b/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java deleted file mode 100644 index 4d300a7f..00000000 --- a/protocol/src/main/java/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java +++ /dev/null @@ -1,147 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: protoc-gen-openapiv2/options/openapiv2.proto - -// Protobuf Java Version: 3.25.3 -package grpc.gateway.protoc_gen_openapiv2.options; - -public interface TagOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Tag) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the tag. Use it to allow override of the name of a
-   * global Tag object, then use that name to reference the tag throughout the
-   * OpenAPI file.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the tag. Use it to allow override of the name of a
-   * global Tag object, then use that name to reference the tag throughout the
-   * OpenAPI file.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A short description for the tag. GFM syntax can be used for rich text
-   * representation.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A short description for the tag. GFM syntax can be used for rich text
-   * representation.
-   * 
- * - * string description = 2 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Additional external documentation for this tag.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - * @return Whether the externalDocs field is set. - */ - boolean hasExternalDocs(); - /** - *
-   * Additional external documentation for this tag.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - * @return The externalDocs. - */ - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); - /** - *
-   * Additional external documentation for this tag.
-   * 
- * - * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; - */ - grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); - - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - int getExtensionsCount(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - boolean containsExtensions( - java.lang.String key); - /** - * Use {@link #getExtensionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getExtensions(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - java.util.Map - getExtensionsMap(); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - /* nullable */ -com.google.protobuf.Value getExtensionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - *
-   * Custom properties that start with "x-" such as "x-foo" used to describe
-   * extra functionality that is not covered by the standard OpenAPI Specification.
-   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
-   * 
- * - * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; - */ - com.google.protobuf.Value getExtensionsOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationProto.java b/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationProto.java deleted file mode 100644 index 6df17b73..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationProto.java +++ /dev/null @@ -1,220 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public final class AuthorizationProto { - private AuthorizationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_Entity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_Entity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_EntityCustom_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_EntityCustom_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_EntityChain_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_EntityChain_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_DecisionRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_DecisionRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_DecisionResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_DecisionResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_GetDecisionsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_GetDecisionsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_GetDecisionsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_GetDecisionsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_GetEntitlementsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_GetEntitlementsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_EntityEntitlements_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_EntityEntitlements_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_ResourceAttribute_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_ResourceAttribute_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_GetEntitlementsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n!authorization/authorization.proto\022\raut" + - "horization\032\034google/api/annotations.proto" + - "\032\031google/protobuf/any.proto\032\024policy/obje" + - "cts.proto\"\226\002\n\006Entity\022\016\n\002id\030\001 \001(\tR\002id\022%\n\r" + - "email_address\030\002 \001(\tH\000R\014emailAddress\022\035\n\tu" + - "ser_name\030\003 \001(\tH\000R\010userName\022,\n\021remote_cla" + - "ims_url\030\004 \001(\tH\000R\017remoteClaimsUrl\022\022\n\003jwt\030" + - "\005 \001(\tH\000R\003jwt\022.\n\006claims\030\006 \001(\0132\024.google.pr" + - "otobuf.AnyH\000R\006claims\0225\n\006custom\030\007 \001(\0132\033.a" + - "uthorization.EntityCustomH\000R\006customB\r\n\013e" + - "ntity_type\"B\n\014EntityCustom\0222\n\textension\030" + - "\001 \001(\0132\024.google.protobuf.AnyR\textension\"P" + - "\n\013EntityChain\022\016\n\002id\030\001 \001(\tR\002id\0221\n\010entitie" + - "s\030\002 \003(\0132\025.authorization.EntityR\010entities" + - "\"\317\001\n\017DecisionRequest\022(\n\007actions\030\001 \003(\0132\016." + - "policy.ActionR\007actions\022?\n\rentity_chains\030" + - "\002 \003(\0132\032.authorization.EntityChainR\014entit" + - "yChains\022Q\n\023resource_attributes\030\003 \003(\0132 .a" + - "uthorization.ResourceAttributeR\022resource" + - "Attributes\"\316\002\n\020DecisionResponse\022&\n\017entit" + - "y_chain_id\030\001 \001(\tR\rentityChainId\0224\n\026resou" + - "rce_attributes_id\030\002 \001(\tR\024resourceAttribu" + - "tesId\022&\n\006action\030\003 \001(\0132\016.policy.ActionR\006a" + - "ction\022D\n\010decision\030\004 \001(\0162(.authorization." + - "DecisionResponse.DecisionR\010decision\022 \n\013o" + - "bligations\030\005 \003(\tR\013obligations\"L\n\010Decisio" + - "n\022\030\n\024DECISION_UNSPECIFIED\020\000\022\021\n\rDECISION_" + - "DENY\020\001\022\023\n\017DECISION_PERMIT\020\002\"b\n\023GetDecisi" + - "onsRequest\022K\n\021decision_requests\030\001 \003(\0132\036." + - "authorization.DecisionRequestR\020decisionR" + - "equests\"f\n\024GetDecisionsResponse\022N\n\022decis" + - "ion_responses\030\001 \003(\0132\037.authorization.Deci" + - "sionResponseR\021decisionResponses\"\222\001\n\026GetE" + - "ntitlementsRequest\0221\n\010entities\030\001 \003(\0132\025.a" + - "uthorization.EntityR\010entities\022;\n\005scope\030\002" + - " \001(\0132 .authorization.ResourceAttributeH\000" + - "R\005scope\210\001\001B\010\n\006_scope\"T\n\022EntityEntitlemen" + - "ts\022\033\n\tentity_id\030\001 \001(\tR\010entityId\022!\n\014attri" + - "bute_id\030\002 \003(\tR\013attributeId\":\n\021ResourceAt" + - "tribute\022%\n\016attribute_fqns\030\002 \003(\tR\rattribu" + - "teFqns\"`\n\027GetEntitlementsResponse\022E\n\014ent" + - "itlements\030\001 \003(\0132!.authorization.EntityEn" + - "titlementsR\014entitlements2\206\002\n\024Authorizati" + - "onService\022r\n\014GetDecisions\022\".authorizatio" + - "n.GetDecisionsRequest\032#.authorization.Ge" + - "tDecisionsResponse\"\031\202\323\344\223\002\023\"\021/v1/authoriz" + - "ation\022z\n\017GetEntitlements\022%.authorization" + - ".GetEntitlementsRequest\032&.authorization." + - "GetEntitlementsResponse\"\030\202\323\344\223\002\022\"\020/v1/ent" + - "itlementsB\213\001\n!io.opentdf.platform.author" + - "izationB\022AuthorizationProtoP\001\242\002\003AXX\252\002\rAu" + - "thorization\312\002\rAuthorization\342\002\031Authorizat" + - "ion\\GPBMetadata\352\002\rAuthorizationb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - io.opentdf.platform.policy.ObjectsProto.getDescriptor(), - }); - internal_static_authorization_Entity_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_authorization_Entity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_Entity_descriptor, - new java.lang.String[] { "Id", "EmailAddress", "UserName", "RemoteClaimsUrl", "Jwt", "Claims", "Custom", "EntityType", }); - internal_static_authorization_EntityCustom_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_authorization_EntityCustom_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_EntityCustom_descriptor, - new java.lang.String[] { "Extension", }); - internal_static_authorization_EntityChain_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_authorization_EntityChain_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_EntityChain_descriptor, - new java.lang.String[] { "Id", "Entities", }); - internal_static_authorization_DecisionRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_authorization_DecisionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_DecisionRequest_descriptor, - new java.lang.String[] { "Actions", "EntityChains", "ResourceAttributes", }); - internal_static_authorization_DecisionResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_authorization_DecisionResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_DecisionResponse_descriptor, - new java.lang.String[] { "EntityChainId", "ResourceAttributesId", "Action", "Decision", "Obligations", }); - internal_static_authorization_GetDecisionsRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_authorization_GetDecisionsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_GetDecisionsRequest_descriptor, - new java.lang.String[] { "DecisionRequests", }); - internal_static_authorization_GetDecisionsResponse_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_authorization_GetDecisionsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_GetDecisionsResponse_descriptor, - new java.lang.String[] { "DecisionResponses", }); - internal_static_authorization_GetEntitlementsRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_authorization_GetEntitlementsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_GetEntitlementsRequest_descriptor, - new java.lang.String[] { "Entities", "Scope", }); - internal_static_authorization_EntityEntitlements_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_authorization_EntityEntitlements_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_EntityEntitlements_descriptor, - new java.lang.String[] { "EntityId", "AttributeId", }); - internal_static_authorization_ResourceAttribute_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_authorization_ResourceAttribute_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_ResourceAttribute_descriptor, - new java.lang.String[] { "AttributeFqns", }); - internal_static_authorization_GetEntitlementsResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_GetEntitlementsResponse_descriptor, - new java.lang.String[] { "Entitlements", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - io.opentdf.platform.policy.ObjectsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationServiceGrpc.java deleted file mode 100644 index cee6cc34..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/AuthorizationServiceGrpc.java +++ /dev/null @@ -1,367 +0,0 @@ -package io.opentdf.platform.authorization; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.61.1)", - comments = "Source: authorization/authorization.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class AuthorizationServiceGrpc { - - private AuthorizationServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "authorization.AuthorizationService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetDecisionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDecisions", - requestType = io.opentdf.platform.authorization.GetDecisionsRequest.class, - responseType = io.opentdf.platform.authorization.GetDecisionsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetDecisionsMethod() { - io.grpc.MethodDescriptor getGetDecisionsMethod; - if ((getGetDecisionsMethod = AuthorizationServiceGrpc.getGetDecisionsMethod) == null) { - synchronized (AuthorizationServiceGrpc.class) { - if ((getGetDecisionsMethod = AuthorizationServiceGrpc.getGetDecisionsMethod) == null) { - AuthorizationServiceGrpc.getGetDecisionsMethod = getGetDecisionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDecisions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.authorization.GetDecisionsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.authorization.GetDecisionsResponse.getDefaultInstance())) - .setSchemaDescriptor(new AuthorizationServiceMethodDescriptorSupplier("GetDecisions")) - .build(); - } - } - } - return getGetDecisionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetEntitlementsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetEntitlements", - requestType = io.opentdf.platform.authorization.GetEntitlementsRequest.class, - responseType = io.opentdf.platform.authorization.GetEntitlementsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetEntitlementsMethod() { - io.grpc.MethodDescriptor getGetEntitlementsMethod; - if ((getGetEntitlementsMethod = AuthorizationServiceGrpc.getGetEntitlementsMethod) == null) { - synchronized (AuthorizationServiceGrpc.class) { - if ((getGetEntitlementsMethod = AuthorizationServiceGrpc.getGetEntitlementsMethod) == null) { - AuthorizationServiceGrpc.getGetEntitlementsMethod = getGetEntitlementsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEntitlements")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.authorization.GetEntitlementsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.authorization.GetEntitlementsResponse.getDefaultInstance())) - .setSchemaDescriptor(new AuthorizationServiceMethodDescriptorSupplier("GetEntitlements")) - .build(); - } - } - } - return getGetEntitlementsMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static AuthorizationServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AuthorizationServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AuthorizationServiceStub(channel, callOptions); - } - }; - return AuthorizationServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static AuthorizationServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AuthorizationServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AuthorizationServiceBlockingStub(channel, callOptions); - } - }; - return AuthorizationServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static AuthorizationServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AuthorizationServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AuthorizationServiceFutureStub(channel, callOptions); - } - }; - return AuthorizationServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public interface AsyncService { - - /** - */ - default void getDecisions(io.opentdf.platform.authorization.GetDecisionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDecisionsMethod(), responseObserver); - } - - /** - */ - default void getEntitlements(io.opentdf.platform.authorization.GetEntitlementsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetEntitlementsMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service AuthorizationService. - */ - public static abstract class AuthorizationServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return AuthorizationServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service AuthorizationService. - */ - public static final class AuthorizationServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private AuthorizationServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AuthorizationServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AuthorizationServiceStub(channel, callOptions); - } - - /** - */ - public void getDecisions(io.opentdf.platform.authorization.GetDecisionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetDecisionsMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void getEntitlements(io.opentdf.platform.authorization.GetEntitlementsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetEntitlementsMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service AuthorizationService. - */ - public static final class AuthorizationServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private AuthorizationServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AuthorizationServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AuthorizationServiceBlockingStub(channel, callOptions); - } - - /** - */ - public io.opentdf.platform.authorization.GetDecisionsResponse getDecisions(io.opentdf.platform.authorization.GetDecisionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetDecisionsMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.authorization.GetEntitlementsResponse getEntitlements(io.opentdf.platform.authorization.GetEntitlementsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetEntitlementsMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service AuthorizationService. - */ - public static final class AuthorizationServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private AuthorizationServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AuthorizationServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AuthorizationServiceFutureStub(channel, callOptions); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getDecisions( - io.opentdf.platform.authorization.GetDecisionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetDecisionsMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getEntitlements( - io.opentdf.platform.authorization.GetEntitlementsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetEntitlementsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_DECISIONS = 0; - private static final int METHODID_GET_ENTITLEMENTS = 1; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_GET_DECISIONS: - serviceImpl.getDecisions((io.opentdf.platform.authorization.GetDecisionsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ENTITLEMENTS: - serviceImpl.getEntitlements((io.opentdf.platform.authorization.GetEntitlementsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetDecisionsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.authorization.GetDecisionsRequest, - io.opentdf.platform.authorization.GetDecisionsResponse>( - service, METHODID_GET_DECISIONS))) - .addMethod( - getGetEntitlementsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.authorization.GetEntitlementsRequest, - io.opentdf.platform.authorization.GetEntitlementsResponse>( - service, METHODID_GET_ENTITLEMENTS))) - .build(); - } - - private static abstract class AuthorizationServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - AuthorizationServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("AuthorizationService"); - } - } - - private static final class AuthorizationServiceFileDescriptorSupplier - extends AuthorizationServiceBaseDescriptorSupplier { - AuthorizationServiceFileDescriptorSupplier() {} - } - - private static final class AuthorizationServiceMethodDescriptorSupplier - extends AuthorizationServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - AuthorizationServiceMethodDescriptorSupplier(java.lang.String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (AuthorizationServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AuthorizationServiceFileDescriptorSupplier()) - .addMethod(getGetDecisionsMethod()) - .addMethod(getGetEntitlementsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequest.java b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequest.java deleted file mode 100644 index c5b90013..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequest.java +++ /dev/null @@ -1,1552 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - *
- *
- *Example Request Get Decisions to answer the question -  Do Bob (represented by entity chain ec1)
- *and Alice (represented by entity chain ec2) have TRANSMIT authorization for
- *2 resources; resource1 (attr-set-1) defined by attributes foo:bar  resource2 (attr-set-2) defined by attribute foo:bar, color:red ?
- *
- *{
- *"actions": [
- *{
- *"standard": "STANDARD_ACTION_TRANSMIT"
- *}
- *],
- *"entityChains": [
- *{
- *"id": "ec1",
- *"entities": [
- *{
- *"emailAddress": "bob@example.org"
- *}
- *]
- *},
- *{
- *"id": "ec2",
- *"entities": [
- *{
- *"userName": "alice@example.org"
- *}
- *]
- *}
- *],
- *"resourceAttributes": [
- *{
- *"attributeFqns": [
- *"https://www.example.org/attr/foo/value/value1"
- *]
- *},
- *{
- *"attributeFqns": [
- *"https://example.net/attr/attr1/value/value1",
- *"https://example.net/attr/attr1/value/value2"
- *]
- *}
- *]
- *}
- * 
- * - * Protobuf type {@code authorization.DecisionRequest} - */ -public final class DecisionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.DecisionRequest) - DecisionRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DecisionRequest.newBuilder() to construct. - private DecisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DecisionRequest() { - actions_ = java.util.Collections.emptyList(); - entityChains_ = java.util.Collections.emptyList(); - resourceAttributes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DecisionRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.DecisionRequest.class, io.opentdf.platform.authorization.DecisionRequest.Builder.class); - } - - public static final int ACTIONS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List actions_; - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.Action getActions(int index) { - return actions_.get(index); - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); - } - - public static final int ENTITY_CHAINS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List entityChains_; - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - @java.lang.Override - public java.util.List getEntityChainsList() { - return entityChains_; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - @java.lang.Override - public java.util.List - getEntityChainsOrBuilderList() { - return entityChains_; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - @java.lang.Override - public int getEntityChainsCount() { - return entityChains_.size(); - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityChain getEntityChains(int index) { - return entityChains_.get(index); - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityChainOrBuilder getEntityChainsOrBuilder( - int index) { - return entityChains_.get(index); - } - - public static final int RESOURCE_ATTRIBUTES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List resourceAttributes_; - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - @java.lang.Override - public java.util.List getResourceAttributesList() { - return resourceAttributes_; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - @java.lang.Override - public java.util.List - getResourceAttributesOrBuilderList() { - return resourceAttributes_; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - @java.lang.Override - public int getResourceAttributesCount() { - return resourceAttributes_.size(); - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index) { - return resourceAttributes_.get(index); - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( - int index) { - return resourceAttributes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(1, actions_.get(i)); - } - for (int i = 0; i < entityChains_.size(); i++) { - output.writeMessage(2, entityChains_.get(i)); - } - for (int i = 0; i < resourceAttributes_.size(); i++) { - output.writeMessage(3, resourceAttributes_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, actions_.get(i)); - } - for (int i = 0; i < entityChains_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, entityChains_.get(i)); - } - for (int i = 0; i < resourceAttributes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, resourceAttributes_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.DecisionRequest)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.DecisionRequest other = (io.opentdf.platform.authorization.DecisionRequest) obj; - - if (!getActionsList() - .equals(other.getActionsList())) return false; - if (!getEntityChainsList() - .equals(other.getEntityChainsList())) return false; - if (!getResourceAttributesList() - .equals(other.getResourceAttributesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - if (getEntityChainsCount() > 0) { - hash = (37 * hash) + ENTITY_CHAINS_FIELD_NUMBER; - hash = (53 * hash) + getEntityChainsList().hashCode(); - } - if (getResourceAttributesCount() > 0) { - hash = (37 * hash) + RESOURCE_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getResourceAttributesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.DecisionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.DecisionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.DecisionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.DecisionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.DecisionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *Example Request Get Decisions to answer the question -  Do Bob (represented by entity chain ec1)
-   *and Alice (represented by entity chain ec2) have TRANSMIT authorization for
-   *2 resources; resource1 (attr-set-1) defined by attributes foo:bar  resource2 (attr-set-2) defined by attribute foo:bar, color:red ?
-   *
-   *{
-   *"actions": [
-   *{
-   *"standard": "STANDARD_ACTION_TRANSMIT"
-   *}
-   *],
-   *"entityChains": [
-   *{
-   *"id": "ec1",
-   *"entities": [
-   *{
-   *"emailAddress": "bob@example.org"
-   *}
-   *]
-   *},
-   *{
-   *"id": "ec2",
-   *"entities": [
-   *{
-   *"userName": "alice@example.org"
-   *}
-   *]
-   *}
-   *],
-   *"resourceAttributes": [
-   *{
-   *"attributeFqns": [
-   *"https://www.example.org/attr/foo/value/value1"
-   *]
-   *},
-   *{
-   *"attributeFqns": [
-   *"https://example.net/attr/attr1/value/value1",
-   *"https://example.net/attr/attr1/value/value2"
-   *]
-   *}
-   *]
-   *}
-   * 
- * - * Protobuf type {@code authorization.DecisionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.DecisionRequest) - io.opentdf.platform.authorization.DecisionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.DecisionRequest.class, io.opentdf.platform.authorization.DecisionRequest.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.DecisionRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - } else { - actions_ = null; - actionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (entityChainsBuilder_ == null) { - entityChains_ = java.util.Collections.emptyList(); - } else { - entityChains_ = null; - entityChainsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (resourceAttributesBuilder_ == null) { - resourceAttributes_ = java.util.Collections.emptyList(); - } else { - resourceAttributes_ = null; - resourceAttributesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.DecisionRequest getDefaultInstanceForType() { - return io.opentdf.platform.authorization.DecisionRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.DecisionRequest build() { - io.opentdf.platform.authorization.DecisionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.DecisionRequest buildPartial() { - io.opentdf.platform.authorization.DecisionRequest result = new io.opentdf.platform.authorization.DecisionRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.authorization.DecisionRequest result) { - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } - if (entityChainsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - entityChains_ = java.util.Collections.unmodifiableList(entityChains_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.entityChains_ = entityChains_; - } else { - result.entityChains_ = entityChainsBuilder_.build(); - } - if (resourceAttributesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - resourceAttributes_ = java.util.Collections.unmodifiableList(resourceAttributes_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.resourceAttributes_ = resourceAttributes_; - } else { - result.resourceAttributes_ = resourceAttributesBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.authorization.DecisionRequest result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.DecisionRequest) { - return mergeFrom((io.opentdf.platform.authorization.DecisionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.DecisionRequest other) { - if (other == io.opentdf.platform.authorization.DecisionRequest.getDefaultInstance()) return this; - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000001); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } - } - } - if (entityChainsBuilder_ == null) { - if (!other.entityChains_.isEmpty()) { - if (entityChains_.isEmpty()) { - entityChains_ = other.entityChains_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureEntityChainsIsMutable(); - entityChains_.addAll(other.entityChains_); - } - onChanged(); - } - } else { - if (!other.entityChains_.isEmpty()) { - if (entityChainsBuilder_.isEmpty()) { - entityChainsBuilder_.dispose(); - entityChainsBuilder_ = null; - entityChains_ = other.entityChains_; - bitField0_ = (bitField0_ & ~0x00000002); - entityChainsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEntityChainsFieldBuilder() : null; - } else { - entityChainsBuilder_.addAllMessages(other.entityChains_); - } - } - } - if (resourceAttributesBuilder_ == null) { - if (!other.resourceAttributes_.isEmpty()) { - if (resourceAttributes_.isEmpty()) { - resourceAttributes_ = other.resourceAttributes_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureResourceAttributesIsMutable(); - resourceAttributes_.addAll(other.resourceAttributes_); - } - onChanged(); - } - } else { - if (!other.resourceAttributes_.isEmpty()) { - if (resourceAttributesBuilder_.isEmpty()) { - resourceAttributesBuilder_.dispose(); - resourceAttributesBuilder_ = null; - resourceAttributes_ = other.resourceAttributes_; - bitField0_ = (bitField0_ & ~0x00000004); - resourceAttributesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResourceAttributesFieldBuilder() : null; - } else { - resourceAttributesBuilder_.addAllMessages(other.resourceAttributes_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.Action m = - input.readMessage( - io.opentdf.platform.policy.Action.parser(), - extensionRegistry); - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(m); - } else { - actionsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: { - io.opentdf.platform.authorization.EntityChain m = - input.readMessage( - io.opentdf.platform.authorization.EntityChain.parser(), - extensionRegistry); - if (entityChainsBuilder_ == null) { - ensureEntityChainsIsMutable(); - entityChains_.add(m); - } else { - entityChainsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - io.opentdf.platform.authorization.ResourceAttribute m = - input.readMessage( - io.opentdf.platform.authorization.ResourceAttribute.parser(), - extensionRegistry); - if (resourceAttributesBuilder_ == null) { - ensureResourceAttributesIsMutable(); - resourceAttributes_.add(m); - } else { - resourceAttributesBuilder_.addMessage(m); - } - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionsBuilder_; - - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder addActions(io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder addActions( - io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - io.opentdf.platform.policy.Action.getDefaultInstance()); - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Action.getDefaultInstance()); - } - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } - - private java.util.List entityChains_ = - java.util.Collections.emptyList(); - private void ensureEntityChainsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - entityChains_ = new java.util.ArrayList(entityChains_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.EntityChain, io.opentdf.platform.authorization.EntityChain.Builder, io.opentdf.platform.authorization.EntityChainOrBuilder> entityChainsBuilder_; - - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public java.util.List getEntityChainsList() { - if (entityChainsBuilder_ == null) { - return java.util.Collections.unmodifiableList(entityChains_); - } else { - return entityChainsBuilder_.getMessageList(); - } - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public int getEntityChainsCount() { - if (entityChainsBuilder_ == null) { - return entityChains_.size(); - } else { - return entityChainsBuilder_.getCount(); - } - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public io.opentdf.platform.authorization.EntityChain getEntityChains(int index) { - if (entityChainsBuilder_ == null) { - return entityChains_.get(index); - } else { - return entityChainsBuilder_.getMessage(index); - } - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder setEntityChains( - int index, io.opentdf.platform.authorization.EntityChain value) { - if (entityChainsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntityChainsIsMutable(); - entityChains_.set(index, value); - onChanged(); - } else { - entityChainsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder setEntityChains( - int index, io.opentdf.platform.authorization.EntityChain.Builder builderForValue) { - if (entityChainsBuilder_ == null) { - ensureEntityChainsIsMutable(); - entityChains_.set(index, builderForValue.build()); - onChanged(); - } else { - entityChainsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder addEntityChains(io.opentdf.platform.authorization.EntityChain value) { - if (entityChainsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntityChainsIsMutable(); - entityChains_.add(value); - onChanged(); - } else { - entityChainsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder addEntityChains( - int index, io.opentdf.platform.authorization.EntityChain value) { - if (entityChainsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntityChainsIsMutable(); - entityChains_.add(index, value); - onChanged(); - } else { - entityChainsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder addEntityChains( - io.opentdf.platform.authorization.EntityChain.Builder builderForValue) { - if (entityChainsBuilder_ == null) { - ensureEntityChainsIsMutable(); - entityChains_.add(builderForValue.build()); - onChanged(); - } else { - entityChainsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder addEntityChains( - int index, io.opentdf.platform.authorization.EntityChain.Builder builderForValue) { - if (entityChainsBuilder_ == null) { - ensureEntityChainsIsMutable(); - entityChains_.add(index, builderForValue.build()); - onChanged(); - } else { - entityChainsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder addAllEntityChains( - java.lang.Iterable values) { - if (entityChainsBuilder_ == null) { - ensureEntityChainsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, entityChains_); - onChanged(); - } else { - entityChainsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder clearEntityChains() { - if (entityChainsBuilder_ == null) { - entityChains_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - entityChainsBuilder_.clear(); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public Builder removeEntityChains(int index) { - if (entityChainsBuilder_ == null) { - ensureEntityChainsIsMutable(); - entityChains_.remove(index); - onChanged(); - } else { - entityChainsBuilder_.remove(index); - } - return this; - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public io.opentdf.platform.authorization.EntityChain.Builder getEntityChainsBuilder( - int index) { - return getEntityChainsFieldBuilder().getBuilder(index); - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public io.opentdf.platform.authorization.EntityChainOrBuilder getEntityChainsOrBuilder( - int index) { - if (entityChainsBuilder_ == null) { - return entityChains_.get(index); } else { - return entityChainsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public java.util.List - getEntityChainsOrBuilderList() { - if (entityChainsBuilder_ != null) { - return entityChainsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(entityChains_); - } - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public io.opentdf.platform.authorization.EntityChain.Builder addEntityChainsBuilder() { - return getEntityChainsFieldBuilder().addBuilder( - io.opentdf.platform.authorization.EntityChain.getDefaultInstance()); - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public io.opentdf.platform.authorization.EntityChain.Builder addEntityChainsBuilder( - int index) { - return getEntityChainsFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.EntityChain.getDefaultInstance()); - } - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - public java.util.List - getEntityChainsBuilderList() { - return getEntityChainsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.EntityChain, io.opentdf.platform.authorization.EntityChain.Builder, io.opentdf.platform.authorization.EntityChainOrBuilder> - getEntityChainsFieldBuilder() { - if (entityChainsBuilder_ == null) { - entityChainsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.EntityChain, io.opentdf.platform.authorization.EntityChain.Builder, io.opentdf.platform.authorization.EntityChainOrBuilder>( - entityChains_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - entityChains_ = null; - } - return entityChainsBuilder_; - } - - private java.util.List resourceAttributes_ = - java.util.Collections.emptyList(); - private void ensureResourceAttributesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - resourceAttributes_ = new java.util.ArrayList(resourceAttributes_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> resourceAttributesBuilder_; - - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public java.util.List getResourceAttributesList() { - if (resourceAttributesBuilder_ == null) { - return java.util.Collections.unmodifiableList(resourceAttributes_); - } else { - return resourceAttributesBuilder_.getMessageList(); - } - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public int getResourceAttributesCount() { - if (resourceAttributesBuilder_ == null) { - return resourceAttributes_.size(); - } else { - return resourceAttributesBuilder_.getCount(); - } - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index) { - if (resourceAttributesBuilder_ == null) { - return resourceAttributes_.get(index); - } else { - return resourceAttributesBuilder_.getMessage(index); - } - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder setResourceAttributes( - int index, io.opentdf.platform.authorization.ResourceAttribute value) { - if (resourceAttributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceAttributesIsMutable(); - resourceAttributes_.set(index, value); - onChanged(); - } else { - resourceAttributesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder setResourceAttributes( - int index, io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { - if (resourceAttributesBuilder_ == null) { - ensureResourceAttributesIsMutable(); - resourceAttributes_.set(index, builderForValue.build()); - onChanged(); - } else { - resourceAttributesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder addResourceAttributes(io.opentdf.platform.authorization.ResourceAttribute value) { - if (resourceAttributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceAttributesIsMutable(); - resourceAttributes_.add(value); - onChanged(); - } else { - resourceAttributesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder addResourceAttributes( - int index, io.opentdf.platform.authorization.ResourceAttribute value) { - if (resourceAttributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceAttributesIsMutable(); - resourceAttributes_.add(index, value); - onChanged(); - } else { - resourceAttributesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder addResourceAttributes( - io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { - if (resourceAttributesBuilder_ == null) { - ensureResourceAttributesIsMutable(); - resourceAttributes_.add(builderForValue.build()); - onChanged(); - } else { - resourceAttributesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder addResourceAttributes( - int index, io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { - if (resourceAttributesBuilder_ == null) { - ensureResourceAttributesIsMutable(); - resourceAttributes_.add(index, builderForValue.build()); - onChanged(); - } else { - resourceAttributesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder addAllResourceAttributes( - java.lang.Iterable values) { - if (resourceAttributesBuilder_ == null) { - ensureResourceAttributesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resourceAttributes_); - onChanged(); - } else { - resourceAttributesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder clearResourceAttributes() { - if (resourceAttributesBuilder_ == null) { - resourceAttributes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - resourceAttributesBuilder_.clear(); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public Builder removeResourceAttributes(int index) { - if (resourceAttributesBuilder_ == null) { - ensureResourceAttributesIsMutable(); - resourceAttributes_.remove(index); - onChanged(); - } else { - resourceAttributesBuilder_.remove(index); - } - return this; - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public io.opentdf.platform.authorization.ResourceAttribute.Builder getResourceAttributesBuilder( - int index) { - return getResourceAttributesFieldBuilder().getBuilder(index); - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( - int index) { - if (resourceAttributesBuilder_ == null) { - return resourceAttributes_.get(index); } else { - return resourceAttributesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public java.util.List - getResourceAttributesOrBuilderList() { - if (resourceAttributesBuilder_ != null) { - return resourceAttributesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(resourceAttributes_); - } - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public io.opentdf.platform.authorization.ResourceAttribute.Builder addResourceAttributesBuilder() { - return getResourceAttributesFieldBuilder().addBuilder( - io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()); - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public io.opentdf.platform.authorization.ResourceAttribute.Builder addResourceAttributesBuilder( - int index) { - return getResourceAttributesFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()); - } - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - public java.util.List - getResourceAttributesBuilderList() { - return getResourceAttributesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> - getResourceAttributesFieldBuilder() { - if (resourceAttributesBuilder_ == null) { - resourceAttributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder>( - resourceAttributes_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - resourceAttributes_ = null; - } - return resourceAttributesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.DecisionRequest) - } - - // @@protoc_insertion_point(class_scope:authorization.DecisionRequest) - private static final io.opentdf.platform.authorization.DecisionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.DecisionRequest(); - } - - public static io.opentdf.platform.authorization.DecisionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DecisionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.DecisionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java deleted file mode 100644 index 390c59ac..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface DecisionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.DecisionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - java.util.List - getActionsList(); - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - io.opentdf.platform.policy.Action getActions(int index); - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - int getActionsCount(); - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - java.util.List - getActionsOrBuilderList(); - /** - * repeated .policy.Action actions = 1 [json_name = "actions"]; - */ - io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index); - - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - java.util.List - getEntityChainsList(); - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - io.opentdf.platform.authorization.EntityChain getEntityChains(int index); - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - int getEntityChainsCount(); - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - java.util.List - getEntityChainsOrBuilderList(); - /** - * repeated .authorization.EntityChain entity_chains = 2 [json_name = "entityChains"]; - */ - io.opentdf.platform.authorization.EntityChainOrBuilder getEntityChainsOrBuilder( - int index); - - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - java.util.List - getResourceAttributesList(); - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index); - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - int getResourceAttributesCount(); - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - java.util.List - getResourceAttributesOrBuilderList(); - /** - * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; - */ - io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponse.java b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponse.java deleted file mode 100644 index 19f4c687..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponse.java +++ /dev/null @@ -1,1531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - *
- *
- *
- *Example response for a Decision Request -  Do Bob (represented by entity chain ec1)
- *and Alice (represented by entity chain ec2) have TRANSMIT authorization for
- *2 resources; resource1 (attr-set-1) defined by attributes foo:bar  resource2 (attr-set-2) defined by attribute foo:bar, color:red ?
- *
- *Results:
- *- bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation
- *- bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes
- *- alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes
- *- alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes
- *
- *{
- *"entityChainId":  "ec1",
- *"resourceAttributesId":  "attr-set-1",
- *"decision":  "DECISION_PERMIT",
- *"obligations":  [
- *"http://www.example.org/obligation/watermark"
- *]
- *},
- *{
- *"entityChainId":  "ec1",
- *"resourceAttributesId":  "attr-set-2",
- *"decision":  "DECISION_PERMIT"
- *},
- *{
- *"entityChainId":  "ec2",
- *"resourceAttributesId":  "attr-set-1",
- *"decision":  "DECISION_PERMIT"
- *},
- *{
- *"entityChainId":  "ec2",
- *"resourceAttributesId":  "attr-set-2",
- *"decision":  "DECISION_DENY"
- *}
- * 
- * - * Protobuf type {@code authorization.DecisionResponse} - */ -public final class DecisionResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.DecisionResponse) - DecisionResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DecisionResponse.newBuilder() to construct. - private DecisionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DecisionResponse() { - entityChainId_ = ""; - resourceAttributesId_ = ""; - decision_ = 0; - obligations_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DecisionResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.DecisionResponse.class, io.opentdf.platform.authorization.DecisionResponse.Builder.class); - } - - /** - * Protobuf enum {@code authorization.DecisionResponse.Decision} - */ - public enum Decision - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DECISION_UNSPECIFIED = 0; - */ - DECISION_UNSPECIFIED(0), - /** - * DECISION_DENY = 1; - */ - DECISION_DENY(1), - /** - * DECISION_PERMIT = 2; - */ - DECISION_PERMIT(2), - UNRECOGNIZED(-1), - ; - - /** - * DECISION_UNSPECIFIED = 0; - */ - public static final int DECISION_UNSPECIFIED_VALUE = 0; - /** - * DECISION_DENY = 1; - */ - public static final int DECISION_DENY_VALUE = 1; - /** - * DECISION_PERMIT = 2; - */ - public static final int DECISION_PERMIT_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Decision valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Decision forNumber(int value) { - switch (value) { - case 0: return DECISION_UNSPECIFIED; - case 1: return DECISION_DENY; - case 2: return DECISION_PERMIT; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Decision> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Decision findValueByNumber(int number) { - return Decision.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.opentdf.platform.authorization.DecisionResponse.getDescriptor().getEnumTypes().get(0); - } - - private static final Decision[] VALUES = values(); - - public static Decision valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Decision(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:authorization.DecisionResponse.Decision) - } - - private int bitField0_; - public static final int ENTITY_CHAIN_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object entityChainId_ = ""; - /** - *
-   * ephemeral entity chain id from the request
-   * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @return The entityChainId. - */ - @java.lang.Override - public java.lang.String getEntityChainId() { - java.lang.Object ref = entityChainId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityChainId_ = s; - return s; - } - } - /** - *
-   * ephemeral entity chain id from the request
-   * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @return The bytes for entityChainId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntityChainIdBytes() { - java.lang.Object ref = entityChainId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityChainId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_ATTRIBUTES_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object resourceAttributesId_ = ""; - /** - *
-   * ephemeral resource attributes id from the request
-   * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @return The resourceAttributesId. - */ - @java.lang.Override - public java.lang.String getResourceAttributesId() { - java.lang.Object ref = resourceAttributesId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceAttributesId_ = s; - return s; - } - } - /** - *
-   * ephemeral resource attributes id from the request
-   * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @return The bytes for resourceAttributesId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceAttributesIdBytes() { - java.lang.Object ref = resourceAttributesId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceAttributesId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTION_FIELD_NUMBER = 3; - private io.opentdf.platform.policy.Action action_; - /** - *
-   * Action of the decision response
-   * 
- * - * .policy.Action action = 3 [json_name = "action"]; - * @return Whether the action field is set. - */ - @java.lang.Override - public boolean hasAction() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Action of the decision response
-   * 
- * - * .policy.Action action = 3 [json_name = "action"]; - * @return The action. - */ - @java.lang.Override - public io.opentdf.platform.policy.Action getAction() { - return action_ == null ? io.opentdf.platform.policy.Action.getDefaultInstance() : action_; - } - /** - *
-   * Action of the decision response
-   * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ActionOrBuilder getActionOrBuilder() { - return action_ == null ? io.opentdf.platform.policy.Action.getDefaultInstance() : action_; - } - - public static final int DECISION_FIELD_NUMBER = 4; - private int decision_ = 0; - /** - *
-   * The decision response
-   * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @return The enum numeric value on the wire for decision. - */ - @java.lang.Override public int getDecisionValue() { - return decision_; - } - /** - *
-   * The decision response
-   * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @return The decision. - */ - @java.lang.Override public io.opentdf.platform.authorization.DecisionResponse.Decision getDecision() { - io.opentdf.platform.authorization.DecisionResponse.Decision result = io.opentdf.platform.authorization.DecisionResponse.Decision.forNumber(decision_); - return result == null ? io.opentdf.platform.authorization.DecisionResponse.Decision.UNRECOGNIZED : result; - } - - public static final int OBLIGATIONS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList obligations_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   *optional list of obligations represented in URI format
-   * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @return A list containing the obligations. - */ - public com.google.protobuf.ProtocolStringList - getObligationsList() { - return obligations_; - } - /** - *
-   *optional list of obligations represented in URI format
-   * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @return The count of obligations. - */ - public int getObligationsCount() { - return obligations_.size(); - } - /** - *
-   *optional list of obligations represented in URI format
-   * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param index The index of the element to return. - * @return The obligations at the given index. - */ - public java.lang.String getObligations(int index) { - return obligations_.get(index); - } - /** - *
-   *optional list of obligations represented in URI format
-   * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param index The index of the value to return. - * @return The bytes of the obligations at the given index. - */ - public com.google.protobuf.ByteString - getObligationsBytes(int index) { - return obligations_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityChainId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityChainId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceAttributesId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceAttributesId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getAction()); - } - if (decision_ != io.opentdf.platform.authorization.DecisionResponse.Decision.DECISION_UNSPECIFIED.getNumber()) { - output.writeEnum(4, decision_); - } - for (int i = 0; i < obligations_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, obligations_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityChainId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityChainId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceAttributesId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceAttributesId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAction()); - } - if (decision_ != io.opentdf.platform.authorization.DecisionResponse.Decision.DECISION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, decision_); - } - { - int dataSize = 0; - for (int i = 0; i < obligations_.size(); i++) { - dataSize += computeStringSizeNoTag(obligations_.getRaw(i)); - } - size += dataSize; - size += 1 * getObligationsList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.DecisionResponse)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.DecisionResponse other = (io.opentdf.platform.authorization.DecisionResponse) obj; - - if (!getEntityChainId() - .equals(other.getEntityChainId())) return false; - if (!getResourceAttributesId() - .equals(other.getResourceAttributesId())) return false; - if (hasAction() != other.hasAction()) return false; - if (hasAction()) { - if (!getAction() - .equals(other.getAction())) return false; - } - if (decision_ != other.decision_) return false; - if (!getObligationsList() - .equals(other.getObligationsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENTITY_CHAIN_ID_FIELD_NUMBER; - hash = (53 * hash) + getEntityChainId().hashCode(); - hash = (37 * hash) + RESOURCE_ATTRIBUTES_ID_FIELD_NUMBER; - hash = (53 * hash) + getResourceAttributesId().hashCode(); - if (hasAction()) { - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + getAction().hashCode(); - } - hash = (37 * hash) + DECISION_FIELD_NUMBER; - hash = (53 * hash) + decision_; - if (getObligationsCount() > 0) { - hash = (37 * hash) + OBLIGATIONS_FIELD_NUMBER; - hash = (53 * hash) + getObligationsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.DecisionResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.DecisionResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.DecisionResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.DecisionResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.DecisionResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *
-   *Example response for a Decision Request -  Do Bob (represented by entity chain ec1)
-   *and Alice (represented by entity chain ec2) have TRANSMIT authorization for
-   *2 resources; resource1 (attr-set-1) defined by attributes foo:bar  resource2 (attr-set-2) defined by attribute foo:bar, color:red ?
-   *
-   *Results:
-   *- bob has permitted authorization to transmit for a resource defined by attr-set-1 attributes and has a watermark obligation
-   *- bob has denied authorization to transmit a for a resource defined by attr-set-2 attributes
-   *- alice has permitted authorization to transmit for a resource defined by attr-set-1 attributes
-   *- alice has denied authorization to transmit a for a resource defined by attr-set-2 attributes
-   *
-   *{
-   *"entityChainId":  "ec1",
-   *"resourceAttributesId":  "attr-set-1",
-   *"decision":  "DECISION_PERMIT",
-   *"obligations":  [
-   *"http://www.example.org/obligation/watermark"
-   *]
-   *},
-   *{
-   *"entityChainId":  "ec1",
-   *"resourceAttributesId":  "attr-set-2",
-   *"decision":  "DECISION_PERMIT"
-   *},
-   *{
-   *"entityChainId":  "ec2",
-   *"resourceAttributesId":  "attr-set-1",
-   *"decision":  "DECISION_PERMIT"
-   *},
-   *{
-   *"entityChainId":  "ec2",
-   *"resourceAttributesId":  "attr-set-2",
-   *"decision":  "DECISION_DENY"
-   *}
-   * 
- * - * Protobuf type {@code authorization.DecisionResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.DecisionResponse) - io.opentdf.platform.authorization.DecisionResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.DecisionResponse.class, io.opentdf.platform.authorization.DecisionResponse.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.DecisionResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getActionFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - entityChainId_ = ""; - resourceAttributesId_ = ""; - action_ = null; - if (actionBuilder_ != null) { - actionBuilder_.dispose(); - actionBuilder_ = null; - } - decision_ = 0; - obligations_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_DecisionResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.DecisionResponse getDefaultInstanceForType() { - return io.opentdf.platform.authorization.DecisionResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.DecisionResponse build() { - io.opentdf.platform.authorization.DecisionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.DecisionResponse buildPartial() { - io.opentdf.platform.authorization.DecisionResponse result = new io.opentdf.platform.authorization.DecisionResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.authorization.DecisionResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.entityChainId_ = entityChainId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.resourceAttributesId_ = resourceAttributesId_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.action_ = actionBuilder_ == null - ? action_ - : actionBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.decision_ = decision_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - obligations_.makeImmutable(); - result.obligations_ = obligations_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.DecisionResponse) { - return mergeFrom((io.opentdf.platform.authorization.DecisionResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.DecisionResponse other) { - if (other == io.opentdf.platform.authorization.DecisionResponse.getDefaultInstance()) return this; - if (!other.getEntityChainId().isEmpty()) { - entityChainId_ = other.entityChainId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getResourceAttributesId().isEmpty()) { - resourceAttributesId_ = other.resourceAttributesId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasAction()) { - mergeAction(other.getAction()); - } - if (other.decision_ != 0) { - setDecisionValue(other.getDecisionValue()); - } - if (!other.obligations_.isEmpty()) { - if (obligations_.isEmpty()) { - obligations_ = other.obligations_; - bitField0_ |= 0x00000010; - } else { - ensureObligationsIsMutable(); - obligations_.addAll(other.obligations_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - entityChainId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - resourceAttributesId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getActionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - decision_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - ensureObligationsIsMutable(); - obligations_.add(s); - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object entityChainId_ = ""; - /** - *
-     * ephemeral entity chain id from the request
-     * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @return The entityChainId. - */ - public java.lang.String getEntityChainId() { - java.lang.Object ref = entityChainId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityChainId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * ephemeral entity chain id from the request
-     * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @return The bytes for entityChainId. - */ - public com.google.protobuf.ByteString - getEntityChainIdBytes() { - java.lang.Object ref = entityChainId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityChainId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * ephemeral entity chain id from the request
-     * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @param value The entityChainId to set. - * @return This builder for chaining. - */ - public Builder setEntityChainId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entityChainId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * ephemeral entity chain id from the request
-     * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @return This builder for chaining. - */ - public Builder clearEntityChainId() { - entityChainId_ = getDefaultInstance().getEntityChainId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * ephemeral entity chain id from the request
-     * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @param value The bytes for entityChainId to set. - * @return This builder for chaining. - */ - public Builder setEntityChainIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entityChainId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object resourceAttributesId_ = ""; - /** - *
-     * ephemeral resource attributes id from the request
-     * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @return The resourceAttributesId. - */ - public java.lang.String getResourceAttributesId() { - java.lang.Object ref = resourceAttributesId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceAttributesId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * ephemeral resource attributes id from the request
-     * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @return The bytes for resourceAttributesId. - */ - public com.google.protobuf.ByteString - getResourceAttributesIdBytes() { - java.lang.Object ref = resourceAttributesId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceAttributesId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * ephemeral resource attributes id from the request
-     * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @param value The resourceAttributesId to set. - * @return This builder for chaining. - */ - public Builder setResourceAttributesId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - resourceAttributesId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * ephemeral resource attributes id from the request
-     * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @return This builder for chaining. - */ - public Builder clearResourceAttributesId() { - resourceAttributesId_ = getDefaultInstance().getResourceAttributesId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * ephemeral resource attributes id from the request
-     * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @param value The bytes for resourceAttributesId to set. - * @return This builder for chaining. - */ - public Builder setResourceAttributesIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - resourceAttributesId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.Action action_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionBuilder_; - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - * @return Whether the action field is set. - */ - public boolean hasAction() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - * @return The action. - */ - public io.opentdf.platform.policy.Action getAction() { - if (actionBuilder_ == null) { - return action_ == null ? io.opentdf.platform.policy.Action.getDefaultInstance() : action_; - } else { - return actionBuilder_.getMessage(); - } - } - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - public Builder setAction(io.opentdf.platform.policy.Action value) { - if (actionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - } else { - actionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - public Builder setAction( - io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionBuilder_ == null) { - action_ = builderForValue.build(); - } else { - actionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - public Builder mergeAction(io.opentdf.platform.policy.Action value) { - if (actionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - action_ != null && - action_ != io.opentdf.platform.policy.Action.getDefaultInstance()) { - getActionBuilder().mergeFrom(value); - } else { - action_ = value; - } - } else { - actionBuilder_.mergeFrom(value); - } - if (action_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - public Builder clearAction() { - bitField0_ = (bitField0_ & ~0x00000004); - action_ = null; - if (actionBuilder_ != null) { - actionBuilder_.dispose(); - actionBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - public io.opentdf.platform.policy.Action.Builder getActionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getActionFieldBuilder().getBuilder(); - } - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - public io.opentdf.platform.policy.ActionOrBuilder getActionOrBuilder() { - if (actionBuilder_ != null) { - return actionBuilder_.getMessageOrBuilder(); - } else { - return action_ == null ? - io.opentdf.platform.policy.Action.getDefaultInstance() : action_; - } - } - /** - *
-     * Action of the decision response
-     * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> - getActionFieldBuilder() { - if (actionBuilder_ == null) { - actionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( - getAction(), - getParentForChildren(), - isClean()); - action_ = null; - } - return actionBuilder_; - } - - private int decision_ = 0; - /** - *
-     * The decision response
-     * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @return The enum numeric value on the wire for decision. - */ - @java.lang.Override public int getDecisionValue() { - return decision_; - } - /** - *
-     * The decision response
-     * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @param value The enum numeric value on the wire for decision to set. - * @return This builder for chaining. - */ - public Builder setDecisionValue(int value) { - decision_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The decision response
-     * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @return The decision. - */ - @java.lang.Override - public io.opentdf.platform.authorization.DecisionResponse.Decision getDecision() { - io.opentdf.platform.authorization.DecisionResponse.Decision result = io.opentdf.platform.authorization.DecisionResponse.Decision.forNumber(decision_); - return result == null ? io.opentdf.platform.authorization.DecisionResponse.Decision.UNRECOGNIZED : result; - } - /** - *
-     * The decision response
-     * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @param value The decision to set. - * @return This builder for chaining. - */ - public Builder setDecision(io.opentdf.platform.authorization.DecisionResponse.Decision value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - decision_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The decision response
-     * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @return This builder for chaining. - */ - public Builder clearDecision() { - bitField0_ = (bitField0_ & ~0x00000008); - decision_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList obligations_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureObligationsIsMutable() { - if (!obligations_.isModifiable()) { - obligations_ = new com.google.protobuf.LazyStringArrayList(obligations_); - } - bitField0_ |= 0x00000010; - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @return A list containing the obligations. - */ - public com.google.protobuf.ProtocolStringList - getObligationsList() { - obligations_.makeImmutable(); - return obligations_; - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @return The count of obligations. - */ - public int getObligationsCount() { - return obligations_.size(); - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param index The index of the element to return. - * @return The obligations at the given index. - */ - public java.lang.String getObligations(int index) { - return obligations_.get(index); - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param index The index of the value to return. - * @return The bytes of the obligations at the given index. - */ - public com.google.protobuf.ByteString - getObligationsBytes(int index) { - return obligations_.getByteString(index); - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param index The index to set the value at. - * @param value The obligations to set. - * @return This builder for chaining. - */ - public Builder setObligations( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureObligationsIsMutable(); - obligations_.set(index, value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param value The obligations to add. - * @return This builder for chaining. - */ - public Builder addObligations( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureObligationsIsMutable(); - obligations_.add(value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param values The obligations to add. - * @return This builder for chaining. - */ - public Builder addAllObligations( - java.lang.Iterable values) { - ensureObligationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, obligations_); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @return This builder for chaining. - */ - public Builder clearObligations() { - obligations_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010);; - onChanged(); - return this; - } - /** - *
-     *optional list of obligations represented in URI format
-     * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param value The bytes of the obligations to add. - * @return This builder for chaining. - */ - public Builder addObligationsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureObligationsIsMutable(); - obligations_.add(value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.DecisionResponse) - } - - // @@protoc_insertion_point(class_scope:authorization.DecisionResponse) - private static final io.opentdf.platform.authorization.DecisionResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.DecisionResponse(); - } - - public static io.opentdf.platform.authorization.DecisionResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DecisionResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.DecisionResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponseOrBuilder.java deleted file mode 100644 index 8a9923bd..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/DecisionResponseOrBuilder.java +++ /dev/null @@ -1,137 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface DecisionResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.DecisionResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * ephemeral entity chain id from the request
-   * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @return The entityChainId. - */ - java.lang.String getEntityChainId(); - /** - *
-   * ephemeral entity chain id from the request
-   * 
- * - * string entity_chain_id = 1 [json_name = "entityChainId"]; - * @return The bytes for entityChainId. - */ - com.google.protobuf.ByteString - getEntityChainIdBytes(); - - /** - *
-   * ephemeral resource attributes id from the request
-   * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @return The resourceAttributesId. - */ - java.lang.String getResourceAttributesId(); - /** - *
-   * ephemeral resource attributes id from the request
-   * 
- * - * string resource_attributes_id = 2 [json_name = "resourceAttributesId"]; - * @return The bytes for resourceAttributesId. - */ - com.google.protobuf.ByteString - getResourceAttributesIdBytes(); - - /** - *
-   * Action of the decision response
-   * 
- * - * .policy.Action action = 3 [json_name = "action"]; - * @return Whether the action field is set. - */ - boolean hasAction(); - /** - *
-   * Action of the decision response
-   * 
- * - * .policy.Action action = 3 [json_name = "action"]; - * @return The action. - */ - io.opentdf.platform.policy.Action getAction(); - /** - *
-   * Action of the decision response
-   * 
- * - * .policy.Action action = 3 [json_name = "action"]; - */ - io.opentdf.platform.policy.ActionOrBuilder getActionOrBuilder(); - - /** - *
-   * The decision response
-   * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @return The enum numeric value on the wire for decision. - */ - int getDecisionValue(); - /** - *
-   * The decision response
-   * 
- * - * .authorization.DecisionResponse.Decision decision = 4 [json_name = "decision"]; - * @return The decision. - */ - io.opentdf.platform.authorization.DecisionResponse.Decision getDecision(); - - /** - *
-   *optional list of obligations represented in URI format
-   * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @return A list containing the obligations. - */ - java.util.List - getObligationsList(); - /** - *
-   *optional list of obligations represented in URI format
-   * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @return The count of obligations. - */ - int getObligationsCount(); - /** - *
-   *optional list of obligations represented in URI format
-   * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param index The index of the element to return. - * @return The obligations at the given index. - */ - java.lang.String getObligations(int index); - /** - *
-   *optional list of obligations represented in URI format
-   * 
- * - * repeated string obligations = 5 [json_name = "obligations"]; - * @param index The index of the value to return. - * @return The bytes of the obligations at the given index. - */ - com.google.protobuf.ByteString - getObligationsBytes(int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/Entity.java b/protocol/src/main/java/io/opentdf/platform/authorization/Entity.java deleted file mode 100644 index 2c613b24..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/Entity.java +++ /dev/null @@ -1,1761 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - *
- * PE (Person Entity) or NPE (Non-Person Entity)
- * 
- * - * Protobuf type {@code authorization.Entity} - */ -public final class Entity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.Entity) - EntityOrBuilder { -private static final long serialVersionUID = 0L; - // Use Entity.newBuilder() to construct. - private Entity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Entity() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Entity(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.Entity.class, io.opentdf.platform.authorization.Entity.Builder.class); - } - - private int entityTypeCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object entityType_; - public enum EntityTypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - EMAIL_ADDRESS(2), - USER_NAME(3), - REMOTE_CLAIMS_URL(4), - JWT(5), - CLAIMS(6), - CUSTOM(7), - ENTITYTYPE_NOT_SET(0); - private final int value; - private EntityTypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EntityTypeCase valueOf(int value) { - return forNumber(value); - } - - public static EntityTypeCase forNumber(int value) { - switch (value) { - case 2: return EMAIL_ADDRESS; - case 3: return USER_NAME; - case 4: return REMOTE_CLAIMS_URL; - case 5: return JWT; - case 6: return CLAIMS; - case 7: return CUSTOM; - case 0: return ENTITYTYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public EntityTypeCase - getEntityTypeCase() { - return EntityTypeCase.forNumber( - entityTypeCase_); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * ephemeral id for tracking between request and response
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * ephemeral id for tracking between request and response
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EMAIL_ADDRESS_FIELD_NUMBER = 2; - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return Whether the emailAddress field is set. - */ - public boolean hasEmailAddress() { - return entityTypeCase_ == 2; - } - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return The emailAddress. - */ - public java.lang.String getEmailAddress() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 2) { - ref = entityType_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (entityTypeCase_ == 2) { - entityType_ = s; - } - return s; - } - } - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return The bytes for emailAddress. - */ - public com.google.protobuf.ByteString - getEmailAddressBytes() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 2) { - ref = entityType_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (entityTypeCase_ == 2) { - entityType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int USER_NAME_FIELD_NUMBER = 3; - /** - * string user_name = 3 [json_name = "userName"]; - * @return Whether the userName field is set. - */ - public boolean hasUserName() { - return entityTypeCase_ == 3; - } - /** - * string user_name = 3 [json_name = "userName"]; - * @return The userName. - */ - public java.lang.String getUserName() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 3) { - ref = entityType_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (entityTypeCase_ == 3) { - entityType_ = s; - } - return s; - } - } - /** - * string user_name = 3 [json_name = "userName"]; - * @return The bytes for userName. - */ - public com.google.protobuf.ByteString - getUserNameBytes() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 3) { - ref = entityType_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (entityTypeCase_ == 3) { - entityType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REMOTE_CLAIMS_URL_FIELD_NUMBER = 4; - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return Whether the remoteClaimsUrl field is set. - */ - public boolean hasRemoteClaimsUrl() { - return entityTypeCase_ == 4; - } - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return The remoteClaimsUrl. - */ - public java.lang.String getRemoteClaimsUrl() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 4) { - ref = entityType_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (entityTypeCase_ == 4) { - entityType_ = s; - } - return s; - } - } - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return The bytes for remoteClaimsUrl. - */ - public com.google.protobuf.ByteString - getRemoteClaimsUrlBytes() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 4) { - ref = entityType_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (entityTypeCase_ == 4) { - entityType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JWT_FIELD_NUMBER = 5; - /** - * string jwt = 5 [json_name = "jwt"]; - * @return Whether the jwt field is set. - */ - public boolean hasJwt() { - return entityTypeCase_ == 5; - } - /** - * string jwt = 5 [json_name = "jwt"]; - * @return The jwt. - */ - public java.lang.String getJwt() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 5) { - ref = entityType_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (entityTypeCase_ == 5) { - entityType_ = s; - } - return s; - } - } - /** - * string jwt = 5 [json_name = "jwt"]; - * @return The bytes for jwt. - */ - public com.google.protobuf.ByteString - getJwtBytes() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 5) { - ref = entityType_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (entityTypeCase_ == 5) { - entityType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLAIMS_FIELD_NUMBER = 6; - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - * @return Whether the claims field is set. - */ - @java.lang.Override - public boolean hasClaims() { - return entityTypeCase_ == 6; - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - * @return The claims. - */ - @java.lang.Override - public com.google.protobuf.Any getClaims() { - if (entityTypeCase_ == 6) { - return (com.google.protobuf.Any) entityType_; - } - return com.google.protobuf.Any.getDefaultInstance(); - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getClaimsOrBuilder() { - if (entityTypeCase_ == 6) { - return (com.google.protobuf.Any) entityType_; - } - return com.google.protobuf.Any.getDefaultInstance(); - } - - public static final int CUSTOM_FIELD_NUMBER = 7; - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return entityTypeCase_ == 7; - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - * @return The custom. - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityCustom getCustom() { - if (entityTypeCase_ == 7) { - return (io.opentdf.platform.authorization.EntityCustom) entityType_; - } - return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityCustomOrBuilder getCustomOrBuilder() { - if (entityTypeCase_ == 7) { - return (io.opentdf.platform.authorization.EntityCustom) entityType_; - } - return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (entityTypeCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityType_); - } - if (entityTypeCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entityType_); - } - if (entityTypeCase_ == 4) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, entityType_); - } - if (entityTypeCase_ == 5) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, entityType_); - } - if (entityTypeCase_ == 6) { - output.writeMessage(6, (com.google.protobuf.Any) entityType_); - } - if (entityTypeCase_ == 7) { - output.writeMessage(7, (io.opentdf.platform.authorization.EntityCustom) entityType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (entityTypeCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entityType_); - } - if (entityTypeCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, entityType_); - } - if (entityTypeCase_ == 4) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, entityType_); - } - if (entityTypeCase_ == 5) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, entityType_); - } - if (entityTypeCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (com.google.protobuf.Any) entityType_); - } - if (entityTypeCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (io.opentdf.platform.authorization.EntityCustom) entityType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.Entity)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.Entity other = (io.opentdf.platform.authorization.Entity) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getEntityTypeCase().equals(other.getEntityTypeCase())) return false; - switch (entityTypeCase_) { - case 2: - if (!getEmailAddress() - .equals(other.getEmailAddress())) return false; - break; - case 3: - if (!getUserName() - .equals(other.getUserName())) return false; - break; - case 4: - if (!getRemoteClaimsUrl() - .equals(other.getRemoteClaimsUrl())) return false; - break; - case 5: - if (!getJwt() - .equals(other.getJwt())) return false; - break; - case 6: - if (!getClaims() - .equals(other.getClaims())) return false; - break; - case 7: - if (!getCustom() - .equals(other.getCustom())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - switch (entityTypeCase_) { - case 2: - hash = (37 * hash) + EMAIL_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getEmailAddress().hashCode(); - break; - case 3: - hash = (37 * hash) + USER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getUserName().hashCode(); - break; - case 4: - hash = (37 * hash) + REMOTE_CLAIMS_URL_FIELD_NUMBER; - hash = (53 * hash) + getRemoteClaimsUrl().hashCode(); - break; - case 5: - hash = (37 * hash) + JWT_FIELD_NUMBER; - hash = (53 * hash) + getJwt().hashCode(); - break; - case 6: - hash = (37 * hash) + CLAIMS_FIELD_NUMBER; - hash = (53 * hash) + getClaims().hashCode(); - break; - case 7: - hash = (37 * hash) + CUSTOM_FIELD_NUMBER; - hash = (53 * hash) + getCustom().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.Entity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.Entity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.Entity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.Entity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.Entity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.Entity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.Entity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.Entity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.Entity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.Entity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.Entity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.Entity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.Entity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PE (Person Entity) or NPE (Non-Person Entity)
-   * 
- * - * Protobuf type {@code authorization.Entity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.Entity) - io.opentdf.platform.authorization.EntityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.Entity.class, io.opentdf.platform.authorization.Entity.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.Entity.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - if (claimsBuilder_ != null) { - claimsBuilder_.clear(); - } - if (customBuilder_ != null) { - customBuilder_.clear(); - } - entityTypeCase_ = 0; - entityType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_Entity_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.Entity getDefaultInstanceForType() { - return io.opentdf.platform.authorization.Entity.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.Entity build() { - io.opentdf.platform.authorization.Entity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.Entity buildPartial() { - io.opentdf.platform.authorization.Entity result = new io.opentdf.platform.authorization.Entity(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.authorization.Entity result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - private void buildPartialOneofs(io.opentdf.platform.authorization.Entity result) { - result.entityTypeCase_ = entityTypeCase_; - result.entityType_ = this.entityType_; - if (entityTypeCase_ == 6 && - claimsBuilder_ != null) { - result.entityType_ = claimsBuilder_.build(); - } - if (entityTypeCase_ == 7 && - customBuilder_ != null) { - result.entityType_ = customBuilder_.build(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.Entity) { - return mergeFrom((io.opentdf.platform.authorization.Entity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.Entity other) { - if (other == io.opentdf.platform.authorization.Entity.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - switch (other.getEntityTypeCase()) { - case EMAIL_ADDRESS: { - entityTypeCase_ = 2; - entityType_ = other.entityType_; - onChanged(); - break; - } - case USER_NAME: { - entityTypeCase_ = 3; - entityType_ = other.entityType_; - onChanged(); - break; - } - case REMOTE_CLAIMS_URL: { - entityTypeCase_ = 4; - entityType_ = other.entityType_; - onChanged(); - break; - } - case JWT: { - entityTypeCase_ = 5; - entityType_ = other.entityType_; - onChanged(); - break; - } - case CLAIMS: { - mergeClaims(other.getClaims()); - break; - } - case CUSTOM: { - mergeCustom(other.getCustom()); - break; - } - case ENTITYTYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - entityTypeCase_ = 2; - entityType_ = s; - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - entityTypeCase_ = 3; - entityType_ = s; - break; - } // case 26 - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - entityTypeCase_ = 4; - entityType_ = s; - break; - } // case 34 - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - entityTypeCase_ = 5; - entityType_ = s; - break; - } // case 42 - case 50: { - input.readMessage( - getClaimsFieldBuilder().getBuilder(), - extensionRegistry); - entityTypeCase_ = 6; - break; - } // case 50 - case 58: { - input.readMessage( - getCustomFieldBuilder().getBuilder(), - extensionRegistry); - entityTypeCase_ = 7; - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int entityTypeCase_ = 0; - private java.lang.Object entityType_; - public EntityTypeCase - getEntityTypeCase() { - return EntityTypeCase.forNumber( - entityTypeCase_); - } - - public Builder clearEntityType() { - entityTypeCase_ = 0; - entityType_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return Whether the emailAddress field is set. - */ - @java.lang.Override - public boolean hasEmailAddress() { - return entityTypeCase_ == 2; - } - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return The emailAddress. - */ - @java.lang.Override - public java.lang.String getEmailAddress() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 2) { - ref = entityType_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (entityTypeCase_ == 2) { - entityType_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return The bytes for emailAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEmailAddressBytes() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 2) { - ref = entityType_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (entityTypeCase_ == 2) { - entityType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @param value The emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddress( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entityTypeCase_ = 2; - entityType_ = value; - onChanged(); - return this; - } - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return This builder for chaining. - */ - public Builder clearEmailAddress() { - if (entityTypeCase_ == 2) { - entityTypeCase_ = 0; - entityType_ = null; - onChanged(); - } - return this; - } - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @param value The bytes for emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entityTypeCase_ = 2; - entityType_ = value; - onChanged(); - return this; - } - - /** - * string user_name = 3 [json_name = "userName"]; - * @return Whether the userName field is set. - */ - @java.lang.Override - public boolean hasUserName() { - return entityTypeCase_ == 3; - } - /** - * string user_name = 3 [json_name = "userName"]; - * @return The userName. - */ - @java.lang.Override - public java.lang.String getUserName() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 3) { - ref = entityType_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (entityTypeCase_ == 3) { - entityType_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string user_name = 3 [json_name = "userName"]; - * @return The bytes for userName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUserNameBytes() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 3) { - ref = entityType_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (entityTypeCase_ == 3) { - entityType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string user_name = 3 [json_name = "userName"]; - * @param value The userName to set. - * @return This builder for chaining. - */ - public Builder setUserName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entityTypeCase_ = 3; - entityType_ = value; - onChanged(); - return this; - } - /** - * string user_name = 3 [json_name = "userName"]; - * @return This builder for chaining. - */ - public Builder clearUserName() { - if (entityTypeCase_ == 3) { - entityTypeCase_ = 0; - entityType_ = null; - onChanged(); - } - return this; - } - /** - * string user_name = 3 [json_name = "userName"]; - * @param value The bytes for userName to set. - * @return This builder for chaining. - */ - public Builder setUserNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entityTypeCase_ = 3; - entityType_ = value; - onChanged(); - return this; - } - - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return Whether the remoteClaimsUrl field is set. - */ - @java.lang.Override - public boolean hasRemoteClaimsUrl() { - return entityTypeCase_ == 4; - } - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return The remoteClaimsUrl. - */ - @java.lang.Override - public java.lang.String getRemoteClaimsUrl() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 4) { - ref = entityType_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (entityTypeCase_ == 4) { - entityType_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return The bytes for remoteClaimsUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRemoteClaimsUrlBytes() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 4) { - ref = entityType_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (entityTypeCase_ == 4) { - entityType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @param value The remoteClaimsUrl to set. - * @return This builder for chaining. - */ - public Builder setRemoteClaimsUrl( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entityTypeCase_ = 4; - entityType_ = value; - onChanged(); - return this; - } - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return This builder for chaining. - */ - public Builder clearRemoteClaimsUrl() { - if (entityTypeCase_ == 4) { - entityTypeCase_ = 0; - entityType_ = null; - onChanged(); - } - return this; - } - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @param value The bytes for remoteClaimsUrl to set. - * @return This builder for chaining. - */ - public Builder setRemoteClaimsUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entityTypeCase_ = 4; - entityType_ = value; - onChanged(); - return this; - } - - /** - * string jwt = 5 [json_name = "jwt"]; - * @return Whether the jwt field is set. - */ - @java.lang.Override - public boolean hasJwt() { - return entityTypeCase_ == 5; - } - /** - * string jwt = 5 [json_name = "jwt"]; - * @return The jwt. - */ - @java.lang.Override - public java.lang.String getJwt() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 5) { - ref = entityType_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (entityTypeCase_ == 5) { - entityType_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string jwt = 5 [json_name = "jwt"]; - * @return The bytes for jwt. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getJwtBytes() { - java.lang.Object ref = ""; - if (entityTypeCase_ == 5) { - ref = entityType_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (entityTypeCase_ == 5) { - entityType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string jwt = 5 [json_name = "jwt"]; - * @param value The jwt to set. - * @return This builder for chaining. - */ - public Builder setJwt( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entityTypeCase_ = 5; - entityType_ = value; - onChanged(); - return this; - } - /** - * string jwt = 5 [json_name = "jwt"]; - * @return This builder for chaining. - */ - public Builder clearJwt() { - if (entityTypeCase_ == 5) { - entityTypeCase_ = 0; - entityType_ = null; - onChanged(); - } - return this; - } - /** - * string jwt = 5 [json_name = "jwt"]; - * @param value The bytes for jwt to set. - * @return This builder for chaining. - */ - public Builder setJwtBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entityTypeCase_ = 5; - entityType_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> claimsBuilder_; - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - * @return Whether the claims field is set. - */ - @java.lang.Override - public boolean hasClaims() { - return entityTypeCase_ == 6; - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - * @return The claims. - */ - @java.lang.Override - public com.google.protobuf.Any getClaims() { - if (claimsBuilder_ == null) { - if (entityTypeCase_ == 6) { - return (com.google.protobuf.Any) entityType_; - } - return com.google.protobuf.Any.getDefaultInstance(); - } else { - if (entityTypeCase_ == 6) { - return claimsBuilder_.getMessage(); - } - return com.google.protobuf.Any.getDefaultInstance(); - } - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - public Builder setClaims(com.google.protobuf.Any value) { - if (claimsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - entityType_ = value; - onChanged(); - } else { - claimsBuilder_.setMessage(value); - } - entityTypeCase_ = 6; - return this; - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - public Builder setClaims( - com.google.protobuf.Any.Builder builderForValue) { - if (claimsBuilder_ == null) { - entityType_ = builderForValue.build(); - onChanged(); - } else { - claimsBuilder_.setMessage(builderForValue.build()); - } - entityTypeCase_ = 6; - return this; - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - public Builder mergeClaims(com.google.protobuf.Any value) { - if (claimsBuilder_ == null) { - if (entityTypeCase_ == 6 && - entityType_ != com.google.protobuf.Any.getDefaultInstance()) { - entityType_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) entityType_) - .mergeFrom(value).buildPartial(); - } else { - entityType_ = value; - } - onChanged(); - } else { - if (entityTypeCase_ == 6) { - claimsBuilder_.mergeFrom(value); - } else { - claimsBuilder_.setMessage(value); - } - } - entityTypeCase_ = 6; - return this; - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - public Builder clearClaims() { - if (claimsBuilder_ == null) { - if (entityTypeCase_ == 6) { - entityTypeCase_ = 0; - entityType_ = null; - onChanged(); - } - } else { - if (entityTypeCase_ == 6) { - entityTypeCase_ = 0; - entityType_ = null; - } - claimsBuilder_.clear(); - } - return this; - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - public com.google.protobuf.Any.Builder getClaimsBuilder() { - return getClaimsFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getClaimsOrBuilder() { - if ((entityTypeCase_ == 6) && (claimsBuilder_ != null)) { - return claimsBuilder_.getMessageOrBuilder(); - } else { - if (entityTypeCase_ == 6) { - return (com.google.protobuf.Any) entityType_; - } - return com.google.protobuf.Any.getDefaultInstance(); - } - } - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getClaimsFieldBuilder() { - if (claimsBuilder_ == null) { - if (!(entityTypeCase_ == 6)) { - entityType_ = com.google.protobuf.Any.getDefaultInstance(); - } - claimsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - (com.google.protobuf.Any) entityType_, - getParentForChildren(), - isClean()); - entityType_ = null; - } - entityTypeCase_ = 6; - onChanged(); - return claimsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.EntityCustom, io.opentdf.platform.authorization.EntityCustom.Builder, io.opentdf.platform.authorization.EntityCustomOrBuilder> customBuilder_; - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return entityTypeCase_ == 7; - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - * @return The custom. - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityCustom getCustom() { - if (customBuilder_ == null) { - if (entityTypeCase_ == 7) { - return (io.opentdf.platform.authorization.EntityCustom) entityType_; - } - return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); - } else { - if (entityTypeCase_ == 7) { - return customBuilder_.getMessage(); - } - return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); - } - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - public Builder setCustom(io.opentdf.platform.authorization.EntityCustom value) { - if (customBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - entityType_ = value; - onChanged(); - } else { - customBuilder_.setMessage(value); - } - entityTypeCase_ = 7; - return this; - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - public Builder setCustom( - io.opentdf.platform.authorization.EntityCustom.Builder builderForValue) { - if (customBuilder_ == null) { - entityType_ = builderForValue.build(); - onChanged(); - } else { - customBuilder_.setMessage(builderForValue.build()); - } - entityTypeCase_ = 7; - return this; - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - public Builder mergeCustom(io.opentdf.platform.authorization.EntityCustom value) { - if (customBuilder_ == null) { - if (entityTypeCase_ == 7 && - entityType_ != io.opentdf.platform.authorization.EntityCustom.getDefaultInstance()) { - entityType_ = io.opentdf.platform.authorization.EntityCustom.newBuilder((io.opentdf.platform.authorization.EntityCustom) entityType_) - .mergeFrom(value).buildPartial(); - } else { - entityType_ = value; - } - onChanged(); - } else { - if (entityTypeCase_ == 7) { - customBuilder_.mergeFrom(value); - } else { - customBuilder_.setMessage(value); - } - } - entityTypeCase_ = 7; - return this; - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - public Builder clearCustom() { - if (customBuilder_ == null) { - if (entityTypeCase_ == 7) { - entityTypeCase_ = 0; - entityType_ = null; - onChanged(); - } - } else { - if (entityTypeCase_ == 7) { - entityTypeCase_ = 0; - entityType_ = null; - } - customBuilder_.clear(); - } - return this; - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - public io.opentdf.platform.authorization.EntityCustom.Builder getCustomBuilder() { - return getCustomFieldBuilder().getBuilder(); - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityCustomOrBuilder getCustomOrBuilder() { - if ((entityTypeCase_ == 7) && (customBuilder_ != null)) { - return customBuilder_.getMessageOrBuilder(); - } else { - if (entityTypeCase_ == 7) { - return (io.opentdf.platform.authorization.EntityCustom) entityType_; - } - return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); - } - } - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.EntityCustom, io.opentdf.platform.authorization.EntityCustom.Builder, io.opentdf.platform.authorization.EntityCustomOrBuilder> - getCustomFieldBuilder() { - if (customBuilder_ == null) { - if (!(entityTypeCase_ == 7)) { - entityType_ = io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); - } - customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.EntityCustom, io.opentdf.platform.authorization.EntityCustom.Builder, io.opentdf.platform.authorization.EntityCustomOrBuilder>( - (io.opentdf.platform.authorization.EntityCustom) entityType_, - getParentForChildren(), - isClean()); - entityType_ = null; - } - entityTypeCase_ = 7; - onChanged(); - return customBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.Entity) - } - - // @@protoc_insertion_point(class_scope:authorization.Entity) - private static final io.opentdf.platform.authorization.Entity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.Entity(); - } - - public static io.opentdf.platform.authorization.Entity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Entity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.Entity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityChain.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityChain.java deleted file mode 100644 index 7b3734c2..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/EntityChain.java +++ /dev/null @@ -1,932 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - *
- * A set of related PE and NPE
- * 
- * - * Protobuf type {@code authorization.EntityChain} - */ -public final class EntityChain extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.EntityChain) - EntityChainOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityChain.newBuilder() to construct. - private EntityChain(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityChain() { - id_ = ""; - entities_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityChain(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.EntityChain.class, io.opentdf.platform.authorization.EntityChain.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * ephemeral id for tracking between request and response
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * ephemeral id for tracking between request and response
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENTITIES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List entities_; - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - @java.lang.Override - public java.util.List getEntitiesList() { - return entities_; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - @java.lang.Override - public java.util.List - getEntitiesOrBuilderList() { - return entities_; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - @java.lang.Override - public int getEntitiesCount() { - return entities_.size(); - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.Entity getEntities(int index) { - return entities_.get(index); - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( - int index) { - return entities_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - for (int i = 0; i < entities_.size(); i++) { - output.writeMessage(2, entities_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - for (int i = 0; i < entities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, entities_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.EntityChain)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.EntityChain other = (io.opentdf.platform.authorization.EntityChain) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getEntitiesList() - .equals(other.getEntitiesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getEntitiesCount() > 0) { - hash = (37 * hash) + ENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getEntitiesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.EntityChain parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.EntityChain parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.EntityChain parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.EntityChain parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.EntityChain prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A set of related PE and NPE
-   * 
- * - * Protobuf type {@code authorization.EntityChain} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.EntityChain) - io.opentdf.platform.authorization.EntityChainOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.EntityChain.class, io.opentdf.platform.authorization.EntityChain.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.EntityChain.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - if (entitiesBuilder_ == null) { - entities_ = java.util.Collections.emptyList(); - } else { - entities_ = null; - entitiesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityChain_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityChain getDefaultInstanceForType() { - return io.opentdf.platform.authorization.EntityChain.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityChain build() { - io.opentdf.platform.authorization.EntityChain result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityChain buildPartial() { - io.opentdf.platform.authorization.EntityChain result = new io.opentdf.platform.authorization.EntityChain(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.authorization.EntityChain result) { - if (entitiesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - entities_ = java.util.Collections.unmodifiableList(entities_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.entities_ = entities_; - } else { - result.entities_ = entitiesBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.authorization.EntityChain result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.EntityChain) { - return mergeFrom((io.opentdf.platform.authorization.EntityChain)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.EntityChain other) { - if (other == io.opentdf.platform.authorization.EntityChain.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (entitiesBuilder_ == null) { - if (!other.entities_.isEmpty()) { - if (entities_.isEmpty()) { - entities_ = other.entities_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureEntitiesIsMutable(); - entities_.addAll(other.entities_); - } - onChanged(); - } - } else { - if (!other.entities_.isEmpty()) { - if (entitiesBuilder_.isEmpty()) { - entitiesBuilder_.dispose(); - entitiesBuilder_ = null; - entities_ = other.entities_; - bitField0_ = (bitField0_ & ~0x00000002); - entitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEntitiesFieldBuilder() : null; - } else { - entitiesBuilder_.addAllMessages(other.entities_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.opentdf.platform.authorization.Entity m = - input.readMessage( - io.opentdf.platform.authorization.Entity.parser(), - extensionRegistry); - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.add(m); - } else { - entitiesBuilder_.addMessage(m); - } - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * ephemeral id for tracking between request and response
-     * 
- * - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List entities_ = - java.util.Collections.emptyList(); - private void ensureEntitiesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - entities_ = new java.util.ArrayList(entities_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder> entitiesBuilder_; - - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public java.util.List getEntitiesList() { - if (entitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(entities_); - } else { - return entitiesBuilder_.getMessageList(); - } - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public int getEntitiesCount() { - if (entitiesBuilder_ == null) { - return entities_.size(); - } else { - return entitiesBuilder_.getCount(); - } - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.Entity getEntities(int index) { - if (entitiesBuilder_ == null) { - return entities_.get(index); - } else { - return entitiesBuilder_.getMessage(index); - } - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder setEntities( - int index, io.opentdf.platform.authorization.Entity value) { - if (entitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitiesIsMutable(); - entities_.set(index, value); - onChanged(); - } else { - entitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder setEntities( - int index, io.opentdf.platform.authorization.Entity.Builder builderForValue) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.set(index, builderForValue.build()); - onChanged(); - } else { - entitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder addEntities(io.opentdf.platform.authorization.Entity value) { - if (entitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitiesIsMutable(); - entities_.add(value); - onChanged(); - } else { - entitiesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder addEntities( - int index, io.opentdf.platform.authorization.Entity value) { - if (entitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitiesIsMutable(); - entities_.add(index, value); - onChanged(); - } else { - entitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder addEntities( - io.opentdf.platform.authorization.Entity.Builder builderForValue) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.add(builderForValue.build()); - onChanged(); - } else { - entitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder addEntities( - int index, io.opentdf.platform.authorization.Entity.Builder builderForValue) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.add(index, builderForValue.build()); - onChanged(); - } else { - entitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder addAllEntities( - java.lang.Iterable values) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, entities_); - onChanged(); - } else { - entitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder clearEntities() { - if (entitiesBuilder_ == null) { - entities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - entitiesBuilder_.clear(); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public Builder removeEntities(int index) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.remove(index); - onChanged(); - } else { - entitiesBuilder_.remove(index); - } - return this; - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.Entity.Builder getEntitiesBuilder( - int index) { - return getEntitiesFieldBuilder().getBuilder(index); - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( - int index) { - if (entitiesBuilder_ == null) { - return entities_.get(index); } else { - return entitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public java.util.List - getEntitiesOrBuilderList() { - if (entitiesBuilder_ != null) { - return entitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(entities_); - } - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder() { - return getEntitiesFieldBuilder().addBuilder( - io.opentdf.platform.authorization.Entity.getDefaultInstance()); - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder( - int index) { - return getEntitiesFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.Entity.getDefaultInstance()); - } - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - public java.util.List - getEntitiesBuilderList() { - return getEntitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder> - getEntitiesFieldBuilder() { - if (entitiesBuilder_ == null) { - entitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder>( - entities_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - entities_ = null; - } - return entitiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.EntityChain) - } - - // @@protoc_insertion_point(class_scope:authorization.EntityChain) - private static final io.opentdf.platform.authorization.EntityChain DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.EntityChain(); - } - - public static io.opentdf.platform.authorization.EntityChain getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityChain parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityChain getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityChainOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityChainOrBuilder.java deleted file mode 100644 index 323bb4d5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/EntityChainOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface EntityChainOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.EntityChain) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * ephemeral id for tracking between request and response
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * ephemeral id for tracking between request and response
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - java.util.List - getEntitiesList(); - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - io.opentdf.platform.authorization.Entity getEntities(int index); - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - int getEntitiesCount(); - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - java.util.List - getEntitiesOrBuilderList(); - /** - * repeated .authorization.Entity entities = 2 [json_name = "entities"]; - */ - io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustom.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustom.java deleted file mode 100644 index 74bc7b1f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustom.java +++ /dev/null @@ -1,607 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - *
- * Entity type for custom entities beyond the standard types
- * 
- * - * Protobuf type {@code authorization.EntityCustom} - */ -public final class EntityCustom extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.EntityCustom) - EntityCustomOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityCustom.newBuilder() to construct. - private EntityCustom(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityCustom() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityCustom(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.EntityCustom.class, io.opentdf.platform.authorization.EntityCustom.Builder.class); - } - - private int bitField0_; - public static final int EXTENSION_FIELD_NUMBER = 1; - private com.google.protobuf.Any extension_; - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - * @return Whether the extension field is set. - */ - @java.lang.Override - public boolean hasExtension() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - * @return The extension. - */ - @java.lang.Override - public com.google.protobuf.Any getExtension() { - return extension_ == null ? com.google.protobuf.Any.getDefaultInstance() : extension_; - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getExtensionOrBuilder() { - return extension_ == null ? com.google.protobuf.Any.getDefaultInstance() : extension_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getExtension()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getExtension()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.EntityCustom)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.EntityCustom other = (io.opentdf.platform.authorization.EntityCustom) obj; - - if (hasExtension() != other.hasExtension()) return false; - if (hasExtension()) { - if (!getExtension() - .equals(other.getExtension())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasExtension()) { - hash = (37 * hash) + EXTENSION_FIELD_NUMBER; - hash = (53 * hash) + getExtension().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.EntityCustom parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.EntityCustom parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.EntityCustom parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.EntityCustom parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.EntityCustom prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Entity type for custom entities beyond the standard types
-   * 
- * - * Protobuf type {@code authorization.EntityCustom} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.EntityCustom) - io.opentdf.platform.authorization.EntityCustomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.EntityCustom.class, io.opentdf.platform.authorization.EntityCustom.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.EntityCustom.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getExtensionFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - extension_ = null; - if (extensionBuilder_ != null) { - extensionBuilder_.dispose(); - extensionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityCustom_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityCustom getDefaultInstanceForType() { - return io.opentdf.platform.authorization.EntityCustom.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityCustom build() { - io.opentdf.platform.authorization.EntityCustom result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityCustom buildPartial() { - io.opentdf.platform.authorization.EntityCustom result = new io.opentdf.platform.authorization.EntityCustom(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.authorization.EntityCustom result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.extension_ = extensionBuilder_ == null - ? extension_ - : extensionBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.EntityCustom) { - return mergeFrom((io.opentdf.platform.authorization.EntityCustom)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.EntityCustom other) { - if (other == io.opentdf.platform.authorization.EntityCustom.getDefaultInstance()) return this; - if (other.hasExtension()) { - mergeExtension(other.getExtension()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getExtensionFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.Any extension_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> extensionBuilder_; - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - * @return Whether the extension field is set. - */ - public boolean hasExtension() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - * @return The extension. - */ - public com.google.protobuf.Any getExtension() { - if (extensionBuilder_ == null) { - return extension_ == null ? com.google.protobuf.Any.getDefaultInstance() : extension_; - } else { - return extensionBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - public Builder setExtension(com.google.protobuf.Any value) { - if (extensionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - extension_ = value; - } else { - extensionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - public Builder setExtension( - com.google.protobuf.Any.Builder builderForValue) { - if (extensionBuilder_ == null) { - extension_ = builderForValue.build(); - } else { - extensionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - public Builder mergeExtension(com.google.protobuf.Any value) { - if (extensionBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - extension_ != null && - extension_ != com.google.protobuf.Any.getDefaultInstance()) { - getExtensionBuilder().mergeFrom(value); - } else { - extension_ = value; - } - } else { - extensionBuilder_.mergeFrom(value); - } - if (extension_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - public Builder clearExtension() { - bitField0_ = (bitField0_ & ~0x00000001); - extension_ = null; - if (extensionBuilder_ != null) { - extensionBuilder_.dispose(); - extensionBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - public com.google.protobuf.Any.Builder getExtensionBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getExtensionFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - public com.google.protobuf.AnyOrBuilder getExtensionOrBuilder() { - if (extensionBuilder_ != null) { - return extensionBuilder_.getMessageOrBuilder(); - } else { - return extension_ == null ? - com.google.protobuf.Any.getDefaultInstance() : extension_; - } - } - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getExtensionFieldBuilder() { - if (extensionBuilder_ == null) { - extensionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getExtension(), - getParentForChildren(), - isClean()); - extension_ = null; - } - return extensionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.EntityCustom) - } - - // @@protoc_insertion_point(class_scope:authorization.EntityCustom) - private static final io.opentdf.platform.authorization.EntityCustom DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.EntityCustom(); - } - - public static io.opentdf.platform.authorization.EntityCustom getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityCustom parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityCustom getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustomOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustomOrBuilder.java deleted file mode 100644 index 100ff00d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/EntityCustomOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface EntityCustomOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.EntityCustom) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - * @return Whether the extension field is set. - */ - boolean hasExtension(); - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - * @return The extension. - */ - com.google.protobuf.Any getExtension(); - /** - * .google.protobuf.Any extension = 1 [json_name = "extension"]; - */ - com.google.protobuf.AnyOrBuilder getExtensionOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlements.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlements.java deleted file mode 100644 index 3badea65..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlements.java +++ /dev/null @@ -1,731 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - * Protobuf type {@code authorization.EntityEntitlements} - */ -public final class EntityEntitlements extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.EntityEntitlements) - EntityEntitlementsOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityEntitlements.newBuilder() to construct. - private EntityEntitlements(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityEntitlements() { - entityId_ = ""; - attributeId_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityEntitlements(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.EntityEntitlements.class, io.opentdf.platform.authorization.EntityEntitlements.Builder.class); - } - - public static final int ENTITY_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object entityId_ = ""; - /** - * string entity_id = 1 [json_name = "entityId"]; - * @return The entityId. - */ - @java.lang.Override - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } - } - /** - * string entity_id = 1 [json_name = "entityId"]; - * @return The bytes for entityId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTRIBUTE_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList attributeId_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @return A list containing the attributeId. - */ - public com.google.protobuf.ProtocolStringList - getAttributeIdList() { - return attributeId_; - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @return The count of attributeId. - */ - public int getAttributeIdCount() { - return attributeId_.size(); - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param index The index of the element to return. - * @return The attributeId at the given index. - */ - public java.lang.String getAttributeId(int index) { - return attributeId_.get(index); - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param index The index of the value to return. - * @return The bytes of the attributeId at the given index. - */ - public com.google.protobuf.ByteString - getAttributeIdBytes(int index) { - return attributeId_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); - } - for (int i = 0; i < attributeId_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeId_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); - } - { - int dataSize = 0; - for (int i = 0; i < attributeId_.size(); i++) { - dataSize += computeStringSizeNoTag(attributeId_.getRaw(i)); - } - size += dataSize; - size += 1 * getAttributeIdList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.EntityEntitlements)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.EntityEntitlements other = (io.opentdf.platform.authorization.EntityEntitlements) obj; - - if (!getEntityId() - .equals(other.getEntityId())) return false; - if (!getAttributeIdList() - .equals(other.getAttributeIdList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; - hash = (53 * hash) + getEntityId().hashCode(); - if (getAttributeIdCount() > 0) { - hash = (37 * hash) + ATTRIBUTE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeIdList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.EntityEntitlements parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.EntityEntitlements parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.EntityEntitlements parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.EntityEntitlements prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code authorization.EntityEntitlements} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.EntityEntitlements) - io.opentdf.platform.authorization.EntityEntitlementsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.EntityEntitlements.class, io.opentdf.platform.authorization.EntityEntitlements.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.EntityEntitlements.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - entityId_ = ""; - attributeId_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_EntityEntitlements_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityEntitlements getDefaultInstanceForType() { - return io.opentdf.platform.authorization.EntityEntitlements.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityEntitlements build() { - io.opentdf.platform.authorization.EntityEntitlements result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityEntitlements buildPartial() { - io.opentdf.platform.authorization.EntityEntitlements result = new io.opentdf.platform.authorization.EntityEntitlements(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.authorization.EntityEntitlements result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.entityId_ = entityId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - attributeId_.makeImmutable(); - result.attributeId_ = attributeId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.EntityEntitlements) { - return mergeFrom((io.opentdf.platform.authorization.EntityEntitlements)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.EntityEntitlements other) { - if (other == io.opentdf.platform.authorization.EntityEntitlements.getDefaultInstance()) return this; - if (!other.getEntityId().isEmpty()) { - entityId_ = other.entityId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.attributeId_.isEmpty()) { - if (attributeId_.isEmpty()) { - attributeId_ = other.attributeId_; - bitField0_ |= 0x00000002; - } else { - ensureAttributeIdIsMutable(); - attributeId_.addAll(other.attributeId_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - entityId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - ensureAttributeIdIsMutable(); - attributeId_.add(s); - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object entityId_ = ""; - /** - * string entity_id = 1 [json_name = "entityId"]; - * @return The entityId. - */ - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string entity_id = 1 [json_name = "entityId"]; - * @return The bytes for entityId. - */ - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string entity_id = 1 [json_name = "entityId"]; - * @param value The entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - entityId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string entity_id = 1 [json_name = "entityId"]; - * @return This builder for chaining. - */ - public Builder clearEntityId() { - entityId_ = getDefaultInstance().getEntityId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string entity_id = 1 [json_name = "entityId"]; - * @param value The bytes for entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - entityId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList attributeId_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureAttributeIdIsMutable() { - if (!attributeId_.isModifiable()) { - attributeId_ = new com.google.protobuf.LazyStringArrayList(attributeId_); - } - bitField0_ |= 0x00000002; - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @return A list containing the attributeId. - */ - public com.google.protobuf.ProtocolStringList - getAttributeIdList() { - attributeId_.makeImmutable(); - return attributeId_; - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @return The count of attributeId. - */ - public int getAttributeIdCount() { - return attributeId_.size(); - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param index The index of the element to return. - * @return The attributeId at the given index. - */ - public java.lang.String getAttributeId(int index) { - return attributeId_.get(index); - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param index The index of the value to return. - * @return The bytes of the attributeId at the given index. - */ - public com.google.protobuf.ByteString - getAttributeIdBytes(int index) { - return attributeId_.getByteString(index); - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param index The index to set the value at. - * @param value The attributeId to set. - * @return This builder for chaining. - */ - public Builder setAttributeId( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAttributeIdIsMutable(); - attributeId_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param value The attributeId to add. - * @return This builder for chaining. - */ - public Builder addAttributeId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAttributeIdIsMutable(); - attributeId_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param values The attributeId to add. - * @return This builder for chaining. - */ - public Builder addAllAttributeId( - java.lang.Iterable values) { - ensureAttributeIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, attributeId_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @return This builder for chaining. - */ - public Builder clearAttributeId() { - attributeId_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002);; - onChanged(); - return this; - } - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param value The bytes of the attributeId to add. - * @return This builder for chaining. - */ - public Builder addAttributeIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureAttributeIdIsMutable(); - attributeId_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.EntityEntitlements) - } - - // @@protoc_insertion_point(class_scope:authorization.EntityEntitlements) - private static final io.opentdf.platform.authorization.EntityEntitlements DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.EntityEntitlements(); - } - - public static io.opentdf.platform.authorization.EntityEntitlements getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityEntitlements parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.EntityEntitlements getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlementsOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlementsOrBuilder.java deleted file mode 100644 index 645af3a7..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/EntityEntitlementsOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface EntityEntitlementsOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.EntityEntitlements) - com.google.protobuf.MessageOrBuilder { - - /** - * string entity_id = 1 [json_name = "entityId"]; - * @return The entityId. - */ - java.lang.String getEntityId(); - /** - * string entity_id = 1 [json_name = "entityId"]; - * @return The bytes for entityId. - */ - com.google.protobuf.ByteString - getEntityIdBytes(); - - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @return A list containing the attributeId. - */ - java.util.List - getAttributeIdList(); - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @return The count of attributeId. - */ - int getAttributeIdCount(); - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param index The index of the element to return. - * @return The attributeId at the given index. - */ - java.lang.String getAttributeId(int index); - /** - * repeated string attribute_id = 2 [json_name = "attributeId"]; - * @param index The index of the value to return. - * @return The bytes of the attributeId at the given index. - */ - com.google.protobuf.ByteString - getAttributeIdBytes(int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/EntityOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/EntityOrBuilder.java deleted file mode 100644 index 7b3e27f6..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/EntityOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface EntityOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.Entity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * ephemeral id for tracking between request and response
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * ephemeral id for tracking between request and response
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return Whether the emailAddress field is set. - */ - boolean hasEmailAddress(); - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return The emailAddress. - */ - java.lang.String getEmailAddress(); - /** - * string email_address = 2 [json_name = "emailAddress"]; - * @return The bytes for emailAddress. - */ - com.google.protobuf.ByteString - getEmailAddressBytes(); - - /** - * string user_name = 3 [json_name = "userName"]; - * @return Whether the userName field is set. - */ - boolean hasUserName(); - /** - * string user_name = 3 [json_name = "userName"]; - * @return The userName. - */ - java.lang.String getUserName(); - /** - * string user_name = 3 [json_name = "userName"]; - * @return The bytes for userName. - */ - com.google.protobuf.ByteString - getUserNameBytes(); - - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return Whether the remoteClaimsUrl field is set. - */ - boolean hasRemoteClaimsUrl(); - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return The remoteClaimsUrl. - */ - java.lang.String getRemoteClaimsUrl(); - /** - * string remote_claims_url = 4 [json_name = "remoteClaimsUrl"]; - * @return The bytes for remoteClaimsUrl. - */ - com.google.protobuf.ByteString - getRemoteClaimsUrlBytes(); - - /** - * string jwt = 5 [json_name = "jwt"]; - * @return Whether the jwt field is set. - */ - boolean hasJwt(); - /** - * string jwt = 5 [json_name = "jwt"]; - * @return The jwt. - */ - java.lang.String getJwt(); - /** - * string jwt = 5 [json_name = "jwt"]; - * @return The bytes for jwt. - */ - com.google.protobuf.ByteString - getJwtBytes(); - - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - * @return Whether the claims field is set. - */ - boolean hasClaims(); - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - * @return The claims. - */ - com.google.protobuf.Any getClaims(); - /** - * .google.protobuf.Any claims = 6 [json_name = "claims"]; - */ - com.google.protobuf.AnyOrBuilder getClaimsOrBuilder(); - - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - * @return Whether the custom field is set. - */ - boolean hasCustom(); - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - * @return The custom. - */ - io.opentdf.platform.authorization.EntityCustom getCustom(); - /** - * .authorization.EntityCustom custom = 7 [json_name = "custom"]; - */ - io.opentdf.platform.authorization.EntityCustomOrBuilder getCustomOrBuilder(); - - io.opentdf.platform.authorization.Entity.EntityTypeCase getEntityTypeCase(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequest.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequest.java deleted file mode 100644 index aa745d7f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequest.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - * Protobuf type {@code authorization.GetDecisionsRequest} - */ -public final class GetDecisionsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.GetDecisionsRequest) - GetDecisionsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetDecisionsRequest.newBuilder() to construct. - private GetDecisionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetDecisionsRequest() { - decisionRequests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetDecisionsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.GetDecisionsRequest.class, io.opentdf.platform.authorization.GetDecisionsRequest.Builder.class); - } - - public static final int DECISION_REQUESTS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List decisionRequests_; - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - @java.lang.Override - public java.util.List getDecisionRequestsList() { - return decisionRequests_; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - @java.lang.Override - public java.util.List - getDecisionRequestsOrBuilderList() { - return decisionRequests_; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - @java.lang.Override - public int getDecisionRequestsCount() { - return decisionRequests_.size(); - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.DecisionRequest getDecisionRequests(int index) { - return decisionRequests_.get(index); - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.DecisionRequestOrBuilder getDecisionRequestsOrBuilder( - int index) { - return decisionRequests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < decisionRequests_.size(); i++) { - output.writeMessage(1, decisionRequests_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < decisionRequests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, decisionRequests_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.GetDecisionsRequest)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.GetDecisionsRequest other = (io.opentdf.platform.authorization.GetDecisionsRequest) obj; - - if (!getDecisionRequestsList() - .equals(other.getDecisionRequestsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDecisionRequestsCount() > 0) { - hash = (37 * hash) + DECISION_REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getDecisionRequestsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.GetDecisionsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.GetDecisionsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.GetDecisionsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.GetDecisionsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code authorization.GetDecisionsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.GetDecisionsRequest) - io.opentdf.platform.authorization.GetDecisionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.GetDecisionsRequest.class, io.opentdf.platform.authorization.GetDecisionsRequest.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.GetDecisionsRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (decisionRequestsBuilder_ == null) { - decisionRequests_ = java.util.Collections.emptyList(); - } else { - decisionRequests_ = null; - decisionRequestsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetDecisionsRequest getDefaultInstanceForType() { - return io.opentdf.platform.authorization.GetDecisionsRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetDecisionsRequest build() { - io.opentdf.platform.authorization.GetDecisionsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetDecisionsRequest buildPartial() { - io.opentdf.platform.authorization.GetDecisionsRequest result = new io.opentdf.platform.authorization.GetDecisionsRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.authorization.GetDecisionsRequest result) { - if (decisionRequestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - decisionRequests_ = java.util.Collections.unmodifiableList(decisionRequests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.decisionRequests_ = decisionRequests_; - } else { - result.decisionRequests_ = decisionRequestsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.authorization.GetDecisionsRequest result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.GetDecisionsRequest) { - return mergeFrom((io.opentdf.platform.authorization.GetDecisionsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.GetDecisionsRequest other) { - if (other == io.opentdf.platform.authorization.GetDecisionsRequest.getDefaultInstance()) return this; - if (decisionRequestsBuilder_ == null) { - if (!other.decisionRequests_.isEmpty()) { - if (decisionRequests_.isEmpty()) { - decisionRequests_ = other.decisionRequests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDecisionRequestsIsMutable(); - decisionRequests_.addAll(other.decisionRequests_); - } - onChanged(); - } - } else { - if (!other.decisionRequests_.isEmpty()) { - if (decisionRequestsBuilder_.isEmpty()) { - decisionRequestsBuilder_.dispose(); - decisionRequestsBuilder_ = null; - decisionRequests_ = other.decisionRequests_; - bitField0_ = (bitField0_ & ~0x00000001); - decisionRequestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDecisionRequestsFieldBuilder() : null; - } else { - decisionRequestsBuilder_.addAllMessages(other.decisionRequests_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.authorization.DecisionRequest m = - input.readMessage( - io.opentdf.platform.authorization.DecisionRequest.parser(), - extensionRegistry); - if (decisionRequestsBuilder_ == null) { - ensureDecisionRequestsIsMutable(); - decisionRequests_.add(m); - } else { - decisionRequestsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List decisionRequests_ = - java.util.Collections.emptyList(); - private void ensureDecisionRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - decisionRequests_ = new java.util.ArrayList(decisionRequests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.DecisionRequest, io.opentdf.platform.authorization.DecisionRequest.Builder, io.opentdf.platform.authorization.DecisionRequestOrBuilder> decisionRequestsBuilder_; - - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public java.util.List getDecisionRequestsList() { - if (decisionRequestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(decisionRequests_); - } else { - return decisionRequestsBuilder_.getMessageList(); - } - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public int getDecisionRequestsCount() { - if (decisionRequestsBuilder_ == null) { - return decisionRequests_.size(); - } else { - return decisionRequestsBuilder_.getCount(); - } - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public io.opentdf.platform.authorization.DecisionRequest getDecisionRequests(int index) { - if (decisionRequestsBuilder_ == null) { - return decisionRequests_.get(index); - } else { - return decisionRequestsBuilder_.getMessage(index); - } - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder setDecisionRequests( - int index, io.opentdf.platform.authorization.DecisionRequest value) { - if (decisionRequestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDecisionRequestsIsMutable(); - decisionRequests_.set(index, value); - onChanged(); - } else { - decisionRequestsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder setDecisionRequests( - int index, io.opentdf.platform.authorization.DecisionRequest.Builder builderForValue) { - if (decisionRequestsBuilder_ == null) { - ensureDecisionRequestsIsMutable(); - decisionRequests_.set(index, builderForValue.build()); - onChanged(); - } else { - decisionRequestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder addDecisionRequests(io.opentdf.platform.authorization.DecisionRequest value) { - if (decisionRequestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDecisionRequestsIsMutable(); - decisionRequests_.add(value); - onChanged(); - } else { - decisionRequestsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder addDecisionRequests( - int index, io.opentdf.platform.authorization.DecisionRequest value) { - if (decisionRequestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDecisionRequestsIsMutable(); - decisionRequests_.add(index, value); - onChanged(); - } else { - decisionRequestsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder addDecisionRequests( - io.opentdf.platform.authorization.DecisionRequest.Builder builderForValue) { - if (decisionRequestsBuilder_ == null) { - ensureDecisionRequestsIsMutable(); - decisionRequests_.add(builderForValue.build()); - onChanged(); - } else { - decisionRequestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder addDecisionRequests( - int index, io.opentdf.platform.authorization.DecisionRequest.Builder builderForValue) { - if (decisionRequestsBuilder_ == null) { - ensureDecisionRequestsIsMutable(); - decisionRequests_.add(index, builderForValue.build()); - onChanged(); - } else { - decisionRequestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder addAllDecisionRequests( - java.lang.Iterable values) { - if (decisionRequestsBuilder_ == null) { - ensureDecisionRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, decisionRequests_); - onChanged(); - } else { - decisionRequestsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder clearDecisionRequests() { - if (decisionRequestsBuilder_ == null) { - decisionRequests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - decisionRequestsBuilder_.clear(); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public Builder removeDecisionRequests(int index) { - if (decisionRequestsBuilder_ == null) { - ensureDecisionRequestsIsMutable(); - decisionRequests_.remove(index); - onChanged(); - } else { - decisionRequestsBuilder_.remove(index); - } - return this; - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public io.opentdf.platform.authorization.DecisionRequest.Builder getDecisionRequestsBuilder( - int index) { - return getDecisionRequestsFieldBuilder().getBuilder(index); - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public io.opentdf.platform.authorization.DecisionRequestOrBuilder getDecisionRequestsOrBuilder( - int index) { - if (decisionRequestsBuilder_ == null) { - return decisionRequests_.get(index); } else { - return decisionRequestsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public java.util.List - getDecisionRequestsOrBuilderList() { - if (decisionRequestsBuilder_ != null) { - return decisionRequestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(decisionRequests_); - } - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public io.opentdf.platform.authorization.DecisionRequest.Builder addDecisionRequestsBuilder() { - return getDecisionRequestsFieldBuilder().addBuilder( - io.opentdf.platform.authorization.DecisionRequest.getDefaultInstance()); - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public io.opentdf.platform.authorization.DecisionRequest.Builder addDecisionRequestsBuilder( - int index) { - return getDecisionRequestsFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.DecisionRequest.getDefaultInstance()); - } - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - public java.util.List - getDecisionRequestsBuilderList() { - return getDecisionRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.DecisionRequest, io.opentdf.platform.authorization.DecisionRequest.Builder, io.opentdf.platform.authorization.DecisionRequestOrBuilder> - getDecisionRequestsFieldBuilder() { - if (decisionRequestsBuilder_ == null) { - decisionRequestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.DecisionRequest, io.opentdf.platform.authorization.DecisionRequest.Builder, io.opentdf.platform.authorization.DecisionRequestOrBuilder>( - decisionRequests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - decisionRequests_ = null; - } - return decisionRequestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.GetDecisionsRequest) - } - - // @@protoc_insertion_point(class_scope:authorization.GetDecisionsRequest) - private static final io.opentdf.platform.authorization.GetDecisionsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.GetDecisionsRequest(); - } - - public static io.opentdf.platform.authorization.GetDecisionsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetDecisionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetDecisionsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequestOrBuilder.java deleted file mode 100644 index 28d46421..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsRequestOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface GetDecisionsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.GetDecisionsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - java.util.List - getDecisionRequestsList(); - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - io.opentdf.platform.authorization.DecisionRequest getDecisionRequests(int index); - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - int getDecisionRequestsCount(); - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - java.util.List - getDecisionRequestsOrBuilderList(); - /** - * repeated .authorization.DecisionRequest decision_requests = 1 [json_name = "decisionRequests"]; - */ - io.opentdf.platform.authorization.DecisionRequestOrBuilder getDecisionRequestsOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponse.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponse.java deleted file mode 100644 index f88a9cfc..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - * Protobuf type {@code authorization.GetDecisionsResponse} - */ -public final class GetDecisionsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.GetDecisionsResponse) - GetDecisionsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetDecisionsResponse.newBuilder() to construct. - private GetDecisionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetDecisionsResponse() { - decisionResponses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetDecisionsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.GetDecisionsResponse.class, io.opentdf.platform.authorization.GetDecisionsResponse.Builder.class); - } - - public static final int DECISION_RESPONSES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List decisionResponses_; - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - @java.lang.Override - public java.util.List getDecisionResponsesList() { - return decisionResponses_; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - @java.lang.Override - public java.util.List - getDecisionResponsesOrBuilderList() { - return decisionResponses_; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - @java.lang.Override - public int getDecisionResponsesCount() { - return decisionResponses_.size(); - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.DecisionResponse getDecisionResponses(int index) { - return decisionResponses_.get(index); - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.DecisionResponseOrBuilder getDecisionResponsesOrBuilder( - int index) { - return decisionResponses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < decisionResponses_.size(); i++) { - output.writeMessage(1, decisionResponses_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < decisionResponses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, decisionResponses_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.GetDecisionsResponse)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.GetDecisionsResponse other = (io.opentdf.platform.authorization.GetDecisionsResponse) obj; - - if (!getDecisionResponsesList() - .equals(other.getDecisionResponsesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDecisionResponsesCount() > 0) { - hash = (37 * hash) + DECISION_RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getDecisionResponsesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.GetDecisionsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.GetDecisionsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.GetDecisionsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.GetDecisionsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code authorization.GetDecisionsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.GetDecisionsResponse) - io.opentdf.platform.authorization.GetDecisionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.GetDecisionsResponse.class, io.opentdf.platform.authorization.GetDecisionsResponse.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.GetDecisionsResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (decisionResponsesBuilder_ == null) { - decisionResponses_ = java.util.Collections.emptyList(); - } else { - decisionResponses_ = null; - decisionResponsesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetDecisionsResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetDecisionsResponse getDefaultInstanceForType() { - return io.opentdf.platform.authorization.GetDecisionsResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetDecisionsResponse build() { - io.opentdf.platform.authorization.GetDecisionsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetDecisionsResponse buildPartial() { - io.opentdf.platform.authorization.GetDecisionsResponse result = new io.opentdf.platform.authorization.GetDecisionsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.authorization.GetDecisionsResponse result) { - if (decisionResponsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - decisionResponses_ = java.util.Collections.unmodifiableList(decisionResponses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.decisionResponses_ = decisionResponses_; - } else { - result.decisionResponses_ = decisionResponsesBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.authorization.GetDecisionsResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.GetDecisionsResponse) { - return mergeFrom((io.opentdf.platform.authorization.GetDecisionsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.GetDecisionsResponse other) { - if (other == io.opentdf.platform.authorization.GetDecisionsResponse.getDefaultInstance()) return this; - if (decisionResponsesBuilder_ == null) { - if (!other.decisionResponses_.isEmpty()) { - if (decisionResponses_.isEmpty()) { - decisionResponses_ = other.decisionResponses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDecisionResponsesIsMutable(); - decisionResponses_.addAll(other.decisionResponses_); - } - onChanged(); - } - } else { - if (!other.decisionResponses_.isEmpty()) { - if (decisionResponsesBuilder_.isEmpty()) { - decisionResponsesBuilder_.dispose(); - decisionResponsesBuilder_ = null; - decisionResponses_ = other.decisionResponses_; - bitField0_ = (bitField0_ & ~0x00000001); - decisionResponsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDecisionResponsesFieldBuilder() : null; - } else { - decisionResponsesBuilder_.addAllMessages(other.decisionResponses_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.authorization.DecisionResponse m = - input.readMessage( - io.opentdf.platform.authorization.DecisionResponse.parser(), - extensionRegistry); - if (decisionResponsesBuilder_ == null) { - ensureDecisionResponsesIsMutable(); - decisionResponses_.add(m); - } else { - decisionResponsesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List decisionResponses_ = - java.util.Collections.emptyList(); - private void ensureDecisionResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - decisionResponses_ = new java.util.ArrayList(decisionResponses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.DecisionResponse, io.opentdf.platform.authorization.DecisionResponse.Builder, io.opentdf.platform.authorization.DecisionResponseOrBuilder> decisionResponsesBuilder_; - - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public java.util.List getDecisionResponsesList() { - if (decisionResponsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(decisionResponses_); - } else { - return decisionResponsesBuilder_.getMessageList(); - } - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public int getDecisionResponsesCount() { - if (decisionResponsesBuilder_ == null) { - return decisionResponses_.size(); - } else { - return decisionResponsesBuilder_.getCount(); - } - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public io.opentdf.platform.authorization.DecisionResponse getDecisionResponses(int index) { - if (decisionResponsesBuilder_ == null) { - return decisionResponses_.get(index); - } else { - return decisionResponsesBuilder_.getMessage(index); - } - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder setDecisionResponses( - int index, io.opentdf.platform.authorization.DecisionResponse value) { - if (decisionResponsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDecisionResponsesIsMutable(); - decisionResponses_.set(index, value); - onChanged(); - } else { - decisionResponsesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder setDecisionResponses( - int index, io.opentdf.platform.authorization.DecisionResponse.Builder builderForValue) { - if (decisionResponsesBuilder_ == null) { - ensureDecisionResponsesIsMutable(); - decisionResponses_.set(index, builderForValue.build()); - onChanged(); - } else { - decisionResponsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder addDecisionResponses(io.opentdf.platform.authorization.DecisionResponse value) { - if (decisionResponsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDecisionResponsesIsMutable(); - decisionResponses_.add(value); - onChanged(); - } else { - decisionResponsesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder addDecisionResponses( - int index, io.opentdf.platform.authorization.DecisionResponse value) { - if (decisionResponsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDecisionResponsesIsMutable(); - decisionResponses_.add(index, value); - onChanged(); - } else { - decisionResponsesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder addDecisionResponses( - io.opentdf.platform.authorization.DecisionResponse.Builder builderForValue) { - if (decisionResponsesBuilder_ == null) { - ensureDecisionResponsesIsMutable(); - decisionResponses_.add(builderForValue.build()); - onChanged(); - } else { - decisionResponsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder addDecisionResponses( - int index, io.opentdf.platform.authorization.DecisionResponse.Builder builderForValue) { - if (decisionResponsesBuilder_ == null) { - ensureDecisionResponsesIsMutable(); - decisionResponses_.add(index, builderForValue.build()); - onChanged(); - } else { - decisionResponsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder addAllDecisionResponses( - java.lang.Iterable values) { - if (decisionResponsesBuilder_ == null) { - ensureDecisionResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, decisionResponses_); - onChanged(); - } else { - decisionResponsesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder clearDecisionResponses() { - if (decisionResponsesBuilder_ == null) { - decisionResponses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - decisionResponsesBuilder_.clear(); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public Builder removeDecisionResponses(int index) { - if (decisionResponsesBuilder_ == null) { - ensureDecisionResponsesIsMutable(); - decisionResponses_.remove(index); - onChanged(); - } else { - decisionResponsesBuilder_.remove(index); - } - return this; - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public io.opentdf.platform.authorization.DecisionResponse.Builder getDecisionResponsesBuilder( - int index) { - return getDecisionResponsesFieldBuilder().getBuilder(index); - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public io.opentdf.platform.authorization.DecisionResponseOrBuilder getDecisionResponsesOrBuilder( - int index) { - if (decisionResponsesBuilder_ == null) { - return decisionResponses_.get(index); } else { - return decisionResponsesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public java.util.List - getDecisionResponsesOrBuilderList() { - if (decisionResponsesBuilder_ != null) { - return decisionResponsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(decisionResponses_); - } - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public io.opentdf.platform.authorization.DecisionResponse.Builder addDecisionResponsesBuilder() { - return getDecisionResponsesFieldBuilder().addBuilder( - io.opentdf.platform.authorization.DecisionResponse.getDefaultInstance()); - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public io.opentdf.platform.authorization.DecisionResponse.Builder addDecisionResponsesBuilder( - int index) { - return getDecisionResponsesFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.DecisionResponse.getDefaultInstance()); - } - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - public java.util.List - getDecisionResponsesBuilderList() { - return getDecisionResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.DecisionResponse, io.opentdf.platform.authorization.DecisionResponse.Builder, io.opentdf.platform.authorization.DecisionResponseOrBuilder> - getDecisionResponsesFieldBuilder() { - if (decisionResponsesBuilder_ == null) { - decisionResponsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.DecisionResponse, io.opentdf.platform.authorization.DecisionResponse.Builder, io.opentdf.platform.authorization.DecisionResponseOrBuilder>( - decisionResponses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - decisionResponses_ = null; - } - return decisionResponsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.GetDecisionsResponse) - } - - // @@protoc_insertion_point(class_scope:authorization.GetDecisionsResponse) - private static final io.opentdf.platform.authorization.GetDecisionsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.GetDecisionsResponse(); - } - - public static io.opentdf.platform.authorization.GetDecisionsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetDecisionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetDecisionsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponseOrBuilder.java deleted file mode 100644 index 488031c5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/GetDecisionsResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface GetDecisionsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.GetDecisionsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - java.util.List - getDecisionResponsesList(); - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - io.opentdf.platform.authorization.DecisionResponse getDecisionResponses(int index); - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - int getDecisionResponsesCount(); - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - java.util.List - getDecisionResponsesOrBuilderList(); - /** - * repeated .authorization.DecisionResponse decision_responses = 1 [json_name = "decisionResponses"]; - */ - io.opentdf.platform.authorization.DecisionResponseOrBuilder getDecisionResponsesOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequest.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequest.java deleted file mode 100644 index e346c4f4..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequest.java +++ /dev/null @@ -1,1134 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - *
- *
- *Request to get entitlements for one or more entities for an optional attribute scope
- *
- *Example: Get entitlements for bob and alice (both represented using an email address
- *
- *{
- *"entities": [
- *{
- *"id": "e1",
- *"emailAddress": "bob@example.org"
- *},
- *{
- *"id": "e2",
- *"emailAddress": "alice@example.org"
- *}
- *]
- *}
- * 
- * - * Protobuf type {@code authorization.GetEntitlementsRequest} - */ -public final class GetEntitlementsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.GetEntitlementsRequest) - GetEntitlementsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetEntitlementsRequest.newBuilder() to construct. - private GetEntitlementsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetEntitlementsRequest() { - entities_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetEntitlementsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.GetEntitlementsRequest.class, io.opentdf.platform.authorization.GetEntitlementsRequest.Builder.class); - } - - private int bitField0_; - public static final int ENTITIES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List entities_; - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - @java.lang.Override - public java.util.List getEntitiesList() { - return entities_; - } - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - @java.lang.Override - public java.util.List - getEntitiesOrBuilderList() { - return entities_; - } - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - @java.lang.Override - public int getEntitiesCount() { - return entities_.size(); - } - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.Entity getEntities(int index) { - return entities_.get(index); - } - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( - int index) { - return entities_.get(index); - } - - public static final int SCOPE_FIELD_NUMBER = 2; - private io.opentdf.platform.authorization.ResourceAttribute scope_; - /** - *
-   *optional attribute fqn as a scope
-   * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - * @return Whether the scope field is set. - */ - @java.lang.Override - public boolean hasScope() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   *optional attribute fqn as a scope
-   * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - * @return The scope. - */ - @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttribute getScope() { - return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; - } - /** - *
-   *optional attribute fqn as a scope
-   * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder() { - return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < entities_.size(); i++) { - output.writeMessage(1, entities_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getScope()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < entities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, entities_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getScope()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.GetEntitlementsRequest)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.GetEntitlementsRequest other = (io.opentdf.platform.authorization.GetEntitlementsRequest) obj; - - if (!getEntitiesList() - .equals(other.getEntitiesList())) return false; - if (hasScope() != other.hasScope()) return false; - if (hasScope()) { - if (!getScope() - .equals(other.getScope())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getEntitiesCount() > 0) { - hash = (37 * hash) + ENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getEntitiesList().hashCode(); - } - if (hasScope()) { - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + getScope().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.GetEntitlementsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.GetEntitlementsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *Request to get entitlements for one or more entities for an optional attribute scope
-   *
-   *Example: Get entitlements for bob and alice (both represented using an email address
-   *
-   *{
-   *"entities": [
-   *{
-   *"id": "e1",
-   *"emailAddress": "bob@example.org"
-   *},
-   *{
-   *"id": "e2",
-   *"emailAddress": "alice@example.org"
-   *}
-   *]
-   *}
-   * 
- * - * Protobuf type {@code authorization.GetEntitlementsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.GetEntitlementsRequest) - io.opentdf.platform.authorization.GetEntitlementsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.GetEntitlementsRequest.class, io.opentdf.platform.authorization.GetEntitlementsRequest.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.GetEntitlementsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getEntitiesFieldBuilder(); - getScopeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (entitiesBuilder_ == null) { - entities_ = java.util.Collections.emptyList(); - } else { - entities_ = null; - entitiesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - scope_ = null; - if (scopeBuilder_ != null) { - scopeBuilder_.dispose(); - scopeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetEntitlementsRequest getDefaultInstanceForType() { - return io.opentdf.platform.authorization.GetEntitlementsRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetEntitlementsRequest build() { - io.opentdf.platform.authorization.GetEntitlementsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetEntitlementsRequest buildPartial() { - io.opentdf.platform.authorization.GetEntitlementsRequest result = new io.opentdf.platform.authorization.GetEntitlementsRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.authorization.GetEntitlementsRequest result) { - if (entitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - entities_ = java.util.Collections.unmodifiableList(entities_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.entities_ = entities_; - } else { - result.entities_ = entitiesBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.authorization.GetEntitlementsRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.scope_ = scopeBuilder_ == null - ? scope_ - : scopeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.GetEntitlementsRequest) { - return mergeFrom((io.opentdf.platform.authorization.GetEntitlementsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.GetEntitlementsRequest other) { - if (other == io.opentdf.platform.authorization.GetEntitlementsRequest.getDefaultInstance()) return this; - if (entitiesBuilder_ == null) { - if (!other.entities_.isEmpty()) { - if (entities_.isEmpty()) { - entities_ = other.entities_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEntitiesIsMutable(); - entities_.addAll(other.entities_); - } - onChanged(); - } - } else { - if (!other.entities_.isEmpty()) { - if (entitiesBuilder_.isEmpty()) { - entitiesBuilder_.dispose(); - entitiesBuilder_ = null; - entities_ = other.entities_; - bitField0_ = (bitField0_ & ~0x00000001); - entitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEntitiesFieldBuilder() : null; - } else { - entitiesBuilder_.addAllMessages(other.entities_); - } - } - } - if (other.hasScope()) { - mergeScope(other.getScope()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.authorization.Entity m = - input.readMessage( - io.opentdf.platform.authorization.Entity.parser(), - extensionRegistry); - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.add(m); - } else { - entitiesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: { - input.readMessage( - getScopeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List entities_ = - java.util.Collections.emptyList(); - private void ensureEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - entities_ = new java.util.ArrayList(entities_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder> entitiesBuilder_; - - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public java.util.List getEntitiesList() { - if (entitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(entities_); - } else { - return entitiesBuilder_.getMessageList(); - } - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public int getEntitiesCount() { - if (entitiesBuilder_ == null) { - return entities_.size(); - } else { - return entitiesBuilder_.getCount(); - } - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.Entity getEntities(int index) { - if (entitiesBuilder_ == null) { - return entities_.get(index); - } else { - return entitiesBuilder_.getMessage(index); - } - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder setEntities( - int index, io.opentdf.platform.authorization.Entity value) { - if (entitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitiesIsMutable(); - entities_.set(index, value); - onChanged(); - } else { - entitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder setEntities( - int index, io.opentdf.platform.authorization.Entity.Builder builderForValue) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.set(index, builderForValue.build()); - onChanged(); - } else { - entitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder addEntities(io.opentdf.platform.authorization.Entity value) { - if (entitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitiesIsMutable(); - entities_.add(value); - onChanged(); - } else { - entitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder addEntities( - int index, io.opentdf.platform.authorization.Entity value) { - if (entitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitiesIsMutable(); - entities_.add(index, value); - onChanged(); - } else { - entitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder addEntities( - io.opentdf.platform.authorization.Entity.Builder builderForValue) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.add(builderForValue.build()); - onChanged(); - } else { - entitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder addEntities( - int index, io.opentdf.platform.authorization.Entity.Builder builderForValue) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.add(index, builderForValue.build()); - onChanged(); - } else { - entitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder addAllEntities( - java.lang.Iterable values) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, entities_); - onChanged(); - } else { - entitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder clearEntities() { - if (entitiesBuilder_ == null) { - entities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - entitiesBuilder_.clear(); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public Builder removeEntities(int index) { - if (entitiesBuilder_ == null) { - ensureEntitiesIsMutable(); - entities_.remove(index); - onChanged(); - } else { - entitiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.Entity.Builder getEntitiesBuilder( - int index) { - return getEntitiesFieldBuilder().getBuilder(index); - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( - int index) { - if (entitiesBuilder_ == null) { - return entities_.get(index); } else { - return entitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public java.util.List - getEntitiesOrBuilderList() { - if (entitiesBuilder_ != null) { - return entitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(entities_); - } - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder() { - return getEntitiesFieldBuilder().addBuilder( - io.opentdf.platform.authorization.Entity.getDefaultInstance()); - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder( - int index) { - return getEntitiesFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.Entity.getDefaultInstance()); - } - /** - *
-     * list of requested entities
-     * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - public java.util.List - getEntitiesBuilderList() { - return getEntitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder> - getEntitiesFieldBuilder() { - if (entitiesBuilder_ == null) { - entitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Entity, io.opentdf.platform.authorization.Entity.Builder, io.opentdf.platform.authorization.EntityOrBuilder>( - entities_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - entities_ = null; - } - return entitiesBuilder_; - } - - private io.opentdf.platform.authorization.ResourceAttribute scope_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> scopeBuilder_; - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - * @return Whether the scope field is set. - */ - public boolean hasScope() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - * @return The scope. - */ - public io.opentdf.platform.authorization.ResourceAttribute getScope() { - if (scopeBuilder_ == null) { - return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; - } else { - return scopeBuilder_.getMessage(); - } - } - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - public Builder setScope(io.opentdf.platform.authorization.ResourceAttribute value) { - if (scopeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - scope_ = value; - } else { - scopeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - public Builder setScope( - io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { - if (scopeBuilder_ == null) { - scope_ = builderForValue.build(); - } else { - scopeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - public Builder mergeScope(io.opentdf.platform.authorization.ResourceAttribute value) { - if (scopeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - scope_ != null && - scope_ != io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()) { - getScopeBuilder().mergeFrom(value); - } else { - scope_ = value; - } - } else { - scopeBuilder_.mergeFrom(value); - } - if (scope_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - public Builder clearScope() { - bitField0_ = (bitField0_ & ~0x00000002); - scope_ = null; - if (scopeBuilder_ != null) { - scopeBuilder_.dispose(); - scopeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - public io.opentdf.platform.authorization.ResourceAttribute.Builder getScopeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getScopeFieldBuilder().getBuilder(); - } - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder() { - if (scopeBuilder_ != null) { - return scopeBuilder_.getMessageOrBuilder(); - } else { - return scope_ == null ? - io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; - } - } - /** - *
-     *optional attribute fqn as a scope
-     * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> - getScopeFieldBuilder() { - if (scopeBuilder_ == null) { - scopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder>( - getScope(), - getParentForChildren(), - isClean()); - scope_ = null; - } - return scopeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.GetEntitlementsRequest) - } - - // @@protoc_insertion_point(class_scope:authorization.GetEntitlementsRequest) - private static final io.opentdf.platform.authorization.GetEntitlementsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.GetEntitlementsRequest(); - } - - public static io.opentdf.platform.authorization.GetEntitlementsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetEntitlementsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetEntitlementsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java deleted file mode 100644 index af49f7b2..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface GetEntitlementsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.GetEntitlementsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - java.util.List - getEntitiesList(); - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - io.opentdf.platform.authorization.Entity getEntities(int index); - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - int getEntitiesCount(); - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - java.util.List - getEntitiesOrBuilderList(); - /** - *
-   * list of requested entities
-   * 
- * - * repeated .authorization.Entity entities = 1 [json_name = "entities"]; - */ - io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( - int index); - - /** - *
-   *optional attribute fqn as a scope
-   * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - * @return Whether the scope field is set. - */ - boolean hasScope(); - /** - *
-   *optional attribute fqn as a scope
-   * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - * @return The scope. - */ - io.opentdf.platform.authorization.ResourceAttribute getScope(); - /** - *
-   *optional attribute fqn as a scope
-   * 
- * - * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; - */ - io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponse.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponse.java deleted file mode 100644 index 652e467e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponse.java +++ /dev/null @@ -1,814 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - *
- *
- *
- *Example Response for a request of : Get entitlements for bob and alice (both represented using an email address
- *
- *{
- *"entitlements":  [
- *{
- *"entityId":  "e1",
- *"attributeValueReferences":  [
- *{
- *"attributeFqn":  "http://www.example.org/attr/foo/value/bar"
- *}
- *]
- *},
- *{
- *"entityId":  "e2",
- *"attributeValueReferences":  [
- *{
- *"attributeFqn":  "http://www.example.org/attr/color/value/red"
- *}
- *]
- *}
- *]
- *}
- * 
- * - * Protobuf type {@code authorization.GetEntitlementsResponse} - */ -public final class GetEntitlementsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.GetEntitlementsResponse) - GetEntitlementsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetEntitlementsResponse.newBuilder() to construct. - private GetEntitlementsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetEntitlementsResponse() { - entitlements_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetEntitlementsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.GetEntitlementsResponse.class, io.opentdf.platform.authorization.GetEntitlementsResponse.Builder.class); - } - - public static final int ENTITLEMENTS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List entitlements_; - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - @java.lang.Override - public java.util.List getEntitlementsList() { - return entitlements_; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - @java.lang.Override - public java.util.List - getEntitlementsOrBuilderList() { - return entitlements_; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - @java.lang.Override - public int getEntitlementsCount() { - return entitlements_.size(); - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityEntitlements getEntitlements(int index) { - return entitlements_.get(index); - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.EntityEntitlementsOrBuilder getEntitlementsOrBuilder( - int index) { - return entitlements_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < entitlements_.size(); i++) { - output.writeMessage(1, entitlements_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < entitlements_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, entitlements_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.GetEntitlementsResponse)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.GetEntitlementsResponse other = (io.opentdf.platform.authorization.GetEntitlementsResponse) obj; - - if (!getEntitlementsList() - .equals(other.getEntitlementsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getEntitlementsCount() > 0) { - hash = (37 * hash) + ENTITLEMENTS_FIELD_NUMBER; - hash = (53 * hash) + getEntitlementsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.GetEntitlementsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.GetEntitlementsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *
-   *Example Response for a request of : Get entitlements for bob and alice (both represented using an email address
-   *
-   *{
-   *"entitlements":  [
-   *{
-   *"entityId":  "e1",
-   *"attributeValueReferences":  [
-   *{
-   *"attributeFqn":  "http://www.example.org/attr/foo/value/bar"
-   *}
-   *]
-   *},
-   *{
-   *"entityId":  "e2",
-   *"attributeValueReferences":  [
-   *{
-   *"attributeFqn":  "http://www.example.org/attr/color/value/red"
-   *}
-   *]
-   *}
-   *]
-   *}
-   * 
- * - * Protobuf type {@code authorization.GetEntitlementsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.GetEntitlementsResponse) - io.opentdf.platform.authorization.GetEntitlementsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.GetEntitlementsResponse.class, io.opentdf.platform.authorization.GetEntitlementsResponse.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.GetEntitlementsResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (entitlementsBuilder_ == null) { - entitlements_ = java.util.Collections.emptyList(); - } else { - entitlements_ = null; - entitlementsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_GetEntitlementsResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetEntitlementsResponse getDefaultInstanceForType() { - return io.opentdf.platform.authorization.GetEntitlementsResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetEntitlementsResponse build() { - io.opentdf.platform.authorization.GetEntitlementsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetEntitlementsResponse buildPartial() { - io.opentdf.platform.authorization.GetEntitlementsResponse result = new io.opentdf.platform.authorization.GetEntitlementsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.authorization.GetEntitlementsResponse result) { - if (entitlementsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - entitlements_ = java.util.Collections.unmodifiableList(entitlements_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.entitlements_ = entitlements_; - } else { - result.entitlements_ = entitlementsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.authorization.GetEntitlementsResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.GetEntitlementsResponse) { - return mergeFrom((io.opentdf.platform.authorization.GetEntitlementsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.GetEntitlementsResponse other) { - if (other == io.opentdf.platform.authorization.GetEntitlementsResponse.getDefaultInstance()) return this; - if (entitlementsBuilder_ == null) { - if (!other.entitlements_.isEmpty()) { - if (entitlements_.isEmpty()) { - entitlements_ = other.entitlements_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEntitlementsIsMutable(); - entitlements_.addAll(other.entitlements_); - } - onChanged(); - } - } else { - if (!other.entitlements_.isEmpty()) { - if (entitlementsBuilder_.isEmpty()) { - entitlementsBuilder_.dispose(); - entitlementsBuilder_ = null; - entitlements_ = other.entitlements_; - bitField0_ = (bitField0_ & ~0x00000001); - entitlementsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEntitlementsFieldBuilder() : null; - } else { - entitlementsBuilder_.addAllMessages(other.entitlements_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.authorization.EntityEntitlements m = - input.readMessage( - io.opentdf.platform.authorization.EntityEntitlements.parser(), - extensionRegistry); - if (entitlementsBuilder_ == null) { - ensureEntitlementsIsMutable(); - entitlements_.add(m); - } else { - entitlementsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List entitlements_ = - java.util.Collections.emptyList(); - private void ensureEntitlementsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - entitlements_ = new java.util.ArrayList(entitlements_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.EntityEntitlements, io.opentdf.platform.authorization.EntityEntitlements.Builder, io.opentdf.platform.authorization.EntityEntitlementsOrBuilder> entitlementsBuilder_; - - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public java.util.List getEntitlementsList() { - if (entitlementsBuilder_ == null) { - return java.util.Collections.unmodifiableList(entitlements_); - } else { - return entitlementsBuilder_.getMessageList(); - } - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public int getEntitlementsCount() { - if (entitlementsBuilder_ == null) { - return entitlements_.size(); - } else { - return entitlementsBuilder_.getCount(); - } - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public io.opentdf.platform.authorization.EntityEntitlements getEntitlements(int index) { - if (entitlementsBuilder_ == null) { - return entitlements_.get(index); - } else { - return entitlementsBuilder_.getMessage(index); - } - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder setEntitlements( - int index, io.opentdf.platform.authorization.EntityEntitlements value) { - if (entitlementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitlementsIsMutable(); - entitlements_.set(index, value); - onChanged(); - } else { - entitlementsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder setEntitlements( - int index, io.opentdf.platform.authorization.EntityEntitlements.Builder builderForValue) { - if (entitlementsBuilder_ == null) { - ensureEntitlementsIsMutable(); - entitlements_.set(index, builderForValue.build()); - onChanged(); - } else { - entitlementsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder addEntitlements(io.opentdf.platform.authorization.EntityEntitlements value) { - if (entitlementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitlementsIsMutable(); - entitlements_.add(value); - onChanged(); - } else { - entitlementsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder addEntitlements( - int index, io.opentdf.platform.authorization.EntityEntitlements value) { - if (entitlementsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntitlementsIsMutable(); - entitlements_.add(index, value); - onChanged(); - } else { - entitlementsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder addEntitlements( - io.opentdf.platform.authorization.EntityEntitlements.Builder builderForValue) { - if (entitlementsBuilder_ == null) { - ensureEntitlementsIsMutable(); - entitlements_.add(builderForValue.build()); - onChanged(); - } else { - entitlementsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder addEntitlements( - int index, io.opentdf.platform.authorization.EntityEntitlements.Builder builderForValue) { - if (entitlementsBuilder_ == null) { - ensureEntitlementsIsMutable(); - entitlements_.add(index, builderForValue.build()); - onChanged(); - } else { - entitlementsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder addAllEntitlements( - java.lang.Iterable values) { - if (entitlementsBuilder_ == null) { - ensureEntitlementsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, entitlements_); - onChanged(); - } else { - entitlementsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder clearEntitlements() { - if (entitlementsBuilder_ == null) { - entitlements_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - entitlementsBuilder_.clear(); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public Builder removeEntitlements(int index) { - if (entitlementsBuilder_ == null) { - ensureEntitlementsIsMutable(); - entitlements_.remove(index); - onChanged(); - } else { - entitlementsBuilder_.remove(index); - } - return this; - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public io.opentdf.platform.authorization.EntityEntitlements.Builder getEntitlementsBuilder( - int index) { - return getEntitlementsFieldBuilder().getBuilder(index); - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public io.opentdf.platform.authorization.EntityEntitlementsOrBuilder getEntitlementsOrBuilder( - int index) { - if (entitlementsBuilder_ == null) { - return entitlements_.get(index); } else { - return entitlementsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public java.util.List - getEntitlementsOrBuilderList() { - if (entitlementsBuilder_ != null) { - return entitlementsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(entitlements_); - } - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public io.opentdf.platform.authorization.EntityEntitlements.Builder addEntitlementsBuilder() { - return getEntitlementsFieldBuilder().addBuilder( - io.opentdf.platform.authorization.EntityEntitlements.getDefaultInstance()); - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public io.opentdf.platform.authorization.EntityEntitlements.Builder addEntitlementsBuilder( - int index) { - return getEntitlementsFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.EntityEntitlements.getDefaultInstance()); - } - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - public java.util.List - getEntitlementsBuilderList() { - return getEntitlementsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.EntityEntitlements, io.opentdf.platform.authorization.EntityEntitlements.Builder, io.opentdf.platform.authorization.EntityEntitlementsOrBuilder> - getEntitlementsFieldBuilder() { - if (entitlementsBuilder_ == null) { - entitlementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.EntityEntitlements, io.opentdf.platform.authorization.EntityEntitlements.Builder, io.opentdf.platform.authorization.EntityEntitlementsOrBuilder>( - entitlements_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - entitlements_ = null; - } - return entitlementsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.GetEntitlementsResponse) - } - - // @@protoc_insertion_point(class_scope:authorization.GetEntitlementsResponse) - private static final io.opentdf.platform.authorization.GetEntitlementsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.GetEntitlementsResponse(); - } - - public static io.opentdf.platform.authorization.GetEntitlementsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetEntitlementsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.GetEntitlementsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponseOrBuilder.java deleted file mode 100644 index 8f0d42f7..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/GetEntitlementsResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface GetEntitlementsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.GetEntitlementsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - java.util.List - getEntitlementsList(); - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - io.opentdf.platform.authorization.EntityEntitlements getEntitlements(int index); - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - int getEntitlementsCount(); - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - java.util.List - getEntitlementsOrBuilderList(); - /** - * repeated .authorization.EntityEntitlements entitlements = 1 [json_name = "entitlements"]; - */ - io.opentdf.platform.authorization.EntityEntitlementsOrBuilder getEntitlementsOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttribute.java b/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttribute.java deleted file mode 100644 index 4d4e6784..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttribute.java +++ /dev/null @@ -1,603 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -/** - *
- *A logical bucket of attributes belonging to a "Resource"
- * 
- * - * Protobuf type {@code authorization.ResourceAttribute} - */ -public final class ResourceAttribute extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:authorization.ResourceAttribute) - ResourceAttributeOrBuilder { -private static final long serialVersionUID = 0L; - // Use ResourceAttribute.newBuilder() to construct. - private ResourceAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ResourceAttribute() { - attributeFqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ResourceAttribute(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.ResourceAttribute.class, io.opentdf.platform.authorization.ResourceAttribute.Builder.class); - } - - public static final int ATTRIBUTE_FQNS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList attributeFqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @return A list containing the attributeFqns. - */ - public com.google.protobuf.ProtocolStringList - getAttributeFqnsList() { - return attributeFqns_; - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @return The count of attributeFqns. - */ - public int getAttributeFqnsCount() { - return attributeFqns_.size(); - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param index The index of the element to return. - * @return The attributeFqns at the given index. - */ - public java.lang.String getAttributeFqns(int index) { - return attributeFqns_.get(index); - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param index The index of the value to return. - * @return The bytes of the attributeFqns at the given index. - */ - public com.google.protobuf.ByteString - getAttributeFqnsBytes(int index) { - return attributeFqns_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < attributeFqns_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeFqns_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < attributeFqns_.size(); i++) { - dataSize += computeStringSizeNoTag(attributeFqns_.getRaw(i)); - } - size += dataSize; - size += 1 * getAttributeFqnsList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.authorization.ResourceAttribute)) { - return super.equals(obj); - } - io.opentdf.platform.authorization.ResourceAttribute other = (io.opentdf.platform.authorization.ResourceAttribute) obj; - - if (!getAttributeFqnsList() - .equals(other.getAttributeFqnsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAttributeFqnsCount() > 0) { - hash = (37 * hash) + ATTRIBUTE_FQNS_FIELD_NUMBER; - hash = (53 * hash) + getAttributeFqnsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.authorization.ResourceAttribute parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.authorization.ResourceAttribute parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.authorization.ResourceAttribute prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *A logical bucket of attributes belonging to a "Resource"
-   * 
- * - * Protobuf type {@code authorization.ResourceAttribute} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:authorization.ResourceAttribute) - io.opentdf.platform.authorization.ResourceAttributeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.authorization.ResourceAttribute.class, io.opentdf.platform.authorization.ResourceAttribute.Builder.class); - } - - // Construct using io.opentdf.platform.authorization.ResourceAttribute.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeFqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttribute getDefaultInstanceForType() { - return io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttribute build() { - io.opentdf.platform.authorization.ResourceAttribute result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttribute buildPartial() { - io.opentdf.platform.authorization.ResourceAttribute result = new io.opentdf.platform.authorization.ResourceAttribute(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.authorization.ResourceAttribute result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - attributeFqns_.makeImmutable(); - result.attributeFqns_ = attributeFqns_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.authorization.ResourceAttribute) { - return mergeFrom((io.opentdf.platform.authorization.ResourceAttribute)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.authorization.ResourceAttribute other) { - if (other == io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()) return this; - if (!other.attributeFqns_.isEmpty()) { - if (attributeFqns_.isEmpty()) { - attributeFqns_ = other.attributeFqns_; - bitField0_ |= 0x00000001; - } else { - ensureAttributeFqnsIsMutable(); - attributeFqns_.addAll(other.attributeFqns_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - ensureAttributeFqnsIsMutable(); - attributeFqns_.add(s); - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringArrayList attributeFqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureAttributeFqnsIsMutable() { - if (!attributeFqns_.isModifiable()) { - attributeFqns_ = new com.google.protobuf.LazyStringArrayList(attributeFqns_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @return A list containing the attributeFqns. - */ - public com.google.protobuf.ProtocolStringList - getAttributeFqnsList() { - attributeFqns_.makeImmutable(); - return attributeFqns_; - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @return The count of attributeFqns. - */ - public int getAttributeFqnsCount() { - return attributeFqns_.size(); - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param index The index of the element to return. - * @return The attributeFqns at the given index. - */ - public java.lang.String getAttributeFqns(int index) { - return attributeFqns_.get(index); - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param index The index of the value to return. - * @return The bytes of the attributeFqns at the given index. - */ - public com.google.protobuf.ByteString - getAttributeFqnsBytes(int index) { - return attributeFqns_.getByteString(index); - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param index The index to set the value at. - * @param value The attributeFqns to set. - * @return This builder for chaining. - */ - public Builder setAttributeFqns( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAttributeFqnsIsMutable(); - attributeFqns_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param value The attributeFqns to add. - * @return This builder for chaining. - */ - public Builder addAttributeFqns( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAttributeFqnsIsMutable(); - attributeFqns_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param values The attributeFqns to add. - * @return This builder for chaining. - */ - public Builder addAllAttributeFqns( - java.lang.Iterable values) { - ensureAttributeFqnsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, attributeFqns_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @return This builder for chaining. - */ - public Builder clearAttributeFqns() { - attributeFqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param value The bytes of the attributeFqns to add. - * @return This builder for chaining. - */ - public Builder addAttributeFqnsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureAttributeFqnsIsMutable(); - attributeFqns_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:authorization.ResourceAttribute) - } - - // @@protoc_insertion_point(class_scope:authorization.ResourceAttribute) - private static final io.opentdf.platform.authorization.ResourceAttribute DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.authorization.ResourceAttribute(); - } - - public static io.opentdf.platform.authorization.ResourceAttribute getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResourceAttribute parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttribute getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java deleted file mode 100644 index 739a01bf..00000000 --- a/protocol/src/main/java/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: authorization/authorization.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.authorization; - -public interface ResourceAttributeOrBuilder extends - // @@protoc_insertion_point(interface_extends:authorization.ResourceAttribute) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @return A list containing the attributeFqns. - */ - java.util.List - getAttributeFqnsList(); - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @return The count of attributeFqns. - */ - int getAttributeFqnsCount(); - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param index The index of the element to return. - * @return The attributeFqns at the given index. - */ - java.lang.String getAttributeFqns(int index); - /** - * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; - * @param index The index of the value to return. - * @return The bytes of the attributeFqns at the given index. - */ - com.google.protobuf.ByteString - getAttributeFqnsBytes(int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/common/ActiveStateEnum.java b/protocol/src/main/java/io/opentdf/platform/common/ActiveStateEnum.java deleted file mode 100644 index db9c131d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/common/ActiveStateEnum.java +++ /dev/null @@ -1,136 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common/common.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.common; - -/** - *
- * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package
- * 
- * - * Protobuf enum {@code common.ActiveStateEnum} - */ -public enum ActiveStateEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ACTIVE_STATE_ENUM_UNSPECIFIED = 0; - */ - ACTIVE_STATE_ENUM_UNSPECIFIED(0), - /** - * ACTIVE_STATE_ENUM_ACTIVE = 1; - */ - ACTIVE_STATE_ENUM_ACTIVE(1), - /** - * ACTIVE_STATE_ENUM_INACTIVE = 2; - */ - ACTIVE_STATE_ENUM_INACTIVE(2), - /** - * ACTIVE_STATE_ENUM_ANY = 3; - */ - ACTIVE_STATE_ENUM_ANY(3), - UNRECOGNIZED(-1), - ; - - /** - * ACTIVE_STATE_ENUM_UNSPECIFIED = 0; - */ - public static final int ACTIVE_STATE_ENUM_UNSPECIFIED_VALUE = 0; - /** - * ACTIVE_STATE_ENUM_ACTIVE = 1; - */ - public static final int ACTIVE_STATE_ENUM_ACTIVE_VALUE = 1; - /** - * ACTIVE_STATE_ENUM_INACTIVE = 2; - */ - public static final int ACTIVE_STATE_ENUM_INACTIVE_VALUE = 2; - /** - * ACTIVE_STATE_ENUM_ANY = 3; - */ - public static final int ACTIVE_STATE_ENUM_ANY_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ActiveStateEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ActiveStateEnum forNumber(int value) { - switch (value) { - case 0: return ACTIVE_STATE_ENUM_UNSPECIFIED; - case 1: return ACTIVE_STATE_ENUM_ACTIVE; - case 2: return ACTIVE_STATE_ENUM_INACTIVE; - case 3: return ACTIVE_STATE_ENUM_ANY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ActiveStateEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ActiveStateEnum findValueByNumber(int number) { - return ActiveStateEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.opentdf.platform.common.CommonProto.getDescriptor().getEnumTypes().get(1); - } - - private static final ActiveStateEnum[] VALUES = values(); - - public static ActiveStateEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ActiveStateEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:common.ActiveStateEnum) -} - diff --git a/protocol/src/main/java/io/opentdf/platform/common/CommonProto.java b/protocol/src/main/java/io/opentdf/platform/common/CommonProto.java deleted file mode 100644 index 74dcdd27..00000000 --- a/protocol/src/main/java/io/opentdf/platform/common/CommonProto.java +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common/common.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.common; - -public final class CommonProto { - private CommonProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_common_Metadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_common_Metadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_common_Metadata_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_common_Metadata_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_common_MetadataMutable_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_common_MetadataMutable_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_common_MetadataMutable_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_common_MetadataMutable_LabelsEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\023common/common.proto\022\006common\032\037google/pr" + - "otobuf/timestamp.proto\"\361\001\n\010Metadata\0229\n\nc" + - "reated_at\030\001 \001(\0132\032.google.protobuf.Timest" + - "ampR\tcreatedAt\0229\n\nupdated_at\030\002 \001(\0132\032.goo" + - "gle.protobuf.TimestampR\tupdatedAt\0224\n\006lab" + - "els\030\003 \003(\0132\034.common.Metadata.LabelsEntryR" + - "\006labels\0329\n\013LabelsEntry\022\020\n\003key\030\001 \001(\tR\003key" + - "\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"\211\001\n\017MetadataM" + - "utable\022;\n\006labels\030\003 \003(\0132#.common.Metadata" + - "Mutable.LabelsEntryR\006labels\0329\n\013LabelsEnt" + - "ry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005val" + - "ue:\0028\001*}\n\022MetadataUpdateEnum\022$\n METADATA" + - "_UPDATE_ENUM_UNSPECIFIED\020\000\022\037\n\033METADATA_U" + - "PDATE_ENUM_EXTEND\020\001\022 \n\034METADATA_UPDATE_E" + - "NUM_REPLACE\020\002*\215\001\n\017ActiveStateEnum\022!\n\035ACT" + - "IVE_STATE_ENUM_UNSPECIFIED\020\000\022\034\n\030ACTIVE_S" + - "TATE_ENUM_ACTIVE\020\001\022\036\n\032ACTIVE_STATE_ENUM_" + - "INACTIVE\020\002\022\031\n\025ACTIVE_STATE_ENUM_ANY\020\003Ba\n" + - "\032io.opentdf.platform.commonB\013CommonProto" + - "P\001\242\002\003CXX\252\002\006Common\312\002\006Common\342\002\022Common\\GPBM" + - "etadata\352\002\006Commonb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_common_Metadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_common_Metadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_common_Metadata_descriptor, - new java.lang.String[] { "CreatedAt", "UpdatedAt", "Labels", }); - internal_static_common_Metadata_LabelsEntry_descriptor = - internal_static_common_Metadata_descriptor.getNestedTypes().get(0); - internal_static_common_Metadata_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_common_Metadata_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_common_MetadataMutable_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_common_MetadataMutable_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_common_MetadataMutable_descriptor, - new java.lang.String[] { "Labels", }); - internal_static_common_MetadataMutable_LabelsEntry_descriptor = - internal_static_common_MetadataMutable_descriptor.getNestedTypes().get(0); - internal_static_common_MetadataMutable_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_common_MetadataMutable_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/common/Metadata.java b/protocol/src/main/java/io/opentdf/platform/common/Metadata.java deleted file mode 100644 index 72e2d1a2..00000000 --- a/protocol/src/main/java/io/opentdf/platform/common/Metadata.java +++ /dev/null @@ -1,1211 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common/common.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.common; - -/** - *
- * Struct to uniquely identify a resource with optional additional metadata
- * 
- * - * Protobuf type {@code common.Metadata} - */ -public final class Metadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:common.Metadata) - MetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use Metadata.newBuilder() to construct. - private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Metadata() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Metadata(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.common.Metadata.class, io.opentdf.platform.common.Metadata.Builder.class); - } - - private int bitField0_; - public static final int CREATED_AT_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createdAt_; - /** - *
-   * created_at set by server (entity who created will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - * @return Whether the createdAt field is set. - */ - @java.lang.Override - public boolean hasCreatedAt() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * created_at set by server (entity who created will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - * @return The createdAt. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreatedAt() { - return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; - } - /** - *
-   * created_at set by server (entity who created will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { - return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; - } - - public static final int UPDATED_AT_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp updatedAt_; - /** - *
-   * updated_at set by server (entity who updated will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - * @return Whether the updatedAt field is set. - */ - @java.lang.Override - public boolean hasUpdatedAt() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * updated_at set by server (entity who updated will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - * @return The updatedAt. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdatedAt() { - return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; - } - /** - *
-   * updated_at set by server (entity who updated will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder() { - return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; - } - - public static final int LABELS_FIELD_NUMBER = 3; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getCreatedAt()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getUpdatedAt()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 3); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCreatedAt()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdatedAt()); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, labels__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.common.Metadata)) { - return super.equals(obj); - } - io.opentdf.platform.common.Metadata other = (io.opentdf.platform.common.Metadata) obj; - - if (hasCreatedAt() != other.hasCreatedAt()) return false; - if (hasCreatedAt()) { - if (!getCreatedAt() - .equals(other.getCreatedAt())) return false; - } - if (hasUpdatedAt() != other.hasUpdatedAt()) return false; - if (hasUpdatedAt()) { - if (!getUpdatedAt() - .equals(other.getUpdatedAt())) return false; - } - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreatedAt()) { - hash = (37 * hash) + CREATED_AT_FIELD_NUMBER; - hash = (53 * hash) + getCreatedAt().hashCode(); - } - if (hasUpdatedAt()) { - hash = (37 * hash) + UPDATED_AT_FIELD_NUMBER; - hash = (53 * hash) + getUpdatedAt().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.common.Metadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.common.Metadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.common.Metadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.common.Metadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.common.Metadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.common.Metadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.common.Metadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.common.Metadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.common.Metadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.common.Metadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.common.Metadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.common.Metadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.common.Metadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Struct to uniquely identify a resource with optional additional metadata
-   * 
- * - * Protobuf type {@code common.Metadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:common.Metadata) - io.opentdf.platform.common.MetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.common.Metadata.class, io.opentdf.platform.common.Metadata.Builder.class); - } - - // Construct using io.opentdf.platform.common.Metadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getCreatedAtFieldBuilder(); - getUpdatedAtFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - createdAt_ = null; - if (createdAtBuilder_ != null) { - createdAtBuilder_.dispose(); - createdAtBuilder_ = null; - } - updatedAt_ = null; - if (updatedAtBuilder_ != null) { - updatedAtBuilder_.dispose(); - updatedAtBuilder_ = null; - } - internalGetMutableLabels().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.common.CommonProto.internal_static_common_Metadata_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.common.Metadata getDefaultInstanceForType() { - return io.opentdf.platform.common.Metadata.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.common.Metadata build() { - io.opentdf.platform.common.Metadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.common.Metadata buildPartial() { - io.opentdf.platform.common.Metadata result = new io.opentdf.platform.common.Metadata(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.common.Metadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.createdAt_ = createdAtBuilder_ == null - ? createdAt_ - : createdAtBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.updatedAt_ = updatedAtBuilder_ == null - ? updatedAt_ - : updatedAtBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.common.Metadata) { - return mergeFrom((io.opentdf.platform.common.Metadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.common.Metadata other) { - if (other == io.opentdf.platform.common.Metadata.getDefaultInstance()) return this; - if (other.hasCreatedAt()) { - mergeCreatedAt(other.getCreatedAt()); - } - if (other.hasUpdatedAt()) { - mergeUpdatedAt(other.getUpdatedAt()); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - bitField0_ |= 0x00000004; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getCreatedAtFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getUpdatedAtFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableLabels().getMutableMap().put( - labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.Timestamp createdAt_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_; - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - * @return Whether the createdAt field is set. - */ - public boolean hasCreatedAt() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - * @return The createdAt. - */ - public com.google.protobuf.Timestamp getCreatedAt() { - if (createdAtBuilder_ == null) { - return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; - } else { - return createdAtBuilder_.getMessage(); - } - } - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - public Builder setCreatedAt(com.google.protobuf.Timestamp value) { - if (createdAtBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createdAt_ = value; - } else { - createdAtBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - public Builder setCreatedAt( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createdAtBuilder_ == null) { - createdAt_ = builderForValue.build(); - } else { - createdAtBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) { - if (createdAtBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - createdAt_ != null && - createdAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreatedAtBuilder().mergeFrom(value); - } else { - createdAt_ = value; - } - } else { - createdAtBuilder_.mergeFrom(value); - } - if (createdAt_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - public Builder clearCreatedAt() { - bitField0_ = (bitField0_ & ~0x00000001); - createdAt_ = null; - if (createdAtBuilder_ != null) { - createdAtBuilder_.dispose(); - createdAtBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getCreatedAtFieldBuilder().getBuilder(); - } - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() { - if (createdAtBuilder_ != null) { - return createdAtBuilder_.getMessageOrBuilder(); - } else { - return createdAt_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; - } - } - /** - *
-     * created_at set by server (entity who created will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreatedAtFieldBuilder() { - if (createdAtBuilder_ == null) { - createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreatedAt(), - getParentForChildren(), - isClean()); - createdAt_ = null; - } - return createdAtBuilder_; - } - - private com.google.protobuf.Timestamp updatedAt_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updatedAtBuilder_; - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - * @return Whether the updatedAt field is set. - */ - public boolean hasUpdatedAt() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - * @return The updatedAt. - */ - public com.google.protobuf.Timestamp getUpdatedAt() { - if (updatedAtBuilder_ == null) { - return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; - } else { - return updatedAtBuilder_.getMessage(); - } - } - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - public Builder setUpdatedAt(com.google.protobuf.Timestamp value) { - if (updatedAtBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updatedAt_ = value; - } else { - updatedAtBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - public Builder setUpdatedAt( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updatedAtBuilder_ == null) { - updatedAt_ = builderForValue.build(); - } else { - updatedAtBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - public Builder mergeUpdatedAt(com.google.protobuf.Timestamp value) { - if (updatedAtBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - updatedAt_ != null && - updatedAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdatedAtBuilder().mergeFrom(value); - } else { - updatedAt_ = value; - } - } else { - updatedAtBuilder_.mergeFrom(value); - } - if (updatedAt_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - public Builder clearUpdatedAt() { - bitField0_ = (bitField0_ & ~0x00000002); - updatedAt_ = null; - if (updatedAtBuilder_ != null) { - updatedAtBuilder_.dispose(); - updatedAtBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - public com.google.protobuf.Timestamp.Builder getUpdatedAtBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getUpdatedAtFieldBuilder().getBuilder(); - } - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - public com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder() { - if (updatedAtBuilder_ != null) { - return updatedAtBuilder_.getMessageOrBuilder(); - } else { - return updatedAt_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_; - } - } - /** - *
-     * updated_at set by server (entity who updated will recorded in an audit event)
-     * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdatedAtFieldBuilder() { - if (updatedAtBuilder_ == null) { - updatedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdatedAt(), - getParentForChildren(), - isClean()); - updatedAt_ = null; - } - return updatedAtBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000004; - onChanged(); - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * optional short description
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * optional short description
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * optional short description
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * optional short description
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000004); - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * optional short description
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - bitField0_ |= 0x00000004; - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * optional short description
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableLabels().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000004; - return this; - } - /** - *
-     * optional short description
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000004; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:common.Metadata) - } - - // @@protoc_insertion_point(class_scope:common.Metadata) - private static final io.opentdf.platform.common.Metadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.common.Metadata(); - } - - public static io.opentdf.platform.common.Metadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Metadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.common.Metadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/common/MetadataMutable.java b/protocol/src/main/java/io/opentdf/platform/common/MetadataMutable.java deleted file mode 100644 index 373d1442..00000000 --- a/protocol/src/main/java/io/opentdf/platform/common/MetadataMutable.java +++ /dev/null @@ -1,729 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common/common.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.common; - -/** - * Protobuf type {@code common.MetadataMutable} - */ -public final class MetadataMutable extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:common.MetadataMutable) - MetadataMutableOrBuilder { -private static final long serialVersionUID = 0L; - // Use MetadataMutable.newBuilder() to construct. - private MetadataMutable(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MetadataMutable() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MetadataMutable(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.common.MetadataMutable.class, io.opentdf.platform.common.MetadataMutable.Builder.class); - } - - public static final int LABELS_FIELD_NUMBER = 3; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 3); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, labels__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.common.MetadataMutable)) { - return super.equals(obj); - } - io.opentdf.platform.common.MetadataMutable other = (io.opentdf.platform.common.MetadataMutable) obj; - - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.common.MetadataMutable parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.common.MetadataMutable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.common.MetadataMutable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.common.MetadataMutable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.common.MetadataMutable prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code common.MetadataMutable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:common.MetadataMutable) - io.opentdf.platform.common.MetadataMutableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.common.MetadataMutable.class, io.opentdf.platform.common.MetadataMutable.Builder.class); - } - - // Construct using io.opentdf.platform.common.MetadataMutable.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableLabels().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.common.CommonProto.internal_static_common_MetadataMutable_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getDefaultInstanceForType() { - return io.opentdf.platform.common.MetadataMutable.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable build() { - io.opentdf.platform.common.MetadataMutable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable buildPartial() { - io.opentdf.platform.common.MetadataMutable result = new io.opentdf.platform.common.MetadataMutable(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.common.MetadataMutable result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.common.MetadataMutable) { - return mergeFrom((io.opentdf.platform.common.MetadataMutable)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.common.MetadataMutable other) { - if (other == io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) return this; - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - bitField0_ |= 0x00000001; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 26: { - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableLabels().getMutableMap().put( - labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * optional labels
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * optional labels
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * optional labels
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * optional labels
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * optional labels
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - bitField0_ |= 0x00000001; - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * optional labels
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableLabels().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - *
-     * optional labels
-     * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:common.MetadataMutable) - } - - // @@protoc_insertion_point(class_scope:common.MetadataMutable) - private static final io.opentdf.platform.common.MetadataMutable DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.common.MetadataMutable(); - } - - public static io.opentdf.platform.common.MetadataMutable getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataMutable parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/common/MetadataMutableOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/common/MetadataMutableOrBuilder.java deleted file mode 100644 index 8660768e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/common/MetadataMutableOrBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common/common.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.common; - -public interface MetadataMutableOrBuilder extends - // @@protoc_insertion_point(interface_extends:common.MetadataMutable) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - int getLabelsCount(); - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * optional labels
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - java.lang.String getLabelsOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/io/opentdf/platform/common/MetadataOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/common/MetadataOrBuilder.java deleted file mode 100644 index 024b9fb0..00000000 --- a/protocol/src/main/java/io/opentdf/platform/common/MetadataOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common/common.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.common; - -public interface MetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:common.Metadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * created_at set by server (entity who created will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - * @return Whether the createdAt field is set. - */ - boolean hasCreatedAt(); - /** - *
-   * created_at set by server (entity who created will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - * @return The createdAt. - */ - com.google.protobuf.Timestamp getCreatedAt(); - /** - *
-   * created_at set by server (entity who created will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp created_at = 1 [json_name = "createdAt"]; - */ - com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder(); - - /** - *
-   * updated_at set by server (entity who updated will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - * @return Whether the updatedAt field is set. - */ - boolean hasUpdatedAt(); - /** - *
-   * updated_at set by server (entity who updated will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - * @return The updatedAt. - */ - com.google.protobuf.Timestamp getUpdatedAt(); - /** - *
-   * updated_at set by server (entity who updated will recorded in an audit event)
-   * 
- * - * .google.protobuf.Timestamp updated_at = 2 [json_name = "updatedAt"]; - */ - com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder(); - - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - int getLabelsCount(); - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * optional short description
-   * 
- * - * map<string, string> labels = 3 [json_name = "labels"]; - */ - java.lang.String getLabelsOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/io/opentdf/platform/common/MetadataUpdateEnum.java b/protocol/src/main/java/io/opentdf/platform/common/MetadataUpdateEnum.java deleted file mode 100644 index 2f8c1b7f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/common/MetadataUpdateEnum.java +++ /dev/null @@ -1,147 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common/common.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.common; - -/** - * Protobuf enum {@code common.MetadataUpdateEnum} - */ -public enum MetadataUpdateEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * unspecified update type
-   * 
- * - * METADATA_UPDATE_ENUM_UNSPECIFIED = 0; - */ - METADATA_UPDATE_ENUM_UNSPECIFIED(0), - /** - *
-   * only update the fields that are provided
-   * 
- * - * METADATA_UPDATE_ENUM_EXTEND = 1; - */ - METADATA_UPDATE_ENUM_EXTEND(1), - /** - *
-   * replace the entire metadata with the provided metadata
-   * 
- * - * METADATA_UPDATE_ENUM_REPLACE = 2; - */ - METADATA_UPDATE_ENUM_REPLACE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * unspecified update type
-   * 
- * - * METADATA_UPDATE_ENUM_UNSPECIFIED = 0; - */ - public static final int METADATA_UPDATE_ENUM_UNSPECIFIED_VALUE = 0; - /** - *
-   * only update the fields that are provided
-   * 
- * - * METADATA_UPDATE_ENUM_EXTEND = 1; - */ - public static final int METADATA_UPDATE_ENUM_EXTEND_VALUE = 1; - /** - *
-   * replace the entire metadata with the provided metadata
-   * 
- * - * METADATA_UPDATE_ENUM_REPLACE = 2; - */ - public static final int METADATA_UPDATE_ENUM_REPLACE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetadataUpdateEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MetadataUpdateEnum forNumber(int value) { - switch (value) { - case 0: return METADATA_UPDATE_ENUM_UNSPECIFIED; - case 1: return METADATA_UPDATE_ENUM_EXTEND; - case 2: return METADATA_UPDATE_ENUM_REPLACE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - MetadataUpdateEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MetadataUpdateEnum findValueByNumber(int number) { - return MetadataUpdateEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.opentdf.platform.common.CommonProto.getDescriptor().getEnumTypes().get(0); - } - - private static final MetadataUpdateEnum[] VALUES = values(); - - public static MetadataUpdateEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MetadataUpdateEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:common.MetadataUpdateEnum) -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kas/AccessServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/kas/AccessServiceGrpc.java deleted file mode 100644 index a17f2676..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/AccessServiceGrpc.java +++ /dev/null @@ -1,557 +0,0 @@ -package io.opentdf.platform.kas; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Get app info from the root path
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.61.1)", - comments = "Source: kas/kas.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class AccessServiceGrpc { - - private AccessServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "kas.AccessService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getInfoMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "Info", - requestType = io.opentdf.platform.kas.InfoRequest.class, - responseType = io.opentdf.platform.kas.InfoResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getInfoMethod() { - io.grpc.MethodDescriptor getInfoMethod; - if ((getInfoMethod = AccessServiceGrpc.getInfoMethod) == null) { - synchronized (AccessServiceGrpc.class) { - if ((getInfoMethod = AccessServiceGrpc.getInfoMethod) == null) { - AccessServiceGrpc.getInfoMethod = getInfoMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Info")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kas.InfoRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kas.InfoResponse.getDefaultInstance())) - .setSchemaDescriptor(new AccessServiceMethodDescriptorSupplier("Info")) - .build(); - } - } - } - return getInfoMethod; - } - - private static volatile io.grpc.MethodDescriptor getPublicKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PublicKey", - requestType = io.opentdf.platform.kas.PublicKeyRequest.class, - responseType = io.opentdf.platform.kas.PublicKeyResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getPublicKeyMethod() { - io.grpc.MethodDescriptor getPublicKeyMethod; - if ((getPublicKeyMethod = AccessServiceGrpc.getPublicKeyMethod) == null) { - synchronized (AccessServiceGrpc.class) { - if ((getPublicKeyMethod = AccessServiceGrpc.getPublicKeyMethod) == null) { - AccessServiceGrpc.getPublicKeyMethod = getPublicKeyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PublicKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kas.PublicKeyRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kas.PublicKeyResponse.getDefaultInstance())) - .setSchemaDescriptor(new AccessServiceMethodDescriptorSupplier("PublicKey")) - .build(); - } - } - } - return getPublicKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor getLegacyPublicKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "LegacyPublicKey", - requestType = io.opentdf.platform.kas.LegacyPublicKeyRequest.class, - responseType = com.google.protobuf.StringValue.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getLegacyPublicKeyMethod() { - io.grpc.MethodDescriptor getLegacyPublicKeyMethod; - if ((getLegacyPublicKeyMethod = AccessServiceGrpc.getLegacyPublicKeyMethod) == null) { - synchronized (AccessServiceGrpc.class) { - if ((getLegacyPublicKeyMethod = AccessServiceGrpc.getLegacyPublicKeyMethod) == null) { - AccessServiceGrpc.getLegacyPublicKeyMethod = getLegacyPublicKeyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LegacyPublicKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kas.LegacyPublicKeyRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.StringValue.getDefaultInstance())) - .setSchemaDescriptor(new AccessServiceMethodDescriptorSupplier("LegacyPublicKey")) - .build(); - } - } - } - return getLegacyPublicKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor getRewrapMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "Rewrap", - requestType = io.opentdf.platform.kas.RewrapRequest.class, - responseType = io.opentdf.platform.kas.RewrapResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRewrapMethod() { - io.grpc.MethodDescriptor getRewrapMethod; - if ((getRewrapMethod = AccessServiceGrpc.getRewrapMethod) == null) { - synchronized (AccessServiceGrpc.class) { - if ((getRewrapMethod = AccessServiceGrpc.getRewrapMethod) == null) { - AccessServiceGrpc.getRewrapMethod = getRewrapMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Rewrap")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kas.RewrapRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kas.RewrapResponse.getDefaultInstance())) - .setSchemaDescriptor(new AccessServiceMethodDescriptorSupplier("Rewrap")) - .build(); - } - } - } - return getRewrapMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static AccessServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AccessServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AccessServiceStub(channel, callOptions); - } - }; - return AccessServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static AccessServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AccessServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AccessServiceBlockingStub(channel, callOptions); - } - }; - return AccessServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static AccessServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AccessServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AccessServiceFutureStub(channel, callOptions); - } - }; - return AccessServiceFutureStub.newStub(factory, channel); - } - - /** - *
-   * Get app info from the root path
-   * 
- */ - public interface AsyncService { - - /** - *
-     * Get the current version of the service
-     * 
- */ - default void info(io.opentdf.platform.kas.InfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getInfoMethod(), responseObserver); - } - - /** - */ - default void publicKey(io.opentdf.platform.kas.PublicKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPublicKeyMethod(), responseObserver); - } - - /** - *
-     * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
-     * 
- */ - default void legacyPublicKey(io.opentdf.platform.kas.LegacyPublicKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLegacyPublicKeyMethod(), responseObserver); - } - - /** - */ - default void rewrap(io.opentdf.platform.kas.RewrapRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRewrapMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service AccessService. - *
-   * Get app info from the root path
-   * 
- */ - public static abstract class AccessServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return AccessServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service AccessService. - *
-   * Get app info from the root path
-   * 
- */ - public static final class AccessServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private AccessServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AccessServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AccessServiceStub(channel, callOptions); - } - - /** - *
-     * Get the current version of the service
-     * 
- */ - public void info(io.opentdf.platform.kas.InfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getInfoMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void publicKey(io.opentdf.platform.kas.PublicKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPublicKeyMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
-     * 
- */ - public void legacyPublicKey(io.opentdf.platform.kas.LegacyPublicKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getLegacyPublicKeyMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void rewrap(io.opentdf.platform.kas.RewrapRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRewrapMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service AccessService. - *
-   * Get app info from the root path
-   * 
- */ - public static final class AccessServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private AccessServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AccessServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AccessServiceBlockingStub(channel, callOptions); - } - - /** - *
-     * Get the current version of the service
-     * 
- */ - public io.opentdf.platform.kas.InfoResponse info(io.opentdf.platform.kas.InfoRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getInfoMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.kas.PublicKeyResponse publicKey(io.opentdf.platform.kas.PublicKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPublicKeyMethod(), getCallOptions(), request); - } - - /** - *
-     * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
-     * 
- */ - public com.google.protobuf.StringValue legacyPublicKey(io.opentdf.platform.kas.LegacyPublicKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getLegacyPublicKeyMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.kas.RewrapResponse rewrap(io.opentdf.platform.kas.RewrapRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRewrapMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service AccessService. - *
-   * Get app info from the root path
-   * 
- */ - public static final class AccessServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private AccessServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AccessServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AccessServiceFutureStub(channel, callOptions); - } - - /** - *
-     * Get the current version of the service
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture info( - io.opentdf.platform.kas.InfoRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getInfoMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture publicKey( - io.opentdf.platform.kas.PublicKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPublicKeyMethod(), getCallOptions()), request); - } - - /** - *
-     * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture legacyPublicKey( - io.opentdf.platform.kas.LegacyPublicKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getLegacyPublicKeyMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture rewrap( - io.opentdf.platform.kas.RewrapRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRewrapMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_INFO = 0; - private static final int METHODID_PUBLIC_KEY = 1; - private static final int METHODID_LEGACY_PUBLIC_KEY = 2; - private static final int METHODID_REWRAP = 3; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_INFO: - serviceImpl.info((io.opentdf.platform.kas.InfoRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_PUBLIC_KEY: - serviceImpl.publicKey((io.opentdf.platform.kas.PublicKeyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LEGACY_PUBLIC_KEY: - serviceImpl.legacyPublicKey((io.opentdf.platform.kas.LegacyPublicKeyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REWRAP: - serviceImpl.rewrap((io.opentdf.platform.kas.RewrapRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getInfoMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kas.InfoRequest, - io.opentdf.platform.kas.InfoResponse>( - service, METHODID_INFO))) - .addMethod( - getPublicKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kas.PublicKeyRequest, - io.opentdf.platform.kas.PublicKeyResponse>( - service, METHODID_PUBLIC_KEY))) - .addMethod( - getLegacyPublicKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kas.LegacyPublicKeyRequest, - com.google.protobuf.StringValue>( - service, METHODID_LEGACY_PUBLIC_KEY))) - .addMethod( - getRewrapMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kas.RewrapRequest, - io.opentdf.platform.kas.RewrapResponse>( - service, METHODID_REWRAP))) - .build(); - } - - private static abstract class AccessServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - AccessServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.opentdf.platform.kas.KasProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("AccessService"); - } - } - - private static final class AccessServiceFileDescriptorSupplier - extends AccessServiceBaseDescriptorSupplier { - AccessServiceFileDescriptorSupplier() {} - } - - private static final class AccessServiceMethodDescriptorSupplier - extends AccessServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - AccessServiceMethodDescriptorSupplier(java.lang.String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (AccessServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AccessServiceFileDescriptorSupplier()) - .addMethod(getInfoMethod()) - .addMethod(getPublicKeyMethod()) - .addMethod(getLegacyPublicKeyMethod()) - .addMethod(getRewrapMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/InfoRequest.java b/protocol/src/main/java/io/opentdf/platform/kas/InfoRequest.java deleted file mode 100644 index 552c717e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/InfoRequest.java +++ /dev/null @@ -1,407 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -/** - *
- * Intentionally empty. May include features later.
- * 
- * - * Protobuf type {@code kas.InfoRequest} - */ -public final class InfoRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kas.InfoRequest) - InfoRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use InfoRequest.newBuilder() to construct. - private InfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.InfoRequest.class, io.opentdf.platform.kas.InfoRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kas.InfoRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kas.InfoRequest other = (io.opentdf.platform.kas.InfoRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kas.InfoRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kas.InfoRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kas.InfoRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.InfoRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kas.InfoRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Intentionally empty. May include features later.
-   * 
- * - * Protobuf type {@code kas.InfoRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kas.InfoRequest) - io.opentdf.platform.kas.InfoRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.InfoRequest.class, io.opentdf.platform.kas.InfoRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kas.InfoRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kas.InfoRequest getDefaultInstanceForType() { - return io.opentdf.platform.kas.InfoRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kas.InfoRequest build() { - io.opentdf.platform.kas.InfoRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kas.InfoRequest buildPartial() { - io.opentdf.platform.kas.InfoRequest result = new io.opentdf.platform.kas.InfoRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kas.InfoRequest) { - return mergeFrom((io.opentdf.platform.kas.InfoRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kas.InfoRequest other) { - if (other == io.opentdf.platform.kas.InfoRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kas.InfoRequest) - } - - // @@protoc_insertion_point(class_scope:kas.InfoRequest) - private static final io.opentdf.platform.kas.InfoRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kas.InfoRequest(); - } - - public static io.opentdf.platform.kas.InfoRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kas.InfoRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kas/InfoRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/InfoRequestOrBuilder.java deleted file mode 100644 index 3481b3b6..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/InfoRequestOrBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -public interface InfoRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kas.InfoRequest) - com.google.protobuf.MessageOrBuilder { -} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/InfoResponse.java b/protocol/src/main/java/io/opentdf/platform/kas/InfoResponse.java deleted file mode 100644 index 64c0c131..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/InfoResponse.java +++ /dev/null @@ -1,550 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -/** - *
- * Service application level metadata
- * 
- * - * Protobuf type {@code kas.InfoResponse} - */ -public final class InfoResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kas.InfoResponse) - InfoResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use InfoResponse.newBuilder() to construct. - private InfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoResponse() { - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.InfoResponse.class, io.opentdf.platform.kas.InfoResponse.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; - /** - * string version = 1 [json_name = "version"]; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * string version = 1 [json_name = "version"]; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kas.InfoResponse)) { - return super.equals(obj); - } - io.opentdf.platform.kas.InfoResponse other = (io.opentdf.platform.kas.InfoResponse) obj; - - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kas.InfoResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kas.InfoResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kas.InfoResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.InfoResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kas.InfoResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Service application level metadata
-   * 
- * - * Protobuf type {@code kas.InfoResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kas.InfoResponse) - io.opentdf.platform.kas.InfoResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.InfoResponse.class, io.opentdf.platform.kas.InfoResponse.Builder.class); - } - - // Construct using io.opentdf.platform.kas.InfoResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - version_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_InfoResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kas.InfoResponse getDefaultInstanceForType() { - return io.opentdf.platform.kas.InfoResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kas.InfoResponse build() { - io.opentdf.platform.kas.InfoResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kas.InfoResponse buildPartial() { - io.opentdf.platform.kas.InfoResponse result = new io.opentdf.platform.kas.InfoResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kas.InfoResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kas.InfoResponse) { - return mergeFrom((io.opentdf.platform.kas.InfoResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kas.InfoResponse other) { - if (other == io.opentdf.platform.kas.InfoResponse.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * string version = 1 [json_name = "version"]; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string version = 1 [json_name = "version"]; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string version = 1 [json_name = "version"]; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string version = 1 [json_name = "version"]; - * @return This builder for chaining. - */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string version = 1 [json_name = "version"]; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - version_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kas.InfoResponse) - } - - // @@protoc_insertion_point(class_scope:kas.InfoResponse) - private static final io.opentdf.platform.kas.InfoResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kas.InfoResponse(); - } - - public static io.opentdf.platform.kas.InfoResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kas.InfoResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kas/InfoResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/InfoResponseOrBuilder.java deleted file mode 100644 index bf9ade1a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/InfoResponseOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -public interface InfoResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:kas.InfoResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * string version = 1 [json_name = "version"]; - * @return The version. - */ - java.lang.String getVersion(); - /** - * string version = 1 [json_name = "version"]; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/KasProto.java b/protocol/src/main/java/io/opentdf/platform/kas/KasProto.java deleted file mode 100644 index 0ca13ac3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/KasProto.java +++ /dev/null @@ -1,175 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -public final class KasProto { - private KasProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kas_InfoRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kas_InfoRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kas_InfoResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kas_InfoResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kas_LegacyPublicKeyRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kas_LegacyPublicKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kas_PublicKeyRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kas_PublicKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kas_PublicKeyResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kas_PublicKeyResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kas_RewrapRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kas_RewrapRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kas_RewrapResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kas_RewrapResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kas_RewrapResponse_MetadataEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kas_RewrapResponse_MetadataEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\rkas/kas.proto\022\003kas\032\034google/api/annotat" + - "ions.proto\032\034google/protobuf/struct.proto" + - "\032\036google/protobuf/wrappers.proto\032.protoc" + - "-gen-openapiv2/options/annotations.proto" + - "\"\r\n\013InfoRequest\"(\n\014InfoResponse\022\030\n\007versi" + - "on\030\001 \001(\tR\007version\"6\n\026LegacyPublicKeyRequ" + - "est\022\034\n\talgorithm\030\001 \001(\tR\talgorithm\"l\n\020Pub" + - "licKeyRequest\022\034\n\talgorithm\030\001 \001(\tR\talgori" + - "thm\022\036\n\003fmt\030\002 \001(\tB\014\222A\t2\007versionR\003fmt\022\032\n\001v" + - "\030\003 \001(\tB\014\222A\t2\007versionR\001v\"2\n\021PublicKeyResp" + - "onse\022\035\n\npublic_key\030\001 \001(\tR\tpublicKey\"Y\n\rR" + - "ewrapRequest\0220\n\024signed_request_token\030\001 \001" + - "(\tR\022signedRequestToken\022\026\n\006bearer\030\002 \001(\tR\006" + - "bearer\"\247\002\n\016RewrapResponse\022=\n\010metadata\030\001 " + - "\003(\0132!.kas.RewrapResponse.MetadataEntryR\010" + - "metadata\022,\n\022entity_wrapped_key\030\002 \001(\014R\020en" + - "tityWrappedKey\022,\n\022session_public_key\030\003 \001" + - "(\tR\020sessionPublicKey\022%\n\016schema_version\030\004" + - " \001(\tR\rschemaVersion\032S\n\rMetadataEntry\022\020\n\003" + - "key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.p" + - "rotobuf.ValueR\005value:\0028\0012\217\003\n\rAccessServi" + - "ce\022E\n\004Info\022\020.kas.InfoRequest\032\021.kas.InfoR" + - "esponse\"\030\222A\tJ\007\n\003200\022\000\202\323\344\223\002\006\022\004/kas\022f\n\tPub" + - "licKey\022\025.kas.PublicKeyRequest\032\026.kas.Publ" + - "icKeyResponse\"*\222A\tJ\007\n\003200\022\000\202\323\344\223\002\030\022\026/kas/" + - "v2/kas_public_key\022u\n\017LegacyPublicKey\022\033.k" + - "as.LegacyPublicKeyRequest\032\034.google.proto" + - "buf.StringValue\"\'\222A\tJ\007\n\003200\022\000\202\323\344\223\002\025\022\023/ka" + - "s/kas_public_key\022X\n\006Rewrap\022\022.kas.RewrapR" + - "equest\032\023.kas.RewrapResponse\"%\222A\tJ\007\n\003200\022" + - "\000\202\323\344\223\002\023\"\016/kas/v2/rewrap:\001*B\305\001\n\027io.opentd" + - "f.platform.kasB\010KasProtoP\001\242\002\003KXX\252\002\003Kas\312\002" + - "\003Kas\342\002\017Kas\\GPBMetadata\352\002\003Kas\222As\022q\n\032OpenT" + - "DF Key Access Service*L\n\022BSD 3-Clause Cl" + - "ear\0226https://github.com/opentdf/backend/" + - "blob/master/LICENSE2\0051.5.0b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(), - }); - internal_static_kas_InfoRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_kas_InfoRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kas_InfoRequest_descriptor, - new java.lang.String[] { }); - internal_static_kas_InfoResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_kas_InfoResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kas_InfoResponse_descriptor, - new java.lang.String[] { "Version", }); - internal_static_kas_LegacyPublicKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_kas_LegacyPublicKeyRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kas_LegacyPublicKeyRequest_descriptor, - new java.lang.String[] { "Algorithm", }); - internal_static_kas_PublicKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_kas_PublicKeyRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kas_PublicKeyRequest_descriptor, - new java.lang.String[] { "Algorithm", "Fmt", "V", }); - internal_static_kas_PublicKeyResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_kas_PublicKeyResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kas_PublicKeyResponse_descriptor, - new java.lang.String[] { "PublicKey", }); - internal_static_kas_RewrapRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_kas_RewrapRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kas_RewrapRequest_descriptor, - new java.lang.String[] { "SignedRequestToken", "Bearer", }); - internal_static_kas_RewrapResponse_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_kas_RewrapResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kas_RewrapResponse_descriptor, - new java.lang.String[] { "Metadata", "EntityWrappedKey", "SessionPublicKey", "SchemaVersion", }); - internal_static_kas_RewrapResponse_MetadataEntry_descriptor = - internal_static_kas_RewrapResponse_descriptor.getNestedTypes().get(0); - internal_static_kas_RewrapResponse_MetadataEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kas_RewrapResponse_MetadataEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Field); - registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation); - registry.add(grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequest.java b/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequest.java deleted file mode 100644 index e9dc9d3e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -/** - * Protobuf type {@code kas.LegacyPublicKeyRequest} - */ -public final class LegacyPublicKeyRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kas.LegacyPublicKeyRequest) - LegacyPublicKeyRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use LegacyPublicKeyRequest.newBuilder() to construct. - private LegacyPublicKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LegacyPublicKeyRequest() { - algorithm_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LegacyPublicKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.LegacyPublicKeyRequest.class, io.opentdf.platform.kas.LegacyPublicKeyRequest.Builder.class); - } - - public static final int ALGORITHM_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object algorithm_ = ""; - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The algorithm. - */ - @java.lang.Override - public java.lang.String getAlgorithm() { - java.lang.Object ref = algorithm_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - algorithm_ = s; - return s; - } - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The bytes for algorithm. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAlgorithmBytes() { - java.lang.Object ref = algorithm_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - algorithm_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, algorithm_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, algorithm_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kas.LegacyPublicKeyRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kas.LegacyPublicKeyRequest other = (io.opentdf.platform.kas.LegacyPublicKeyRequest) obj; - - if (!getAlgorithm() - .equals(other.getAlgorithm())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ALGORITHM_FIELD_NUMBER; - hash = (53 * hash) + getAlgorithm().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.LegacyPublicKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kas.LegacyPublicKeyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kas.LegacyPublicKeyRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kas.LegacyPublicKeyRequest) - io.opentdf.platform.kas.LegacyPublicKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.LegacyPublicKeyRequest.class, io.opentdf.platform.kas.LegacyPublicKeyRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kas.LegacyPublicKeyRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - algorithm_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_LegacyPublicKeyRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kas.LegacyPublicKeyRequest getDefaultInstanceForType() { - return io.opentdf.platform.kas.LegacyPublicKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kas.LegacyPublicKeyRequest build() { - io.opentdf.platform.kas.LegacyPublicKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kas.LegacyPublicKeyRequest buildPartial() { - io.opentdf.platform.kas.LegacyPublicKeyRequest result = new io.opentdf.platform.kas.LegacyPublicKeyRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kas.LegacyPublicKeyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.algorithm_ = algorithm_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kas.LegacyPublicKeyRequest) { - return mergeFrom((io.opentdf.platform.kas.LegacyPublicKeyRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kas.LegacyPublicKeyRequest other) { - if (other == io.opentdf.platform.kas.LegacyPublicKeyRequest.getDefaultInstance()) return this; - if (!other.getAlgorithm().isEmpty()) { - algorithm_ = other.algorithm_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - algorithm_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object algorithm_ = ""; - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The algorithm. - */ - public java.lang.String getAlgorithm() { - java.lang.Object ref = algorithm_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - algorithm_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The bytes for algorithm. - */ - public com.google.protobuf.ByteString - getAlgorithmBytes() { - java.lang.Object ref = algorithm_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - algorithm_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @param value The algorithm to set. - * @return This builder for chaining. - */ - public Builder setAlgorithm( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - algorithm_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return This builder for chaining. - */ - public Builder clearAlgorithm() { - algorithm_ = getDefaultInstance().getAlgorithm(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @param value The bytes for algorithm to set. - * @return This builder for chaining. - */ - public Builder setAlgorithmBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - algorithm_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kas.LegacyPublicKeyRequest) - } - - // @@protoc_insertion_point(class_scope:kas.LegacyPublicKeyRequest) - private static final io.opentdf.platform.kas.LegacyPublicKeyRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kas.LegacyPublicKeyRequest(); - } - - public static io.opentdf.platform.kas.LegacyPublicKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LegacyPublicKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kas.LegacyPublicKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequestOrBuilder.java deleted file mode 100644 index 09be01fa..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/LegacyPublicKeyRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -public interface LegacyPublicKeyRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kas.LegacyPublicKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The algorithm. - */ - java.lang.String getAlgorithm(); - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The bytes for algorithm. - */ - com.google.protobuf.ByteString - getAlgorithmBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequest.java b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequest.java deleted file mode 100644 index 892bf709..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequest.java +++ /dev/null @@ -1,814 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -/** - * Protobuf type {@code kas.PublicKeyRequest} - */ -public final class PublicKeyRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kas.PublicKeyRequest) - PublicKeyRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use PublicKeyRequest.newBuilder() to construct. - private PublicKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PublicKeyRequest() { - algorithm_ = ""; - fmt_ = ""; - v_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PublicKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.PublicKeyRequest.class, io.opentdf.platform.kas.PublicKeyRequest.Builder.class); - } - - public static final int ALGORITHM_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object algorithm_ = ""; - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The algorithm. - */ - @java.lang.Override - public java.lang.String getAlgorithm() { - java.lang.Object ref = algorithm_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - algorithm_ = s; - return s; - } - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The bytes for algorithm. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAlgorithmBytes() { - java.lang.Object ref = algorithm_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - algorithm_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FMT_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object fmt_ = ""; - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The fmt. - */ - @java.lang.Override - public java.lang.String getFmt() { - java.lang.Object ref = fmt_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fmt_ = s; - return s; - } - } - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The bytes for fmt. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFmtBytes() { - java.lang.Object ref = fmt_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fmt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int V_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object v_ = ""; - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The v. - */ - @java.lang.Override - public java.lang.String getV() { - java.lang.Object ref = v_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v_ = s; - return s; - } - } - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The bytes for v. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVBytes() { - java.lang.Object ref = v_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, algorithm_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fmt_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fmt_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, v_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(algorithm_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, algorithm_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fmt_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fmt_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, v_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kas.PublicKeyRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kas.PublicKeyRequest other = (io.opentdf.platform.kas.PublicKeyRequest) obj; - - if (!getAlgorithm() - .equals(other.getAlgorithm())) return false; - if (!getFmt() - .equals(other.getFmt())) return false; - if (!getV() - .equals(other.getV())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ALGORITHM_FIELD_NUMBER; - hash = (53 * hash) + getAlgorithm().hashCode(); - hash = (37 * hash) + FMT_FIELD_NUMBER; - hash = (53 * hash) + getFmt().hashCode(); - hash = (37 * hash) + V_FIELD_NUMBER; - hash = (53 * hash) + getV().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kas.PublicKeyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kas.PublicKeyRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.PublicKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kas.PublicKeyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kas.PublicKeyRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kas.PublicKeyRequest) - io.opentdf.platform.kas.PublicKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.PublicKeyRequest.class, io.opentdf.platform.kas.PublicKeyRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kas.PublicKeyRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - algorithm_ = ""; - fmt_ = ""; - v_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kas.PublicKeyRequest getDefaultInstanceForType() { - return io.opentdf.platform.kas.PublicKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kas.PublicKeyRequest build() { - io.opentdf.platform.kas.PublicKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kas.PublicKeyRequest buildPartial() { - io.opentdf.platform.kas.PublicKeyRequest result = new io.opentdf.platform.kas.PublicKeyRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kas.PublicKeyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.algorithm_ = algorithm_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fmt_ = fmt_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.v_ = v_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kas.PublicKeyRequest) { - return mergeFrom((io.opentdf.platform.kas.PublicKeyRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kas.PublicKeyRequest other) { - if (other == io.opentdf.platform.kas.PublicKeyRequest.getDefaultInstance()) return this; - if (!other.getAlgorithm().isEmpty()) { - algorithm_ = other.algorithm_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFmt().isEmpty()) { - fmt_ = other.fmt_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getV().isEmpty()) { - v_ = other.v_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - algorithm_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - fmt_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - v_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object algorithm_ = ""; - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The algorithm. - */ - public java.lang.String getAlgorithm() { - java.lang.Object ref = algorithm_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - algorithm_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The bytes for algorithm. - */ - public com.google.protobuf.ByteString - getAlgorithmBytes() { - java.lang.Object ref = algorithm_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - algorithm_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @param value The algorithm to set. - * @return This builder for chaining. - */ - public Builder setAlgorithm( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - algorithm_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return This builder for chaining. - */ - public Builder clearAlgorithm() { - algorithm_ = getDefaultInstance().getAlgorithm(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @param value The bytes for algorithm to set. - * @return This builder for chaining. - */ - public Builder setAlgorithmBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - algorithm_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object fmt_ = ""; - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The fmt. - */ - public java.lang.String getFmt() { - java.lang.Object ref = fmt_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fmt_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The bytes for fmt. - */ - public com.google.protobuf.ByteString - getFmtBytes() { - java.lang.Object ref = fmt_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fmt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @param value The fmt to set. - * @return This builder for chaining. - */ - public Builder setFmt( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fmt_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return This builder for chaining. - */ - public Builder clearFmt() { - fmt_ = getDefaultInstance().getFmt(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @param value The bytes for fmt to set. - * @return This builder for chaining. - */ - public Builder setFmtBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fmt_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object v_ = ""; - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The v. - */ - public java.lang.String getV() { - java.lang.Object ref = v_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - v_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The bytes for v. - */ - public com.google.protobuf.ByteString - getVBytes() { - java.lang.Object ref = v_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - v_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @param value The v to set. - * @return This builder for chaining. - */ - public Builder setV( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - v_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return This builder for chaining. - */ - public Builder clearV() { - v_ = getDefaultInstance().getV(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @param value The bytes for v to set. - * @return This builder for chaining. - */ - public Builder setVBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - v_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kas.PublicKeyRequest) - } - - // @@protoc_insertion_point(class_scope:kas.PublicKeyRequest) - private static final io.opentdf.platform.kas.PublicKeyRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kas.PublicKeyRequest(); - } - - public static io.opentdf.platform.kas.PublicKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublicKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kas.PublicKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequestOrBuilder.java deleted file mode 100644 index ec1c94fd..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyRequestOrBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -public interface PublicKeyRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kas.PublicKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The algorithm. - */ - java.lang.String getAlgorithm(); - /** - * string algorithm = 1 [json_name = "algorithm"]; - * @return The bytes for algorithm. - */ - com.google.protobuf.ByteString - getAlgorithmBytes(); - - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The fmt. - */ - java.lang.String getFmt(); - /** - * string fmt = 2 [json_name = "fmt", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The bytes for fmt. - */ - com.google.protobuf.ByteString - getFmtBytes(); - - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The v. - */ - java.lang.String getV(); - /** - * string v = 3 [json_name = "v", (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... } - * @return The bytes for v. - */ - com.google.protobuf.ByteString - getVBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponse.java b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponse.java deleted file mode 100644 index 92d4aefc..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponse.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -/** - * Protobuf type {@code kas.PublicKeyResponse} - */ -public final class PublicKeyResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kas.PublicKeyResponse) - PublicKeyResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use PublicKeyResponse.newBuilder() to construct. - private PublicKeyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PublicKeyResponse() { - publicKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PublicKeyResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.PublicKeyResponse.class, io.opentdf.platform.kas.PublicKeyResponse.Builder.class); - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object publicKey_ = ""; - /** - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kas.PublicKeyResponse)) { - return super.equals(obj); - } - io.opentdf.platform.kas.PublicKeyResponse other = (io.opentdf.platform.kas.PublicKeyResponse) obj; - - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kas.PublicKeyResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kas.PublicKeyResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.PublicKeyResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kas.PublicKeyResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kas.PublicKeyResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kas.PublicKeyResponse) - io.opentdf.platform.kas.PublicKeyResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.PublicKeyResponse.class, io.opentdf.platform.kas.PublicKeyResponse.Builder.class); - } - - // Construct using io.opentdf.platform.kas.PublicKeyResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - publicKey_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_PublicKeyResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kas.PublicKeyResponse getDefaultInstanceForType() { - return io.opentdf.platform.kas.PublicKeyResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kas.PublicKeyResponse build() { - io.opentdf.platform.kas.PublicKeyResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kas.PublicKeyResponse buildPartial() { - io.opentdf.platform.kas.PublicKeyResponse result = new io.opentdf.platform.kas.PublicKeyResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kas.PublicKeyResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.publicKey_ = publicKey_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kas.PublicKeyResponse) { - return mergeFrom((io.opentdf.platform.kas.PublicKeyResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kas.PublicKeyResponse other) { - if (other == io.opentdf.platform.kas.PublicKeyResponse.getDefaultInstance()) return this; - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - publicKey_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object publicKey_ = ""; - /** - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string public_key = 1 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - publicKey_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string public_key = 1 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - publicKey_ = getDefaultInstance().getPublicKey(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string public_key = 1 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - publicKey_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kas.PublicKeyResponse) - } - - // @@protoc_insertion_point(class_scope:kas.PublicKeyResponse) - private static final io.opentdf.platform.kas.PublicKeyResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kas.PublicKeyResponse(); - } - - public static io.opentdf.platform.kas.PublicKeyResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublicKeyResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kas.PublicKeyResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponseOrBuilder.java deleted file mode 100644 index cde3047a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/PublicKeyResponseOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -public interface PublicKeyResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:kas.PublicKeyResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequest.java b/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequest.java deleted file mode 100644 index b5782e60..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequest.java +++ /dev/null @@ -1,678 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -/** - * Protobuf type {@code kas.RewrapRequest} - */ -public final class RewrapRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kas.RewrapRequest) - RewrapRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RewrapRequest.newBuilder() to construct. - private RewrapRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RewrapRequest() { - signedRequestToken_ = ""; - bearer_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RewrapRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.RewrapRequest.class, io.opentdf.platform.kas.RewrapRequest.Builder.class); - } - - public static final int SIGNED_REQUEST_TOKEN_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object signedRequestToken_ = ""; - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @return The signedRequestToken. - */ - @java.lang.Override - public java.lang.String getSignedRequestToken() { - java.lang.Object ref = signedRequestToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signedRequestToken_ = s; - return s; - } - } - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @return The bytes for signedRequestToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignedRequestTokenBytes() { - java.lang.Object ref = signedRequestToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signedRequestToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BEARER_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object bearer_ = ""; - /** - * string bearer = 2 [json_name = "bearer"]; - * @return The bearer. - */ - @java.lang.Override - public java.lang.String getBearer() { - java.lang.Object ref = bearer_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bearer_ = s; - return s; - } - } - /** - * string bearer = 2 [json_name = "bearer"]; - * @return The bytes for bearer. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBearerBytes() { - java.lang.Object ref = bearer_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - bearer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRequestToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signedRequestToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bearer_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bearer_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRequestToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signedRequestToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bearer_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bearer_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kas.RewrapRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kas.RewrapRequest other = (io.opentdf.platform.kas.RewrapRequest) obj; - - if (!getSignedRequestToken() - .equals(other.getSignedRequestToken())) return false; - if (!getBearer() - .equals(other.getBearer())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SIGNED_REQUEST_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getSignedRequestToken().hashCode(); - hash = (37 * hash) + BEARER_FIELD_NUMBER; - hash = (53 * hash) + getBearer().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kas.RewrapRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kas.RewrapRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kas.RewrapRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.RewrapRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kas.RewrapRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kas.RewrapRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kas.RewrapRequest) - io.opentdf.platform.kas.RewrapRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.RewrapRequest.class, io.opentdf.platform.kas.RewrapRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kas.RewrapRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - signedRequestToken_ = ""; - bearer_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kas.RewrapRequest getDefaultInstanceForType() { - return io.opentdf.platform.kas.RewrapRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kas.RewrapRequest build() { - io.opentdf.platform.kas.RewrapRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kas.RewrapRequest buildPartial() { - io.opentdf.platform.kas.RewrapRequest result = new io.opentdf.platform.kas.RewrapRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kas.RewrapRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.signedRequestToken_ = signedRequestToken_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.bearer_ = bearer_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kas.RewrapRequest) { - return mergeFrom((io.opentdf.platform.kas.RewrapRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kas.RewrapRequest other) { - if (other == io.opentdf.platform.kas.RewrapRequest.getDefaultInstance()) return this; - if (!other.getSignedRequestToken().isEmpty()) { - signedRequestToken_ = other.signedRequestToken_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBearer().isEmpty()) { - bearer_ = other.bearer_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - signedRequestToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - bearer_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object signedRequestToken_ = ""; - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @return The signedRequestToken. - */ - public java.lang.String getSignedRequestToken() { - java.lang.Object ref = signedRequestToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signedRequestToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @return The bytes for signedRequestToken. - */ - public com.google.protobuf.ByteString - getSignedRequestTokenBytes() { - java.lang.Object ref = signedRequestToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signedRequestToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @param value The signedRequestToken to set. - * @return This builder for chaining. - */ - public Builder setSignedRequestToken( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - signedRequestToken_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @return This builder for chaining. - */ - public Builder clearSignedRequestToken() { - signedRequestToken_ = getDefaultInstance().getSignedRequestToken(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @param value The bytes for signedRequestToken to set. - * @return This builder for chaining. - */ - public Builder setSignedRequestTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - signedRequestToken_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object bearer_ = ""; - /** - * string bearer = 2 [json_name = "bearer"]; - * @return The bearer. - */ - public java.lang.String getBearer() { - java.lang.Object ref = bearer_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bearer_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string bearer = 2 [json_name = "bearer"]; - * @return The bytes for bearer. - */ - public com.google.protobuf.ByteString - getBearerBytes() { - java.lang.Object ref = bearer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - bearer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string bearer = 2 [json_name = "bearer"]; - * @param value The bearer to set. - * @return This builder for chaining. - */ - public Builder setBearer( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - bearer_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string bearer = 2 [json_name = "bearer"]; - * @return This builder for chaining. - */ - public Builder clearBearer() { - bearer_ = getDefaultInstance().getBearer(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string bearer = 2 [json_name = "bearer"]; - * @param value The bytes for bearer to set. - * @return This builder for chaining. - */ - public Builder setBearerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - bearer_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kas.RewrapRequest) - } - - // @@protoc_insertion_point(class_scope:kas.RewrapRequest) - private static final io.opentdf.platform.kas.RewrapRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kas.RewrapRequest(); - } - - public static io.opentdf.platform.kas.RewrapRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RewrapRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kas.RewrapRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequestOrBuilder.java deleted file mode 100644 index 72c4fb87..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/RewrapRequestOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -public interface RewrapRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kas.RewrapRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @return The signedRequestToken. - */ - java.lang.String getSignedRequestToken(); - /** - * string signed_request_token = 1 [json_name = "signedRequestToken"]; - * @return The bytes for signedRequestToken. - */ - com.google.protobuf.ByteString - getSignedRequestTokenBytes(); - - /** - * string bearer = 2 [json_name = "bearer"]; - * @return The bearer. - */ - java.lang.String getBearer(); - /** - * string bearer = 2 [json_name = "bearer"]; - * @return The bytes for bearer. - */ - com.google.protobuf.ByteString - getBearerBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponse.java b/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponse.java deleted file mode 100644 index 47caeae3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponse.java +++ /dev/null @@ -1,1051 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -/** - * Protobuf type {@code kas.RewrapResponse} - */ -public final class RewrapResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kas.RewrapResponse) - RewrapResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use RewrapResponse.newBuilder() to construct. - private RewrapResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RewrapResponse() { - entityWrappedKey_ = com.google.protobuf.ByteString.EMPTY; - sessionPublicKey_ = ""; - schemaVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RewrapResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMetadata(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.RewrapResponse.class, io.opentdf.platform.kas.RewrapResponse.Builder.class); - } - - public static final int METADATA_FIELD_NUMBER = 1; - private static final class MetadataDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Value> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_MetadataEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Value> metadata_; - private com.google.protobuf.MapField - internalGetMetadata() { - if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MetadataDefaultEntryHolder.defaultEntry); - } - return metadata_; - } - public int getMetadataCount() { - return internalGetMetadata().getMap().size(); - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public boolean containsMetadata( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetMetadata().getMap().containsKey(key); - } - /** - * Use {@link #getMetadataMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMetadata() { - return getMetadataMap(); - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public java.util.Map getMetadataMap() { - return internalGetMetadata().getMap(); - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getMetadataOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMetadata().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public com.google.protobuf.Value getMetadataOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMetadata().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ENTITY_WRAPPED_KEY_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString entityWrappedKey_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; - * @return The entityWrappedKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEntityWrappedKey() { - return entityWrappedKey_; - } - - public static final int SESSION_PUBLIC_KEY_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object sessionPublicKey_ = ""; - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @return The sessionPublicKey. - */ - @java.lang.Override - public java.lang.String getSessionPublicKey() { - java.lang.Object ref = sessionPublicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sessionPublicKey_ = s; - return s; - } - } - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @return The bytes for sessionPublicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSessionPublicKeyBytes() { - java.lang.Object ref = sessionPublicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sessionPublicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCHEMA_VERSION_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object schemaVersion_ = ""; - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @return The schemaVersion. - */ - @java.lang.Override - public java.lang.String getSchemaVersion() { - java.lang.Object ref = schemaVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - schemaVersion_ = s; - return s; - } - } - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @return The bytes for schemaVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSchemaVersionBytes() { - java.lang.Object ref = schemaVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - schemaVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetMetadata(), - MetadataDefaultEntryHolder.defaultEntry, - 1); - if (!entityWrappedKey_.isEmpty()) { - output.writeBytes(2, entityWrappedKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionPublicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sessionPublicKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, schemaVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetMetadata().getMap().entrySet()) { - com.google.protobuf.MapEntry - metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, metadata__); - } - if (!entityWrappedKey_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, entityWrappedKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionPublicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sessionPublicKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, schemaVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kas.RewrapResponse)) { - return super.equals(obj); - } - io.opentdf.platform.kas.RewrapResponse other = (io.opentdf.platform.kas.RewrapResponse) obj; - - if (!internalGetMetadata().equals( - other.internalGetMetadata())) return false; - if (!getEntityWrappedKey() - .equals(other.getEntityWrappedKey())) return false; - if (!getSessionPublicKey() - .equals(other.getSessionPublicKey())) return false; - if (!getSchemaVersion() - .equals(other.getSchemaVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetMetadata().getMap().isEmpty()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + internalGetMetadata().hashCode(); - } - hash = (37 * hash) + ENTITY_WRAPPED_KEY_FIELD_NUMBER; - hash = (53 * hash) + getEntityWrappedKey().hashCode(); - hash = (37 * hash) + SESSION_PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getSessionPublicKey().hashCode(); - hash = (37 * hash) + SCHEMA_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getSchemaVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kas.RewrapResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kas.RewrapResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kas.RewrapResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kas.RewrapResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kas.RewrapResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kas.RewrapResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kas.RewrapResponse) - io.opentdf.platform.kas.RewrapResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMetadata(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableMetadata(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kas.RewrapResponse.class, io.opentdf.platform.kas.RewrapResponse.Builder.class); - } - - // Construct using io.opentdf.platform.kas.RewrapResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableMetadata().clear(); - entityWrappedKey_ = com.google.protobuf.ByteString.EMPTY; - sessionPublicKey_ = ""; - schemaVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kas.KasProto.internal_static_kas_RewrapResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kas.RewrapResponse getDefaultInstanceForType() { - return io.opentdf.platform.kas.RewrapResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kas.RewrapResponse build() { - io.opentdf.platform.kas.RewrapResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kas.RewrapResponse buildPartial() { - io.opentdf.platform.kas.RewrapResponse result = new io.opentdf.platform.kas.RewrapResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kas.RewrapResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.metadata_ = internalGetMetadata().build(MetadataDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.entityWrappedKey_ = entityWrappedKey_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.sessionPublicKey_ = sessionPublicKey_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.schemaVersion_ = schemaVersion_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kas.RewrapResponse) { - return mergeFrom((io.opentdf.platform.kas.RewrapResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kas.RewrapResponse other) { - if (other == io.opentdf.platform.kas.RewrapResponse.getDefaultInstance()) return this; - internalGetMutableMetadata().mergeFrom( - other.internalGetMetadata()); - bitField0_ |= 0x00000001; - if (other.getEntityWrappedKey() != com.google.protobuf.ByteString.EMPTY) { - setEntityWrappedKey(other.getEntityWrappedKey()); - } - if (!other.getSessionPublicKey().isEmpty()) { - sessionPublicKey_ = other.sessionPublicKey_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getSchemaVersion().isEmpty()) { - schemaVersion_ = other.schemaVersion_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.MapEntry - metadata__ = input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableMetadata().ensureBuilderMap().put( - metadata__.getKey(), metadata__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - entityWrappedKey_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - sessionPublicKey_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - schemaVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private static final class MetadataConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return MetadataDefaultEntryHolder.defaultEntry; - } - }; - private static final MetadataConverter metadataConverter = new MetadataConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> metadata_; - private com.google.protobuf.MapFieldBuilder - internalGetMetadata() { - if (metadata_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(metadataConverter); - } - return metadata_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableMetadata() { - if (metadata_ == null) { - metadata_ = new com.google.protobuf.MapFieldBuilder<>(metadataConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return metadata_; - } - public int getMetadataCount() { - return internalGetMetadata().ensureBuilderMap().size(); - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public boolean containsMetadata( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetMetadata().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getMetadataMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMetadata() { - return getMetadataMap(); - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public java.util.Map getMetadataMap() { - return internalGetMetadata().getImmutableMap(); - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Value getMetadataOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableMetadata().ensureBuilderMap(); - return map.containsKey(key) ? metadataConverter.build(map.get(key)) : defaultValue; - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public com.google.protobuf.Value getMetadataOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableMetadata().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return metadataConverter.build(map.get(key)); - } - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableMetadata().clear(); - return this; - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - public Builder removeMetadata( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableMetadata().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableMetadata() { - bitField0_ |= 0x00000001; - return internalGetMutableMetadata().ensureMessageMap(); - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - public Builder putMetadata( - java.lang.String key, - com.google.protobuf.Value value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableMetadata().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - public Builder putAllMetadata( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableMetadata().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - public com.google.protobuf.Value.Builder putMetadataBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableMetadata().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - - private com.google.protobuf.ByteString entityWrappedKey_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; - * @return The entityWrappedKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEntityWrappedKey() { - return entityWrappedKey_; - } - /** - * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; - * @param value The entityWrappedKey to set. - * @return This builder for chaining. - */ - public Builder setEntityWrappedKey(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - entityWrappedKey_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; - * @return This builder for chaining. - */ - public Builder clearEntityWrappedKey() { - bitField0_ = (bitField0_ & ~0x00000002); - entityWrappedKey_ = getDefaultInstance().getEntityWrappedKey(); - onChanged(); - return this; - } - - private java.lang.Object sessionPublicKey_ = ""; - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @return The sessionPublicKey. - */ - public java.lang.String getSessionPublicKey() { - java.lang.Object ref = sessionPublicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sessionPublicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @return The bytes for sessionPublicKey. - */ - public com.google.protobuf.ByteString - getSessionPublicKeyBytes() { - java.lang.Object ref = sessionPublicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sessionPublicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @param value The sessionPublicKey to set. - * @return This builder for chaining. - */ - public Builder setSessionPublicKey( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - sessionPublicKey_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @return This builder for chaining. - */ - public Builder clearSessionPublicKey() { - sessionPublicKey_ = getDefaultInstance().getSessionPublicKey(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @param value The bytes for sessionPublicKey to set. - * @return This builder for chaining. - */ - public Builder setSessionPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - sessionPublicKey_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object schemaVersion_ = ""; - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @return The schemaVersion. - */ - public java.lang.String getSchemaVersion() { - java.lang.Object ref = schemaVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - schemaVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @return The bytes for schemaVersion. - */ - public com.google.protobuf.ByteString - getSchemaVersionBytes() { - java.lang.Object ref = schemaVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - schemaVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @param value The schemaVersion to set. - * @return This builder for chaining. - */ - public Builder setSchemaVersion( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - schemaVersion_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @return This builder for chaining. - */ - public Builder clearSchemaVersion() { - schemaVersion_ = getDefaultInstance().getSchemaVersion(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @param value The bytes for schemaVersion to set. - * @return This builder for chaining. - */ - public Builder setSchemaVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - schemaVersion_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kas.RewrapResponse) - } - - // @@protoc_insertion_point(class_scope:kas.RewrapResponse) - private static final io.opentdf.platform.kas.RewrapResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kas.RewrapResponse(); - } - - public static io.opentdf.platform.kas.RewrapResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RewrapResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kas.RewrapResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponseOrBuilder.java deleted file mode 100644 index cc98d8b8..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kas/RewrapResponseOrBuilder.java +++ /dev/null @@ -1,74 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kas/kas.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kas; - -public interface RewrapResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:kas.RewrapResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - int getMetadataCount(); - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - boolean containsMetadata( - java.lang.String key); - /** - * Use {@link #getMetadataMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getMetadata(); - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - java.util.Map - getMetadataMap(); - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - /* nullable */ -com.google.protobuf.Value getMetadataOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Value defaultValue); - /** - * map<string, .google.protobuf.Value> metadata = 1 [json_name = "metadata"]; - */ - com.google.protobuf.Value getMetadataOrThrow( - java.lang.String key); - - /** - * bytes entity_wrapped_key = 2 [json_name = "entityWrappedKey"]; - * @return The entityWrappedKey. - */ - com.google.protobuf.ByteString getEntityWrappedKey(); - - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @return The sessionPublicKey. - */ - java.lang.String getSessionPublicKey(); - /** - * string session_public_key = 3 [json_name = "sessionPublicKey"]; - * @return The bytes for sessionPublicKey. - */ - com.google.protobuf.ByteString - getSessionPublicKeyBytes(); - - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @return The schemaVersion. - */ - java.lang.String getSchemaVersion(); - /** - * string schema_version = 4 [json_name = "schemaVersion"]; - * @return The bytes for schemaVersion. - */ - com.google.protobuf.ByteString - getSchemaVersionBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequest.java deleted file mode 100644 index f82c08b4..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequest.java +++ /dev/null @@ -1,996 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.CreateKeyAccessServerRequest} - */ -public final class CreateKeyAccessServerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.CreateKeyAccessServerRequest) - CreateKeyAccessServerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateKeyAccessServerRequest.newBuilder() to construct. - private CreateKeyAccessServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateKeyAccessServerRequest() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateKeyAccessServerRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.Builder.class); - } - - private int bitField0_; - public static final int URI_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - *
-   * Required
-   * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 2; - private io.opentdf.platform.kasregistry.PublicKey publicKey_; - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return Whether the publicKey field is set. - */ - @java.lang.Override - public boolean hasPublicKey() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return The publicKey. - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getPublicKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getPublicKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest other = (io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (hasPublicKey() != other.hasPublicKey()) return false; - if (hasPublicKey()) { - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (hasPublicKey()) { - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.CreateKeyAccessServerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.CreateKeyAccessServerRequest) - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPublicKeyFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - publicKey_ = null; - if (publicKeyBuilder_ != null) { - publicKeyBuilder_.dispose(); - publicKeyBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest build() { - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest buildPartial() { - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest result = new io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.publicKey_ = publicKeyBuilder_ == null - ? publicKey_ - : publicKeyBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest) { - return mergeFrom((io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest other) { - if (other == io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasPublicKey()) { - mergePublicKey(other.getPublicKey()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getPublicKeyFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object uri_ = ""; - /** - *
-     * Required
-     * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.kasregistry.PublicKey publicKey_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> publicKeyBuilder_; - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return Whether the publicKey field is set. - */ - public boolean hasPublicKey() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return The publicKey. - */ - public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { - if (publicKeyBuilder_ == null) { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } else { - return publicKeyBuilder_.getMessage(); - } - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public Builder setPublicKey(io.opentdf.platform.kasregistry.PublicKey value) { - if (publicKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - publicKey_ = value; - } else { - publicKeyBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public Builder setPublicKey( - io.opentdf.platform.kasregistry.PublicKey.Builder builderForValue) { - if (publicKeyBuilder_ == null) { - publicKey_ = builderForValue.build(); - } else { - publicKeyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public Builder mergePublicKey(io.opentdf.platform.kasregistry.PublicKey value) { - if (publicKeyBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - publicKey_ != null && - publicKey_ != io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance()) { - getPublicKeyBuilder().mergeFrom(value); - } else { - publicKey_ = value; - } - } else { - publicKeyBuilder_.mergeFrom(value); - } - if (publicKey_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public Builder clearPublicKey() { - bitField0_ = (bitField0_ & ~0x00000002); - publicKey_ = null; - if (publicKeyBuilder_ != null) { - publicKeyBuilder_.dispose(); - publicKeyBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.kasregistry.PublicKey.Builder getPublicKeyBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getPublicKeyFieldBuilder().getBuilder(); - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { - if (publicKeyBuilder_ != null) { - return publicKeyBuilder_.getMessageOrBuilder(); - } else { - return publicKey_ == null ? - io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - } - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> - getPublicKeyFieldBuilder() { - if (publicKeyBuilder_ == null) { - publicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder>( - getPublicKey(), - getParentForChildren(), - isClean()); - publicKey_ = null; - } - return publicKeyBuilder_; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.CreateKeyAccessServerRequest) - } - - // @@protoc_insertion_point(class_scope:kasregistry.CreateKeyAccessServerRequest) - private static final io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest(); - } - - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateKeyAccessServerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequestOrBuilder.java deleted file mode 100644 index 77a6b081..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerRequestOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface CreateKeyAccessServerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.CreateKeyAccessServerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Required
-   * 
- * - * string uri = 1 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return Whether the publicKey field is set. - */ - boolean hasPublicKey(); - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return The publicKey. - */ - io.opentdf.platform.kasregistry.PublicKey getPublicKey(); - /** - * .kasregistry.PublicKey public_key = 2 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder(); - - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponse.java deleted file mode 100644 index bffb9030..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.CreateKeyAccessServerResponse} - */ -public final class CreateKeyAccessServerResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.CreateKeyAccessServerResponse) - CreateKeyAccessServerResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateKeyAccessServerResponse.newBuilder() to construct. - private CreateKeyAccessServerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateKeyAccessServerResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateKeyAccessServerResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.Builder.class); - } - - private int bitField0_; - public static final int KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - @java.lang.Override - public boolean hasKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse other = (io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse) obj; - - if (hasKeyAccessServer() != other.hasKeyAccessServer()) return false; - if (hasKeyAccessServer()) { - if (!getKeyAccessServer() - .equals(other.getKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKeyAccessServer()) { - hash = (37 * hash) + KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.CreateKeyAccessServerResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.CreateKeyAccessServerResponse) - io.opentdf.platform.kasregistry.CreateKeyAccessServerResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - keyAccessServer_ = null; - if (keyAccessServerBuilder_ != null) { - keyAccessServerBuilder_.dispose(); - keyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse build() { - io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse buildPartial() { - io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse result = new io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.keyAccessServer_ = keyAccessServerBuilder_ == null - ? keyAccessServer_ - : keyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse) { - return mergeFrom((io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse other) { - if (other == io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.getDefaultInstance()) return this; - if (other.hasKeyAccessServer()) { - mergeKeyAccessServer(other.getKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServerBuilder_; - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - public boolean hasKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { - if (keyAccessServerBuilder_ == null) { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } else { - return keyAccessServerBuilder_.getMessage(); - } - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder setKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - keyAccessServer_ = value; - } else { - keyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder setKeyAccessServer( - io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (keyAccessServerBuilder_ == null) { - keyAccessServer_ = builderForValue.build(); - } else { - keyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder mergeKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - keyAccessServer_ != null && - keyAccessServer_ != io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) { - getKeyAccessServerBuilder().mergeFrom(value); - } else { - keyAccessServer_ = value; - } - } else { - keyAccessServerBuilder_.mergeFrom(value); - } - if (keyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder clearKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - keyAccessServer_ = null; - if (keyAccessServerBuilder_ != null) { - keyAccessServerBuilder_.dispose(); - keyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { - if (keyAccessServerBuilder_ != null) { - return keyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return keyAccessServer_ == null ? - io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> - getKeyAccessServerFieldBuilder() { - if (keyAccessServerBuilder_ == null) { - keyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( - getKeyAccessServer(), - getParentForChildren(), - isClean()); - keyAccessServer_ = null; - } - return keyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.CreateKeyAccessServerResponse) - } - - // @@protoc_insertion_point(class_scope:kasregistry.CreateKeyAccessServerResponse) - private static final io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse(); - } - - public static io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateKeyAccessServerResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponseOrBuilder.java deleted file mode 100644 index ba2e5e7f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/CreateKeyAccessServerResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface CreateKeyAccessServerResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.CreateKeyAccessServerResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - boolean hasKeyAccessServer(); - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer(); - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequest.java deleted file mode 100644 index 0cd6f6a6..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.DeleteKeyAccessServerRequest} - */ -public final class DeleteKeyAccessServerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.DeleteKeyAccessServerRequest) - DeleteKeyAccessServerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteKeyAccessServerRequest.newBuilder() to construct. - private DeleteKeyAccessServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteKeyAccessServerRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteKeyAccessServerRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest other = (io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.DeleteKeyAccessServerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.DeleteKeyAccessServerRequest) - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest build() { - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest buildPartial() { - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest result = new io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest) { - return mergeFrom((io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest other) { - if (other == io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.DeleteKeyAccessServerRequest) - } - - // @@protoc_insertion_point(class_scope:kasregistry.DeleteKeyAccessServerRequest) - private static final io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest(); - } - - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteKeyAccessServerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequestOrBuilder.java deleted file mode 100644 index d29f008f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface DeleteKeyAccessServerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.DeleteKeyAccessServerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponse.java deleted file mode 100644 index 007033c6..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.DeleteKeyAccessServerResponse} - */ -public final class DeleteKeyAccessServerResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.DeleteKeyAccessServerResponse) - DeleteKeyAccessServerResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteKeyAccessServerResponse.newBuilder() to construct. - private DeleteKeyAccessServerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteKeyAccessServerResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteKeyAccessServerResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.Builder.class); - } - - private int bitField0_; - public static final int KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - @java.lang.Override - public boolean hasKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse other = (io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse) obj; - - if (hasKeyAccessServer() != other.hasKeyAccessServer()) return false; - if (hasKeyAccessServer()) { - if (!getKeyAccessServer() - .equals(other.getKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKeyAccessServer()) { - hash = (37 * hash) + KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.DeleteKeyAccessServerResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.DeleteKeyAccessServerResponse) - io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - keyAccessServer_ = null; - if (keyAccessServerBuilder_ != null) { - keyAccessServerBuilder_.dispose(); - keyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse build() { - io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse buildPartial() { - io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse result = new io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.keyAccessServer_ = keyAccessServerBuilder_ == null - ? keyAccessServer_ - : keyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse) { - return mergeFrom((io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse other) { - if (other == io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.getDefaultInstance()) return this; - if (other.hasKeyAccessServer()) { - mergeKeyAccessServer(other.getKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServerBuilder_; - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - public boolean hasKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { - if (keyAccessServerBuilder_ == null) { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } else { - return keyAccessServerBuilder_.getMessage(); - } - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder setKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - keyAccessServer_ = value; - } else { - keyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder setKeyAccessServer( - io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (keyAccessServerBuilder_ == null) { - keyAccessServer_ = builderForValue.build(); - } else { - keyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder mergeKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - keyAccessServer_ != null && - keyAccessServer_ != io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) { - getKeyAccessServerBuilder().mergeFrom(value); - } else { - keyAccessServer_ = value; - } - } else { - keyAccessServerBuilder_.mergeFrom(value); - } - if (keyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder clearKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - keyAccessServer_ = null; - if (keyAccessServerBuilder_ != null) { - keyAccessServerBuilder_.dispose(); - keyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { - if (keyAccessServerBuilder_ != null) { - return keyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return keyAccessServer_ == null ? - io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> - getKeyAccessServerFieldBuilder() { - if (keyAccessServerBuilder_ == null) { - keyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( - getKeyAccessServer(), - getParentForChildren(), - isClean()); - keyAccessServer_ = null; - } - return keyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.DeleteKeyAccessServerResponse) - } - - // @@protoc_insertion_point(class_scope:kasregistry.DeleteKeyAccessServerResponse) - private static final io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse(); - } - - public static io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteKeyAccessServerResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponseOrBuilder.java deleted file mode 100644 index ea28255a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/DeleteKeyAccessServerResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface DeleteKeyAccessServerResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.DeleteKeyAccessServerResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - boolean hasKeyAccessServer(); - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer(); - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequest.java deleted file mode 100644 index 230d6a7a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.GetKeyAccessServerRequest} - */ -public final class GetKeyAccessServerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.GetKeyAccessServerRequest) - GetKeyAccessServerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetKeyAccessServerRequest.newBuilder() to construct. - private GetKeyAccessServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetKeyAccessServerRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetKeyAccessServerRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.GetKeyAccessServerRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.GetKeyAccessServerRequest other = (io.opentdf.platform.kasregistry.GetKeyAccessServerRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.GetKeyAccessServerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.GetKeyAccessServerRequest) - io.opentdf.platform.kasregistry.GetKeyAccessServerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.GetKeyAccessServerRequest getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.GetKeyAccessServerRequest build() { - io.opentdf.platform.kasregistry.GetKeyAccessServerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.GetKeyAccessServerRequest buildPartial() { - io.opentdf.platform.kasregistry.GetKeyAccessServerRequest result = new io.opentdf.platform.kasregistry.GetKeyAccessServerRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.GetKeyAccessServerRequest) { - return mergeFrom((io.opentdf.platform.kasregistry.GetKeyAccessServerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest other) { - if (other == io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.GetKeyAccessServerRequest) - } - - // @@protoc_insertion_point(class_scope:kasregistry.GetKeyAccessServerRequest) - private static final io.opentdf.platform.kasregistry.GetKeyAccessServerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.GetKeyAccessServerRequest(); - } - - public static io.opentdf.platform.kasregistry.GetKeyAccessServerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetKeyAccessServerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.GetKeyAccessServerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequestOrBuilder.java deleted file mode 100644 index ae66ffc9..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface GetKeyAccessServerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.GetKeyAccessServerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponse.java deleted file mode 100644 index c557439e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.GetKeyAccessServerResponse} - */ -public final class GetKeyAccessServerResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.GetKeyAccessServerResponse) - GetKeyAccessServerResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetKeyAccessServerResponse.newBuilder() to construct. - private GetKeyAccessServerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetKeyAccessServerResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetKeyAccessServerResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.Builder.class); - } - - private int bitField0_; - public static final int KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - @java.lang.Override - public boolean hasKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.GetKeyAccessServerResponse)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.GetKeyAccessServerResponse other = (io.opentdf.platform.kasregistry.GetKeyAccessServerResponse) obj; - - if (hasKeyAccessServer() != other.hasKeyAccessServer()) return false; - if (hasKeyAccessServer()) { - if (!getKeyAccessServer() - .equals(other.getKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKeyAccessServer()) { - hash = (37 * hash) + KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.GetKeyAccessServerResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.GetKeyAccessServerResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.GetKeyAccessServerResponse) - io.opentdf.platform.kasregistry.GetKeyAccessServerResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - keyAccessServer_ = null; - if (keyAccessServerBuilder_ != null) { - keyAccessServerBuilder_.dispose(); - keyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_GetKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse build() { - io.opentdf.platform.kasregistry.GetKeyAccessServerResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse buildPartial() { - io.opentdf.platform.kasregistry.GetKeyAccessServerResponse result = new io.opentdf.platform.kasregistry.GetKeyAccessServerResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.GetKeyAccessServerResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.keyAccessServer_ = keyAccessServerBuilder_ == null - ? keyAccessServer_ - : keyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.GetKeyAccessServerResponse) { - return mergeFrom((io.opentdf.platform.kasregistry.GetKeyAccessServerResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.GetKeyAccessServerResponse other) { - if (other == io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.getDefaultInstance()) return this; - if (other.hasKeyAccessServer()) { - mergeKeyAccessServer(other.getKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServerBuilder_; - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - public boolean hasKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { - if (keyAccessServerBuilder_ == null) { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } else { - return keyAccessServerBuilder_.getMessage(); - } - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder setKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - keyAccessServer_ = value; - } else { - keyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder setKeyAccessServer( - io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (keyAccessServerBuilder_ == null) { - keyAccessServer_ = builderForValue.build(); - } else { - keyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder mergeKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - keyAccessServer_ != null && - keyAccessServer_ != io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) { - getKeyAccessServerBuilder().mergeFrom(value); - } else { - keyAccessServer_ = value; - } - } else { - keyAccessServerBuilder_.mergeFrom(value); - } - if (keyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder clearKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - keyAccessServer_ = null; - if (keyAccessServerBuilder_ != null) { - keyAccessServerBuilder_.dispose(); - keyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { - if (keyAccessServerBuilder_ != null) { - return keyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return keyAccessServer_ == null ? - io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> - getKeyAccessServerFieldBuilder() { - if (keyAccessServerBuilder_ == null) { - keyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( - getKeyAccessServer(), - getParentForChildren(), - isClean()); - keyAccessServer_ = null; - } - return keyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.GetKeyAccessServerResponse) - } - - // @@protoc_insertion_point(class_scope:kasregistry.GetKeyAccessServerResponse) - private static final io.opentdf.platform.kasregistry.GetKeyAccessServerResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.GetKeyAccessServerResponse(); - } - - public static io.opentdf.platform.kasregistry.GetKeyAccessServerResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetKeyAccessServerResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponseOrBuilder.java deleted file mode 100644 index 9bc23b13..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/GetKeyAccessServerResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface GetKeyAccessServerResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.GetKeyAccessServerResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - boolean hasKeyAccessServer(); - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer(); - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServer.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServer.java deleted file mode 100644 index c269c588..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServer.java +++ /dev/null @@ -1,1142 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - *
- *
- *Descriptor for a KAS
- * 
- * - * Protobuf type {@code kasregistry.KeyAccessServer} - */ -public final class KeyAccessServer extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.KeyAccessServer) - KeyAccessServerOrBuilder { -private static final long serialVersionUID = 0L; - // Use KeyAccessServer.newBuilder() to construct. - private KeyAccessServer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KeyAccessServer() { - id_ = ""; - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KeyAccessServer(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.KeyAccessServer.class, io.opentdf.platform.kasregistry.KeyAccessServer.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URI_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - *
-   * Address of a KAS instance
-   * 
- * - * string uri = 2 [json_name = "uri"]; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Address of a KAS instance
-   * 
- * - * string uri = 2 [json_name = "uri"]; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 3; - private io.opentdf.platform.kasregistry.PublicKey publicKey_; - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - * @return Whether the publicKey field is set. - */ - @java.lang.Override - public boolean hasPublicKey() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.Metadata metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.Metadata getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getPublicKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getPublicKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.KeyAccessServer)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.KeyAccessServer other = (io.opentdf.platform.kasregistry.KeyAccessServer) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUri() - .equals(other.getUri())) return false; - if (hasPublicKey() != other.hasPublicKey()) return false; - if (hasPublicKey()) { - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (hasPublicKey()) { - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.KeyAccessServer parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.KeyAccessServer parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.KeyAccessServer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.KeyAccessServer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *Descriptor for a KAS
-   * 
- * - * Protobuf type {@code kasregistry.KeyAccessServer} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.KeyAccessServer) - io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.KeyAccessServer.class, io.opentdf.platform.kasregistry.KeyAccessServer.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.KeyAccessServer.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPublicKeyFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - uri_ = ""; - publicKey_ = null; - if (publicKeyBuilder_ != null) { - publicKeyBuilder_.dispose(); - publicKeyBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_KeyAccessServer_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer build() { - io.opentdf.platform.kasregistry.KeyAccessServer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer buildPartial() { - io.opentdf.platform.kasregistry.KeyAccessServer result = new io.opentdf.platform.kasregistry.KeyAccessServer(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.KeyAccessServer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.uri_ = uri_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.publicKey_ = publicKeyBuilder_ == null - ? publicKey_ - : publicKeyBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.KeyAccessServer) { - return mergeFrom((io.opentdf.platform.kasregistry.KeyAccessServer)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.KeyAccessServer other) { - if (other == io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasPublicKey()) { - mergePublicKey(other.getPublicKey()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getPublicKeyFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Address of a KAS instance
-     * 
- * - * string uri = 2 [json_name = "uri"]; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Address of a KAS instance
-     * 
- * - * string uri = 2 [json_name = "uri"]; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Address of a KAS instance
-     * 
- * - * string uri = 2 [json_name = "uri"]; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Address of a KAS instance
-     * 
- * - * string uri = 2 [json_name = "uri"]; - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Address of a KAS instance
-     * 
- * - * string uri = 2 [json_name = "uri"]; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.opentdf.platform.kasregistry.PublicKey publicKey_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> publicKeyBuilder_; - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - * @return Whether the publicKey field is set. - */ - public boolean hasPublicKey() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { - if (publicKeyBuilder_ == null) { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } else { - return publicKeyBuilder_.getMessage(); - } - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - public Builder setPublicKey(io.opentdf.platform.kasregistry.PublicKey value) { - if (publicKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - publicKey_ = value; - } else { - publicKeyBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - public Builder setPublicKey( - io.opentdf.platform.kasregistry.PublicKey.Builder builderForValue) { - if (publicKeyBuilder_ == null) { - publicKey_ = builderForValue.build(); - } else { - publicKeyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - public Builder mergePublicKey(io.opentdf.platform.kasregistry.PublicKey value) { - if (publicKeyBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - publicKey_ != null && - publicKey_ != io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance()) { - getPublicKeyBuilder().mergeFrom(value); - } else { - publicKey_ = value; - } - } else { - publicKeyBuilder_.mergeFrom(value); - } - if (publicKey_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - public Builder clearPublicKey() { - bitField0_ = (bitField0_ & ~0x00000004); - publicKey_ = null; - if (publicKeyBuilder_ != null) { - publicKeyBuilder_.dispose(); - publicKeyBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - public io.opentdf.platform.kasregistry.PublicKey.Builder getPublicKeyBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getPublicKeyFieldBuilder().getBuilder(); - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { - if (publicKeyBuilder_ != null) { - return publicKeyBuilder_.getMessageOrBuilder(); - } else { - return publicKey_ == null ? - io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> - getPublicKeyFieldBuilder() { - if (publicKeyBuilder_ == null) { - publicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder>( - getPublicKey(), - getParentForChildren(), - isClean()); - publicKey_ = null; - } - return publicKeyBuilder_; - } - - private io.opentdf.platform.common.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.KeyAccessServer) - } - - // @@protoc_insertion_point(class_scope:kasregistry.KeyAccessServer) - private static final io.opentdf.platform.kasregistry.KeyAccessServer DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.KeyAccessServer(); - } - - public static io.opentdf.platform.kasregistry.KeyAccessServer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KeyAccessServer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerOrBuilder.java deleted file mode 100644 index 5dd46c60..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface KeyAccessServerOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.KeyAccessServer) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Address of a KAS instance
-   * 
- * - * string uri = 2 [json_name = "uri"]; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Address of a KAS instance
-   * 
- * - * string uri = 2 [json_name = "uri"]; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - * @return Whether the publicKey field is set. - */ - boolean hasPublicKey(); - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - io.opentdf.platform.kasregistry.PublicKey getPublicKey(); - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey"]; - */ - io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder(); - - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryProto.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryProto.java deleted file mode 100644 index d27284be..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryProto.java +++ /dev/null @@ -1,249 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public final class KeyAccessServerRegistryProto { - private KeyAccessServerRegistryProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_KeyAccessServer_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_KeyAccessServer_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_PublicKey_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_PublicKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_GetKeyAccessServerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_GetKeyAccessServerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_GetKeyAccessServerResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_GetKeyAccessServerResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_ListKeyAccessServersRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_ListKeyAccessServersRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_ListKeyAccessServersResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_ListKeyAccessServersResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_CreateKeyAccessServerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_CreateKeyAccessServerResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_UpdateKeyAccessServerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_UpdateKeyAccessServerResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_DeleteKeyAccessServerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_kasregistry_DeleteKeyAccessServerResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,kasregistry/key_access_server_registry" + - ".proto\022\013kasregistry\032\033buf/validate/valida" + - "te.proto\032\023common/common.proto\032\034google/ap" + - "i/annotations.proto\"\230\001\n\017KeyAccessServer\022" + - "\016\n\002id\030\001 \001(\tR\002id\022\020\n\003uri\030\002 \001(\tR\003uri\0225\n\npub" + - "lic_key\030\003 \001(\0132\026.kasregistry.PublicKeyR\tp" + - "ublicKey\022,\n\010metadata\030d \001(\0132\020.common.Meta" + - "dataR\010metadata\"\300\003\n\tPublicKey\022\214\003\n\006remote\030" + - "\001 \001(\tB\361\002\272H\355\002\272\001\351\002\n\nfqn_format\022\327\001FQN must " + - "start with a valid URL (e.g., \'https://d" + - "emo.com/\') followed by additional segmen" + - "ts. Each segment must start and end with" + - " an alphanumeric character, can contain " + - "hyphens, alphanumeric characters, and sl" + - "ashes.\032\200\001this.matches(\'^https://[a-zA-Z0" + - "-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?(\\\\" + - ".[a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z" + - "0-9])?)*(/.*)?$\')H\000R\006remote\022\026\n\005local\030\002 \001" + - "(\tH\000R\005localB\014\n\npublic_key\"3\n\031GetKeyAcces" + - "sServerRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"f" + - "\n\032GetKeyAccessServerResponse\022H\n\021key_acce" + - "ss_server\030\001 \001(\0132\034.kasregistry.KeyAccessS" + - "erverR\017keyAccessServer\"\035\n\033ListKeyAccessS" + - "erversRequest\"j\n\034ListKeyAccessServersRes" + - "ponse\022J\n\022key_access_servers\030\001 \003(\0132\034.kasr" + - "egistry.KeyAccessServerR\020keyAccessServer" + - "s\"\254\001\n\034CreateKeyAccessServerRequest\022\030\n\003ur" + - "i\030\001 \001(\tB\006\272H\003\310\001\001R\003uri\022=\n\npublic_key\030\002 \001(\013" + - "2\026.kasregistry.PublicKeyB\006\272H\003\310\001\001R\tpublic" + - "Key\0223\n\010metadata\030d \001(\0132\027.common.MetadataM" + - "utableR\010metadata\"i\n\035CreateKeyAccessServe" + - "rResponse\022H\n\021key_access_server\030\001 \001(\0132\034.k" + - "asregistry.KeyAccessServerR\017keyAccessSer" + - "ver\"\232\002\n\034UpdateKeyAccessServerRequest\022\026\n\002" + - "id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022\030\n\003uri\030\002 \001(\tB\006\272H\003\310\001" + - "\001R\003uri\022=\n\npublic_key\030\003 \001(\0132\026.kasregistry" + - ".PublicKeyB\006\272H\003\310\001\001R\tpublicKey\0223\n\010metadat" + - "a\030d \001(\0132\027.common.MetadataMutableR\010metada" + - "ta\022T\n\030metadata_update_behavior\030e \001(\0162\032.c" + - "ommon.MetadataUpdateEnumR\026metadataUpdate" + - "Behavior\"i\n\035UpdateKeyAccessServerRespons" + - "e\022H\n\021key_access_server\030\001 \001(\0132\034.kasregist" + - "ry.KeyAccessServerR\017keyAccessServer\"6\n\034D" + - "eleteKeyAccessServerRequest\022\026\n\002id\030\001 \001(\tB" + - "\006\272H\003\310\001\001R\002id\"i\n\035DeleteKeyAccessServerResp" + - "onse\022H\n\021key_access_server\030\001 \001(\0132\034.kasreg" + - "istry.KeyAccessServerR\017keyAccessServer2\357" + - "\005\n\036KeyAccessServerRegistryService\022\210\001\n\024Li" + - "stKeyAccessServers\022(.kasregistry.ListKey" + - "AccessServersRequest\032).kasregistry.ListK" + - "eyAccessServersResponse\"\033\202\323\344\223\002\025\022\023/key-ac" + - "cess-servers\022\207\001\n\022GetKeyAccessServer\022&.ka" + - "sregistry.GetKeyAccessServerRequest\032\'.ka" + - "sregistry.GetKeyAccessServerResponse\" \202\323" + - "\344\223\002\032\022\030/key-access-servers/{id}\022\216\001\n\025Creat" + - "eKeyAccessServer\022).kasregistry.CreateKey" + - "AccessServerRequest\032*.kasregistry.Create" + - "KeyAccessServerResponse\"\036\202\323\344\223\002\030\"\023/key-ac" + - "cess-servers:\001*\022\223\001\n\025UpdateKeyAccessServe" + - "r\022).kasregistry.UpdateKeyAccessServerReq" + - "uest\032*.kasregistry.UpdateKeyAccessServer" + - "Response\"#\202\323\344\223\002\035\032\030/key-access-servers/{i" + - "d}:\001*\022\220\001\n\025DeleteKeyAccessServer\022).kasreg" + - "istry.DeleteKeyAccessServerRequest\032*.kas" + - "registry.DeleteKeyAccessServerResponse\" " + - "\202\323\344\223\002\032*\030/key-access-servers/{id}B\213\001\n\037io." + - "opentdf.platform.kasregistryB\034KeyAccessS" + - "erverRegistryProtoP\001\242\002\003KXX\252\002\013Kasregistry" + - "\312\002\013Kasregistry\342\002\027Kasregistry\\GPBMetadata" + - "\352\002\013Kasregistryb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - io.opentdf.platform.common.CommonProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_kasregistry_KeyAccessServer_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_kasregistry_KeyAccessServer_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_KeyAccessServer_descriptor, - new java.lang.String[] { "Id", "Uri", "PublicKey", "Metadata", }); - internal_static_kasregistry_PublicKey_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_kasregistry_PublicKey_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_PublicKey_descriptor, - new java.lang.String[] { "Remote", "Local", "PublicKey", }); - internal_static_kasregistry_GetKeyAccessServerRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_kasregistry_GetKeyAccessServerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_GetKeyAccessServerRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_kasregistry_GetKeyAccessServerResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_kasregistry_GetKeyAccessServerResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_GetKeyAccessServerResponse_descriptor, - new java.lang.String[] { "KeyAccessServer", }); - internal_static_kasregistry_ListKeyAccessServersRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_kasregistry_ListKeyAccessServersRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_ListKeyAccessServersRequest_descriptor, - new java.lang.String[] { }); - internal_static_kasregistry_ListKeyAccessServersResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_kasregistry_ListKeyAccessServersResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_ListKeyAccessServersResponse_descriptor, - new java.lang.String[] { "KeyAccessServers", }); - internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_kasregistry_CreateKeyAccessServerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_CreateKeyAccessServerRequest_descriptor, - new java.lang.String[] { "Uri", "PublicKey", "Metadata", }); - internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_kasregistry_CreateKeyAccessServerResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_CreateKeyAccessServerResponse_descriptor, - new java.lang.String[] { "KeyAccessServer", }); - internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_kasregistry_UpdateKeyAccessServerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor, - new java.lang.String[] { "Id", "Uri", "PublicKey", "Metadata", "MetadataUpdateBehavior", }); - internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_kasregistry_UpdateKeyAccessServerResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor, - new java.lang.String[] { "KeyAccessServer", }); - internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_kasregistry_DeleteKeyAccessServerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_DeleteKeyAccessServerRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_kasregistry_DeleteKeyAccessServerResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_kasregistry_DeleteKeyAccessServerResponse_descriptor, - new java.lang.String[] { "KeyAccessServer", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - build.buf.validate.ValidateProto.getDescriptor(); - io.opentdf.platform.common.CommonProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryServiceGrpc.java deleted file mode 100644 index e7e40ec2..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/KeyAccessServerRegistryServiceGrpc.java +++ /dev/null @@ -1,589 +0,0 @@ -package io.opentdf.platform.kasregistry; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.61.1)", - comments = "Source: kasregistry/key_access_server_registry.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class KeyAccessServerRegistryServiceGrpc { - - private KeyAccessServerRegistryServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "kasregistry.KeyAccessServerRegistryService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListKeyAccessServersMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListKeyAccessServers", - requestType = io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.class, - responseType = io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListKeyAccessServersMethod() { - io.grpc.MethodDescriptor getListKeyAccessServersMethod; - if ((getListKeyAccessServersMethod = KeyAccessServerRegistryServiceGrpc.getListKeyAccessServersMethod) == null) { - synchronized (KeyAccessServerRegistryServiceGrpc.class) { - if ((getListKeyAccessServersMethod = KeyAccessServerRegistryServiceGrpc.getListKeyAccessServersMethod) == null) { - KeyAccessServerRegistryServiceGrpc.getListKeyAccessServersMethod = getListKeyAccessServersMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListKeyAccessServers")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.getDefaultInstance())) - .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("ListKeyAccessServers")) - .build(); - } - } - } - return getListKeyAccessServersMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetKeyAccessServerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetKeyAccessServer", - requestType = io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.class, - responseType = io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetKeyAccessServerMethod() { - io.grpc.MethodDescriptor getGetKeyAccessServerMethod; - if ((getGetKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getGetKeyAccessServerMethod) == null) { - synchronized (KeyAccessServerRegistryServiceGrpc.class) { - if ((getGetKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getGetKeyAccessServerMethod) == null) { - KeyAccessServerRegistryServiceGrpc.getGetKeyAccessServerMethod = getGetKeyAccessServerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKeyAccessServer")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.GetKeyAccessServerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.GetKeyAccessServerResponse.getDefaultInstance())) - .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("GetKeyAccessServer")) - .build(); - } - } - } - return getGetKeyAccessServerMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateKeyAccessServerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateKeyAccessServer", - requestType = io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.class, - responseType = io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateKeyAccessServerMethod() { - io.grpc.MethodDescriptor getCreateKeyAccessServerMethod; - if ((getCreateKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getCreateKeyAccessServerMethod) == null) { - synchronized (KeyAccessServerRegistryServiceGrpc.class) { - if ((getCreateKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getCreateKeyAccessServerMethod) == null) { - KeyAccessServerRegistryServiceGrpc.getCreateKeyAccessServerMethod = getCreateKeyAccessServerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateKeyAccessServer")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse.getDefaultInstance())) - .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("CreateKeyAccessServer")) - .build(); - } - } - } - return getCreateKeyAccessServerMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateKeyAccessServerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateKeyAccessServer", - requestType = io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.class, - responseType = io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateKeyAccessServerMethod() { - io.grpc.MethodDescriptor getUpdateKeyAccessServerMethod; - if ((getUpdateKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getUpdateKeyAccessServerMethod) == null) { - synchronized (KeyAccessServerRegistryServiceGrpc.class) { - if ((getUpdateKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getUpdateKeyAccessServerMethod) == null) { - KeyAccessServerRegistryServiceGrpc.getUpdateKeyAccessServerMethod = getUpdateKeyAccessServerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateKeyAccessServer")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.getDefaultInstance())) - .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("UpdateKeyAccessServer")) - .build(); - } - } - } - return getUpdateKeyAccessServerMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteKeyAccessServerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteKeyAccessServer", - requestType = io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.class, - responseType = io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteKeyAccessServerMethod() { - io.grpc.MethodDescriptor getDeleteKeyAccessServerMethod; - if ((getDeleteKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getDeleteKeyAccessServerMethod) == null) { - synchronized (KeyAccessServerRegistryServiceGrpc.class) { - if ((getDeleteKeyAccessServerMethod = KeyAccessServerRegistryServiceGrpc.getDeleteKeyAccessServerMethod) == null) { - KeyAccessServerRegistryServiceGrpc.getDeleteKeyAccessServerMethod = getDeleteKeyAccessServerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteKeyAccessServer")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse.getDefaultInstance())) - .setSchemaDescriptor(new KeyAccessServerRegistryServiceMethodDescriptorSupplier("DeleteKeyAccessServer")) - .build(); - } - } - } - return getDeleteKeyAccessServerMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static KeyAccessServerRegistryServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public KeyAccessServerRegistryServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new KeyAccessServerRegistryServiceStub(channel, callOptions); - } - }; - return KeyAccessServerRegistryServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static KeyAccessServerRegistryServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public KeyAccessServerRegistryServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new KeyAccessServerRegistryServiceBlockingStub(channel, callOptions); - } - }; - return KeyAccessServerRegistryServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static KeyAccessServerRegistryServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public KeyAccessServerRegistryServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new KeyAccessServerRegistryServiceFutureStub(channel, callOptions); - } - }; - return KeyAccessServerRegistryServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public interface AsyncService { - - /** - */ - default void listKeyAccessServers(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListKeyAccessServersMethod(), responseObserver); - } - - /** - */ - default void getKeyAccessServer(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKeyAccessServerMethod(), responseObserver); - } - - /** - */ - default void createKeyAccessServer(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateKeyAccessServerMethod(), responseObserver); - } - - /** - */ - default void updateKeyAccessServer(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateKeyAccessServerMethod(), responseObserver); - } - - /** - */ - default void deleteKeyAccessServer(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKeyAccessServerMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service KeyAccessServerRegistryService. - */ - public static abstract class KeyAccessServerRegistryServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return KeyAccessServerRegistryServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service KeyAccessServerRegistryService. - */ - public static final class KeyAccessServerRegistryServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private KeyAccessServerRegistryServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected KeyAccessServerRegistryServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new KeyAccessServerRegistryServiceStub(channel, callOptions); - } - - /** - */ - public void listKeyAccessServers(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListKeyAccessServersMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void getKeyAccessServer(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetKeyAccessServerMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void createKeyAccessServer(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateKeyAccessServerMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void updateKeyAccessServer(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateKeyAccessServerMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void deleteKeyAccessServer(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteKeyAccessServerMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service KeyAccessServerRegistryService. - */ - public static final class KeyAccessServerRegistryServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private KeyAccessServerRegistryServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected KeyAccessServerRegistryServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new KeyAccessServerRegistryServiceBlockingStub(channel, callOptions); - } - - /** - */ - public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse listKeyAccessServers(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListKeyAccessServersMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.kasregistry.GetKeyAccessServerResponse getKeyAccessServer(io.opentdf.platform.kasregistry.GetKeyAccessServerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetKeyAccessServerMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse createKeyAccessServer(io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateKeyAccessServerMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse updateKeyAccessServer(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateKeyAccessServerMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse deleteKeyAccessServer(io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteKeyAccessServerMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service KeyAccessServerRegistryService. - */ - public static final class KeyAccessServerRegistryServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private KeyAccessServerRegistryServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected KeyAccessServerRegistryServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new KeyAccessServerRegistryServiceFutureStub(channel, callOptions); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture listKeyAccessServers( - io.opentdf.platform.kasregistry.ListKeyAccessServersRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListKeyAccessServersMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getKeyAccessServer( - io.opentdf.platform.kasregistry.GetKeyAccessServerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetKeyAccessServerMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture createKeyAccessServer( - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateKeyAccessServerMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture updateKeyAccessServer( - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateKeyAccessServerMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteKeyAccessServer( - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteKeyAccessServerMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_KEY_ACCESS_SERVERS = 0; - private static final int METHODID_GET_KEY_ACCESS_SERVER = 1; - private static final int METHODID_CREATE_KEY_ACCESS_SERVER = 2; - private static final int METHODID_UPDATE_KEY_ACCESS_SERVER = 3; - private static final int METHODID_DELETE_KEY_ACCESS_SERVER = 4; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_KEY_ACCESS_SERVERS: - serviceImpl.listKeyAccessServers((io.opentdf.platform.kasregistry.ListKeyAccessServersRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_KEY_ACCESS_SERVER: - serviceImpl.getKeyAccessServer((io.opentdf.platform.kasregistry.GetKeyAccessServerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_KEY_ACCESS_SERVER: - serviceImpl.createKeyAccessServer((io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_KEY_ACCESS_SERVER: - serviceImpl.updateKeyAccessServer((io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_KEY_ACCESS_SERVER: - serviceImpl.deleteKeyAccessServer((io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListKeyAccessServersMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kasregistry.ListKeyAccessServersRequest, - io.opentdf.platform.kasregistry.ListKeyAccessServersResponse>( - service, METHODID_LIST_KEY_ACCESS_SERVERS))) - .addMethod( - getGetKeyAccessServerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kasregistry.GetKeyAccessServerRequest, - io.opentdf.platform.kasregistry.GetKeyAccessServerResponse>( - service, METHODID_GET_KEY_ACCESS_SERVER))) - .addMethod( - getCreateKeyAccessServerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kasregistry.CreateKeyAccessServerRequest, - io.opentdf.platform.kasregistry.CreateKeyAccessServerResponse>( - service, METHODID_CREATE_KEY_ACCESS_SERVER))) - .addMethod( - getUpdateKeyAccessServerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest, - io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse>( - service, METHODID_UPDATE_KEY_ACCESS_SERVER))) - .addMethod( - getDeleteKeyAccessServerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.kasregistry.DeleteKeyAccessServerRequest, - io.opentdf.platform.kasregistry.DeleteKeyAccessServerResponse>( - service, METHODID_DELETE_KEY_ACCESS_SERVER))) - .build(); - } - - private static abstract class KeyAccessServerRegistryServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - KeyAccessServerRegistryServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("KeyAccessServerRegistryService"); - } - } - - private static final class KeyAccessServerRegistryServiceFileDescriptorSupplier - extends KeyAccessServerRegistryServiceBaseDescriptorSupplier { - KeyAccessServerRegistryServiceFileDescriptorSupplier() {} - } - - private static final class KeyAccessServerRegistryServiceMethodDescriptorSupplier - extends KeyAccessServerRegistryServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - KeyAccessServerRegistryServiceMethodDescriptorSupplier(java.lang.String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (KeyAccessServerRegistryServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new KeyAccessServerRegistryServiceFileDescriptorSupplier()) - .addMethod(getListKeyAccessServersMethod()) - .addMethod(getGetKeyAccessServerMethod()) - .addMethod(getCreateKeyAccessServerMethod()) - .addMethod(getUpdateKeyAccessServerMethod()) - .addMethod(getDeleteKeyAccessServerMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequest.java deleted file mode 100644 index 0a65a55b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequest.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.ListKeyAccessServersRequest} - */ -public final class ListKeyAccessServersRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.ListKeyAccessServersRequest) - ListKeyAccessServersRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListKeyAccessServersRequest.newBuilder() to construct. - private ListKeyAccessServersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListKeyAccessServersRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListKeyAccessServersRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.class, io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.ListKeyAccessServersRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.ListKeyAccessServersRequest other = (io.opentdf.platform.kasregistry.ListKeyAccessServersRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.ListKeyAccessServersRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.ListKeyAccessServersRequest) - io.opentdf.platform.kasregistry.ListKeyAccessServersRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.class, io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.ListKeyAccessServersRequest getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.ListKeyAccessServersRequest build() { - io.opentdf.platform.kasregistry.ListKeyAccessServersRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.ListKeyAccessServersRequest buildPartial() { - io.opentdf.platform.kasregistry.ListKeyAccessServersRequest result = new io.opentdf.platform.kasregistry.ListKeyAccessServersRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.ListKeyAccessServersRequest) { - return mergeFrom((io.opentdf.platform.kasregistry.ListKeyAccessServersRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.ListKeyAccessServersRequest other) { - if (other == io.opentdf.platform.kasregistry.ListKeyAccessServersRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.ListKeyAccessServersRequest) - } - - // @@protoc_insertion_point(class_scope:kasregistry.ListKeyAccessServersRequest) - private static final io.opentdf.platform.kasregistry.ListKeyAccessServersRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.ListKeyAccessServersRequest(); - } - - public static io.opentdf.platform.kasregistry.ListKeyAccessServersRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListKeyAccessServersRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.ListKeyAccessServersRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequestOrBuilder.java deleted file mode 100644 index d6ec8a89..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersRequestOrBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface ListKeyAccessServersRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.ListKeyAccessServersRequest) - com.google.protobuf.MessageOrBuilder { -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponse.java deleted file mode 100644 index dce90608..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.ListKeyAccessServersResponse} - */ -public final class ListKeyAccessServersResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.ListKeyAccessServersResponse) - ListKeyAccessServersResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListKeyAccessServersResponse.newBuilder() to construct. - private ListKeyAccessServersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListKeyAccessServersResponse() { - keyAccessServers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListKeyAccessServersResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.class, io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.Builder.class); - } - - public static final int KEY_ACCESS_SERVERS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List keyAccessServers_; - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - @java.lang.Override - public java.util.List getKeyAccessServersList() { - return keyAccessServers_; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - @java.lang.Override - public java.util.List - getKeyAccessServersOrBuilderList() { - return keyAccessServers_; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - @java.lang.Override - public int getKeyAccessServersCount() { - return keyAccessServers_.size(); - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServers(int index) { - return keyAccessServers_.get(index); - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServersOrBuilder( - int index) { - return keyAccessServers_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < keyAccessServers_.size(); i++) { - output.writeMessage(1, keyAccessServers_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < keyAccessServers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, keyAccessServers_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.ListKeyAccessServersResponse)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.ListKeyAccessServersResponse other = (io.opentdf.platform.kasregistry.ListKeyAccessServersResponse) obj; - - if (!getKeyAccessServersList() - .equals(other.getKeyAccessServersList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getKeyAccessServersCount() > 0) { - hash = (37 * hash) + KEY_ACCESS_SERVERS_FIELD_NUMBER; - hash = (53 * hash) + getKeyAccessServersList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.ListKeyAccessServersResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.ListKeyAccessServersResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.ListKeyAccessServersResponse) - io.opentdf.platform.kasregistry.ListKeyAccessServersResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.class, io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (keyAccessServersBuilder_ == null) { - keyAccessServers_ = java.util.Collections.emptyList(); - } else { - keyAccessServers_ = null; - keyAccessServersBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_ListKeyAccessServersResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse build() { - io.opentdf.platform.kasregistry.ListKeyAccessServersResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse buildPartial() { - io.opentdf.platform.kasregistry.ListKeyAccessServersResponse result = new io.opentdf.platform.kasregistry.ListKeyAccessServersResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.kasregistry.ListKeyAccessServersResponse result) { - if (keyAccessServersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - keyAccessServers_ = java.util.Collections.unmodifiableList(keyAccessServers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.keyAccessServers_ = keyAccessServers_; - } else { - result.keyAccessServers_ = keyAccessServersBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.kasregistry.ListKeyAccessServersResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.ListKeyAccessServersResponse) { - return mergeFrom((io.opentdf.platform.kasregistry.ListKeyAccessServersResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.ListKeyAccessServersResponse other) { - if (other == io.opentdf.platform.kasregistry.ListKeyAccessServersResponse.getDefaultInstance()) return this; - if (keyAccessServersBuilder_ == null) { - if (!other.keyAccessServers_.isEmpty()) { - if (keyAccessServers_.isEmpty()) { - keyAccessServers_ = other.keyAccessServers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKeyAccessServersIsMutable(); - keyAccessServers_.addAll(other.keyAccessServers_); - } - onChanged(); - } - } else { - if (!other.keyAccessServers_.isEmpty()) { - if (keyAccessServersBuilder_.isEmpty()) { - keyAccessServersBuilder_.dispose(); - keyAccessServersBuilder_ = null; - keyAccessServers_ = other.keyAccessServers_; - bitField0_ = (bitField0_ & ~0x00000001); - keyAccessServersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKeyAccessServersFieldBuilder() : null; - } else { - keyAccessServersBuilder_.addAllMessages(other.keyAccessServers_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.kasregistry.KeyAccessServer m = - input.readMessage( - io.opentdf.platform.kasregistry.KeyAccessServer.parser(), - extensionRegistry); - if (keyAccessServersBuilder_ == null) { - ensureKeyAccessServersIsMutable(); - keyAccessServers_.add(m); - } else { - keyAccessServersBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List keyAccessServers_ = - java.util.Collections.emptyList(); - private void ensureKeyAccessServersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - keyAccessServers_ = new java.util.ArrayList(keyAccessServers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServersBuilder_; - - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public java.util.List getKeyAccessServersList() { - if (keyAccessServersBuilder_ == null) { - return java.util.Collections.unmodifiableList(keyAccessServers_); - } else { - return keyAccessServersBuilder_.getMessageList(); - } - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public int getKeyAccessServersCount() { - if (keyAccessServersBuilder_ == null) { - return keyAccessServers_.size(); - } else { - return keyAccessServersBuilder_.getCount(); - } - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServers(int index) { - if (keyAccessServersBuilder_ == null) { - return keyAccessServers_.get(index); - } else { - return keyAccessServersBuilder_.getMessage(index); - } - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder setKeyAccessServers( - int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKeyAccessServersIsMutable(); - keyAccessServers_.set(index, value); - onChanged(); - } else { - keyAccessServersBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder setKeyAccessServers( - int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (keyAccessServersBuilder_ == null) { - ensureKeyAccessServersIsMutable(); - keyAccessServers_.set(index, builderForValue.build()); - onChanged(); - } else { - keyAccessServersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder addKeyAccessServers(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKeyAccessServersIsMutable(); - keyAccessServers_.add(value); - onChanged(); - } else { - keyAccessServersBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder addKeyAccessServers( - int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKeyAccessServersIsMutable(); - keyAccessServers_.add(index, value); - onChanged(); - } else { - keyAccessServersBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder addKeyAccessServers( - io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (keyAccessServersBuilder_ == null) { - ensureKeyAccessServersIsMutable(); - keyAccessServers_.add(builderForValue.build()); - onChanged(); - } else { - keyAccessServersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder addKeyAccessServers( - int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (keyAccessServersBuilder_ == null) { - ensureKeyAccessServersIsMutable(); - keyAccessServers_.add(index, builderForValue.build()); - onChanged(); - } else { - keyAccessServersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder addAllKeyAccessServers( - java.lang.Iterable values) { - if (keyAccessServersBuilder_ == null) { - ensureKeyAccessServersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, keyAccessServers_); - onChanged(); - } else { - keyAccessServersBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder clearKeyAccessServers() { - if (keyAccessServersBuilder_ == null) { - keyAccessServers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - keyAccessServersBuilder_.clear(); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public Builder removeKeyAccessServers(int index) { - if (keyAccessServersBuilder_ == null) { - ensureKeyAccessServersIsMutable(); - keyAccessServers_.remove(index); - onChanged(); - } else { - keyAccessServersBuilder_.remove(index); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServersBuilder( - int index) { - return getKeyAccessServersFieldBuilder().getBuilder(index); - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServersOrBuilder( - int index) { - if (keyAccessServersBuilder_ == null) { - return keyAccessServers_.get(index); } else { - return keyAccessServersBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public java.util.List - getKeyAccessServersOrBuilderList() { - if (keyAccessServersBuilder_ != null) { - return keyAccessServersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(keyAccessServers_); - } - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addKeyAccessServersBuilder() { - return getKeyAccessServersFieldBuilder().addBuilder( - io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addKeyAccessServersBuilder( - int index) { - return getKeyAccessServersFieldBuilder().addBuilder( - index, io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); - } - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - public java.util.List - getKeyAccessServersBuilderList() { - return getKeyAccessServersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> - getKeyAccessServersFieldBuilder() { - if (keyAccessServersBuilder_ == null) { - keyAccessServersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( - keyAccessServers_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - keyAccessServers_ = null; - } - return keyAccessServersBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.ListKeyAccessServersResponse) - } - - // @@protoc_insertion_point(class_scope:kasregistry.ListKeyAccessServersResponse) - private static final io.opentdf.platform.kasregistry.ListKeyAccessServersResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.ListKeyAccessServersResponse(); - } - - public static io.opentdf.platform.kasregistry.ListKeyAccessServersResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListKeyAccessServersResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.ListKeyAccessServersResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponseOrBuilder.java deleted file mode 100644 index 0cfcd759..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/ListKeyAccessServersResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface ListKeyAccessServersResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.ListKeyAccessServersResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - java.util.List - getKeyAccessServersList(); - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServers(int index); - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - int getKeyAccessServersCount(); - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - java.util.List - getKeyAccessServersOrBuilderList(); - /** - * repeated .kasregistry.KeyAccessServer key_access_servers = 1 [json_name = "keyAccessServers"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServersOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKey.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKey.java deleted file mode 100644 index 4775255d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKey.java +++ /dev/null @@ -1,899 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.PublicKey} - */ -public final class PublicKey extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.PublicKey) - PublicKeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use PublicKey.newBuilder() to construct. - private PublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PublicKey() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PublicKey(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.PublicKey.class, io.opentdf.platform.kasregistry.PublicKey.Builder.class); - } - - private int publicKeyCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object publicKey_; - public enum PublicKeyCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REMOTE(1), - LOCAL(2), - PUBLICKEY_NOT_SET(0); - private final int value; - private PublicKeyCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PublicKeyCase valueOf(int value) { - return forNumber(value); - } - - public static PublicKeyCase forNumber(int value) { - switch (value) { - case 1: return REMOTE; - case 2: return LOCAL; - case 0: return PUBLICKEY_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public PublicKeyCase - getPublicKeyCase() { - return PublicKeyCase.forNumber( - publicKeyCase_); - } - - public static final int REMOTE_FIELD_NUMBER = 1; - /** - *
-   * kas public key url - optional since can also be retrieved via public key
-   * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return Whether the remote field is set. - */ - public boolean hasRemote() { - return publicKeyCase_ == 1; - } - /** - *
-   * kas public key url - optional since can also be retrieved via public key
-   * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return The remote. - */ - public java.lang.String getRemote() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 1) { - ref = publicKey_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (publicKeyCase_ == 1) { - publicKey_ = s; - } - return s; - } - } - /** - *
-   * kas public key url - optional since can also be retrieved via public key
-   * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return The bytes for remote. - */ - public com.google.protobuf.ByteString - getRemoteBytes() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 1) { - ref = publicKey_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (publicKeyCase_ == 1) { - publicKey_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCAL_FIELD_NUMBER = 2; - /** - *
-   * public key - optional since can also be retrieved via url
-   * 
- * - * string local = 2 [json_name = "local"]; - * @return Whether the local field is set. - */ - public boolean hasLocal() { - return publicKeyCase_ == 2; - } - /** - *
-   * public key - optional since can also be retrieved via url
-   * 
- * - * string local = 2 [json_name = "local"]; - * @return The local. - */ - public java.lang.String getLocal() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 2) { - ref = publicKey_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (publicKeyCase_ == 2) { - publicKey_ = s; - } - return s; - } - } - /** - *
-   * public key - optional since can also be retrieved via url
-   * 
- * - * string local = 2 [json_name = "local"]; - * @return The bytes for local. - */ - public com.google.protobuf.ByteString - getLocalBytes() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 2) { - ref = publicKey_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (publicKeyCase_ == 2) { - publicKey_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (publicKeyCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKey_); - } - if (publicKeyCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (publicKeyCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKey_); - } - if (publicKeyCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.PublicKey)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.PublicKey other = (io.opentdf.platform.kasregistry.PublicKey) obj; - - if (!getPublicKeyCase().equals(other.getPublicKeyCase())) return false; - switch (publicKeyCase_) { - case 1: - if (!getRemote() - .equals(other.getRemote())) return false; - break; - case 2: - if (!getLocal() - .equals(other.getLocal())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (publicKeyCase_) { - case 1: - hash = (37 * hash) + REMOTE_FIELD_NUMBER; - hash = (53 * hash) + getRemote().hashCode(); - break; - case 2: - hash = (37 * hash) + LOCAL_FIELD_NUMBER; - hash = (53 * hash) + getLocal().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.PublicKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.PublicKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.PublicKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.PublicKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.PublicKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.PublicKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.PublicKey) - io.opentdf.platform.kasregistry.PublicKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.PublicKey.class, io.opentdf.platform.kasregistry.PublicKey.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.PublicKey.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - publicKeyCase_ = 0; - publicKey_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_PublicKey_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKey getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKey build() { - io.opentdf.platform.kasregistry.PublicKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKey buildPartial() { - io.opentdf.platform.kasregistry.PublicKey result = new io.opentdf.platform.kasregistry.PublicKey(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.PublicKey result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(io.opentdf.platform.kasregistry.PublicKey result) { - result.publicKeyCase_ = publicKeyCase_; - result.publicKey_ = this.publicKey_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.PublicKey) { - return mergeFrom((io.opentdf.platform.kasregistry.PublicKey)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.PublicKey other) { - if (other == io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance()) return this; - switch (other.getPublicKeyCase()) { - case REMOTE: { - publicKeyCase_ = 1; - publicKey_ = other.publicKey_; - onChanged(); - break; - } - case LOCAL: { - publicKeyCase_ = 2; - publicKey_ = other.publicKey_; - onChanged(); - break; - } - case PUBLICKEY_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - publicKeyCase_ = 1; - publicKey_ = s; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - publicKeyCase_ = 2; - publicKey_ = s; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int publicKeyCase_ = 0; - private java.lang.Object publicKey_; - public PublicKeyCase - getPublicKeyCase() { - return PublicKeyCase.forNumber( - publicKeyCase_); - } - - public Builder clearPublicKey() { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - *
-     * kas public key url - optional since can also be retrieved via public key
-     * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return Whether the remote field is set. - */ - @java.lang.Override - public boolean hasRemote() { - return publicKeyCase_ == 1; - } - /** - *
-     * kas public key url - optional since can also be retrieved via public key
-     * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return The remote. - */ - @java.lang.Override - public java.lang.String getRemote() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 1) { - ref = publicKey_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (publicKeyCase_ == 1) { - publicKey_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * kas public key url - optional since can also be retrieved via public key
-     * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return The bytes for remote. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRemoteBytes() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 1) { - ref = publicKey_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (publicKeyCase_ == 1) { - publicKey_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * kas public key url - optional since can also be retrieved via public key
-     * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @param value The remote to set. - * @return This builder for chaining. - */ - public Builder setRemote( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - publicKeyCase_ = 1; - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-     * kas public key url - optional since can also be retrieved via public key
-     * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearRemote() { - if (publicKeyCase_ == 1) { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - } - return this; - } - /** - *
-     * kas public key url - optional since can also be retrieved via public key
-     * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @param value The bytes for remote to set. - * @return This builder for chaining. - */ - public Builder setRemoteBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - publicKeyCase_ = 1; - publicKey_ = value; - onChanged(); - return this; - } - - /** - *
-     * public key - optional since can also be retrieved via url
-     * 
- * - * string local = 2 [json_name = "local"]; - * @return Whether the local field is set. - */ - @java.lang.Override - public boolean hasLocal() { - return publicKeyCase_ == 2; - } - /** - *
-     * public key - optional since can also be retrieved via url
-     * 
- * - * string local = 2 [json_name = "local"]; - * @return The local. - */ - @java.lang.Override - public java.lang.String getLocal() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 2) { - ref = publicKey_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (publicKeyCase_ == 2) { - publicKey_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * public key - optional since can also be retrieved via url
-     * 
- * - * string local = 2 [json_name = "local"]; - * @return The bytes for local. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocalBytes() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 2) { - ref = publicKey_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (publicKeyCase_ == 2) { - publicKey_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * public key - optional since can also be retrieved via url
-     * 
- * - * string local = 2 [json_name = "local"]; - * @param value The local to set. - * @return This builder for chaining. - */ - public Builder setLocal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - publicKeyCase_ = 2; - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-     * public key - optional since can also be retrieved via url
-     * 
- * - * string local = 2 [json_name = "local"]; - * @return This builder for chaining. - */ - public Builder clearLocal() { - if (publicKeyCase_ == 2) { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - } - return this; - } - /** - *
-     * public key - optional since can also be retrieved via url
-     * 
- * - * string local = 2 [json_name = "local"]; - * @param value The bytes for local to set. - * @return This builder for chaining. - */ - public Builder setLocalBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - publicKeyCase_ = 2; - publicKey_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.PublicKey) - } - - // @@protoc_insertion_point(class_scope:kasregistry.PublicKey) - private static final io.opentdf.platform.kasregistry.PublicKey DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.PublicKey(); - } - - public static io.opentdf.platform.kasregistry.PublicKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublicKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKeyOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKeyOrBuilder.java deleted file mode 100644 index 547fa631..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/PublicKeyOrBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface PublicKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.PublicKey) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * kas public key url - optional since can also be retrieved via public key
-   * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return Whether the remote field is set. - */ - boolean hasRemote(); - /** - *
-   * kas public key url - optional since can also be retrieved via public key
-   * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return The remote. - */ - java.lang.String getRemote(); - /** - *
-   * kas public key url - optional since can also be retrieved via public key
-   * 
- * - * string remote = 1 [json_name = "remote", (.buf.validate.field) = { ... } - * @return The bytes for remote. - */ - com.google.protobuf.ByteString - getRemoteBytes(); - - /** - *
-   * public key - optional since can also be retrieved via url
-   * 
- * - * string local = 2 [json_name = "local"]; - * @return Whether the local field is set. - */ - boolean hasLocal(); - /** - *
-   * public key - optional since can also be retrieved via url
-   * 
- * - * string local = 2 [json_name = "local"]; - * @return The local. - */ - java.lang.String getLocal(); - /** - *
-   * public key - optional since can also be retrieved via url
-   * 
- * - * string local = 2 [json_name = "local"]; - * @return The bytes for local. - */ - com.google.protobuf.ByteString - getLocalBytes(); - - io.opentdf.platform.kasregistry.PublicKey.PublicKeyCase getPublicKeyCase(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequest.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequest.java deleted file mode 100644 index 04117474..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequest.java +++ /dev/null @@ -1,1226 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.UpdateKeyAccessServerRequest} - */ -public final class UpdateKeyAccessServerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.UpdateKeyAccessServerRequest) - UpdateKeyAccessServerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateKeyAccessServerRequest.newBuilder() to construct. - private UpdateKeyAccessServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateKeyAccessServerRequest() { - id_ = ""; - uri_ = ""; - metadataUpdateBehavior_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateKeyAccessServerRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URI_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 3; - private io.opentdf.platform.kasregistry.PublicKey publicKey_; - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return Whether the publicKey field is set. - */ - @java.lang.Override - public boolean hasPublicKey() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return The publicKey. - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getPublicKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(101, metadataUpdateBehavior_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getPublicKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(101, metadataUpdateBehavior_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest other = (io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUri() - .equals(other.getUri())) return false; - if (hasPublicKey() != other.hasPublicKey()) return false; - if (hasPublicKey()) { - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (hasPublicKey()) { - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; - hash = (53 * hash) + metadataUpdateBehavior_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.UpdateKeyAccessServerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.UpdateKeyAccessServerRequest) - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.class, io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPublicKeyFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - uri_ = ""; - publicKey_ = null; - if (publicKeyBuilder_ != null) { - publicKeyBuilder_.dispose(); - publicKeyBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - metadataUpdateBehavior_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest build() { - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest buildPartial() { - io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest result = new io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.uri_ = uri_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.publicKey_ = publicKeyBuilder_ == null - ? publicKey_ - : publicKeyBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.metadataUpdateBehavior_ = metadataUpdateBehavior_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest) { - return mergeFrom((io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest other) { - if (other == io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasPublicKey()) { - mergePublicKey(other.getPublicKey()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.metadataUpdateBehavior_ != 0) { - setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getPublicKeyFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 802 - case 808: { - metadataUpdateBehavior_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 808 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object uri_ = ""; - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.opentdf.platform.kasregistry.PublicKey publicKey_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> publicKeyBuilder_; - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return Whether the publicKey field is set. - */ - public boolean hasPublicKey() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return The publicKey. - */ - public io.opentdf.platform.kasregistry.PublicKey getPublicKey() { - if (publicKeyBuilder_ == null) { - return publicKey_ == null ? io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } else { - return publicKeyBuilder_.getMessage(); - } - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public Builder setPublicKey(io.opentdf.platform.kasregistry.PublicKey value) { - if (publicKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - publicKey_ = value; - } else { - publicKeyBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public Builder setPublicKey( - io.opentdf.platform.kasregistry.PublicKey.Builder builderForValue) { - if (publicKeyBuilder_ == null) { - publicKey_ = builderForValue.build(); - } else { - publicKeyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public Builder mergePublicKey(io.opentdf.platform.kasregistry.PublicKey value) { - if (publicKeyBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - publicKey_ != null && - publicKey_ != io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance()) { - getPublicKeyBuilder().mergeFrom(value); - } else { - publicKey_ = value; - } - } else { - publicKeyBuilder_.mergeFrom(value); - } - if (publicKey_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public Builder clearPublicKey() { - bitField0_ = (bitField0_ & ~0x00000004); - publicKey_ = null; - if (publicKeyBuilder_ != null) { - publicKeyBuilder_.dispose(); - publicKeyBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.kasregistry.PublicKey.Builder getPublicKeyBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getPublicKeyFieldBuilder().getBuilder(); - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder() { - if (publicKeyBuilder_ != null) { - return publicKeyBuilder_.getMessageOrBuilder(); - } else { - return publicKey_ == null ? - io.opentdf.platform.kasregistry.PublicKey.getDefaultInstance() : publicKey_; - } - } - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder> - getPublicKeyFieldBuilder() { - if (publicKeyBuilder_ == null) { - publicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.PublicKey, io.opentdf.platform.kasregistry.PublicKey.Builder, io.opentdf.platform.kasregistry.PublicKeyOrBuilder>( - getPublicKey(), - getParentForChildren(), - isClean()); - publicKey_ = null; - } - return publicKeyBuilder_; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehaviorValue(int value) { - metadataUpdateBehavior_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - metadataUpdateBehavior_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return This builder for chaining. - */ - public Builder clearMetadataUpdateBehavior() { - bitField0_ = (bitField0_ & ~0x00000010); - metadataUpdateBehavior_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.UpdateKeyAccessServerRequest) - } - - // @@protoc_insertion_point(class_scope:kasregistry.UpdateKeyAccessServerRequest) - private static final io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest(); - } - - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateKeyAccessServerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequestOrBuilder.java deleted file mode 100644 index 4b580450..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerRequestOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface UpdateKeyAccessServerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.UpdateKeyAccessServerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The uri. - */ - java.lang.String getUri(); - /** - * string uri = 2 [json_name = "uri", (.buf.validate.field) = { ... } - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return Whether the publicKey field is set. - */ - boolean hasPublicKey(); - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - * @return The publicKey. - */ - io.opentdf.platform.kasregistry.PublicKey getPublicKey(); - /** - * .kasregistry.PublicKey public_key = 3 [json_name = "publicKey", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.kasregistry.PublicKeyOrBuilder getPublicKeyOrBuilder(); - - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - int getMetadataUpdateBehaviorValue(); - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponse.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponse.java deleted file mode 100644 index 7b8e5153..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -/** - * Protobuf type {@code kasregistry.UpdateKeyAccessServerResponse} - */ -public final class UpdateKeyAccessServerResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:kasregistry.UpdateKeyAccessServerResponse) - UpdateKeyAccessServerResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateKeyAccessServerResponse.newBuilder() to construct. - private UpdateKeyAccessServerResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateKeyAccessServerResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateKeyAccessServerResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.Builder.class); - } - - private int bitField0_; - public static final int KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - @java.lang.Override - public boolean hasKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse)) { - return super.equals(obj); - } - io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse other = (io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse) obj; - - if (hasKeyAccessServer() != other.hasKeyAccessServer()) return false; - if (hasKeyAccessServer()) { - if (!getKeyAccessServer() - .equals(other.getKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKeyAccessServer()) { - hash = (37 * hash) + KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code kasregistry.UpdateKeyAccessServerResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:kasregistry.UpdateKeyAccessServerResponse) - io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.class, io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.Builder.class); - } - - // Construct using io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - keyAccessServer_ = null; - if (keyAccessServerBuilder_ != null) { - keyAccessServerBuilder_.dispose(); - keyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.internal_static_kasregistry_UpdateKeyAccessServerResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse getDefaultInstanceForType() { - return io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse build() { - io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse buildPartial() { - io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse result = new io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.keyAccessServer_ = keyAccessServerBuilder_ == null - ? keyAccessServer_ - : keyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse) { - return mergeFrom((io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse other) { - if (other == io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse.getDefaultInstance()) return this; - if (other.hasKeyAccessServer()) { - mergeKeyAccessServer(other.getKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.kasregistry.KeyAccessServer keyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> keyAccessServerBuilder_; - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - public boolean hasKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - public io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer() { - if (keyAccessServerBuilder_ == null) { - return keyAccessServer_ == null ? io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } else { - return keyAccessServerBuilder_.getMessage(); - } - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder setKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - keyAccessServer_ = value; - } else { - keyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder setKeyAccessServer( - io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (keyAccessServerBuilder_ == null) { - keyAccessServer_ = builderForValue.build(); - } else { - keyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder mergeKeyAccessServer(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (keyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - keyAccessServer_ != null && - keyAccessServer_ != io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()) { - getKeyAccessServerBuilder().mergeFrom(value); - } else { - keyAccessServer_ = value; - } - } else { - keyAccessServerBuilder_.mergeFrom(value); - } - if (keyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public Builder clearKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - keyAccessServer_ = null; - if (keyAccessServerBuilder_ != null) { - keyAccessServerBuilder_.dispose(); - keyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder() { - if (keyAccessServerBuilder_ != null) { - return keyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return keyAccessServer_ == null ? - io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance() : keyAccessServer_; - } - } - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> - getKeyAccessServerFieldBuilder() { - if (keyAccessServerBuilder_ == null) { - keyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( - getKeyAccessServer(), - getParentForChildren(), - isClean()); - keyAccessServer_ = null; - } - return keyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:kasregistry.UpdateKeyAccessServerResponse) - } - - // @@protoc_insertion_point(class_scope:kasregistry.UpdateKeyAccessServerResponse) - private static final io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse(); - } - - public static io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateKeyAccessServerResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.kasregistry.UpdateKeyAccessServerResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponseOrBuilder.java deleted file mode 100644 index fade5880..00000000 --- a/protocol/src/main/java/io/opentdf/platform/kasregistry/UpdateKeyAccessServerResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: kasregistry/key_access_server_registry.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.kasregistry; - -public interface UpdateKeyAccessServerResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:kasregistry.UpdateKeyAccessServerResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return Whether the keyAccessServer field is set. - */ - boolean hasKeyAccessServer(); - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - * @return The keyAccessServer. - */ - io.opentdf.platform.kasregistry.KeyAccessServer getKeyAccessServer(); - /** - * .kasregistry.KeyAccessServer key_access_server = 1 [json_name = "keyAccessServer"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Action.java b/protocol/src/main/java/io/opentdf/platform/policy/Action.java deleted file mode 100644 index 1c06f794..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/Action.java +++ /dev/null @@ -1,911 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- * An action an entity can take
- * 
- * - * Protobuf type {@code policy.Action} - */ -public final class Action extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.Action) - ActionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Action.newBuilder() to construct. - private Action(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Action() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Action(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Action.class, io.opentdf.platform.policy.Action.Builder.class); - } - - /** - *
-   * Standard actions supported by the platform
-   * 
- * - * Protobuf enum {@code policy.Action.StandardAction} - */ - public enum StandardAction - implements com.google.protobuf.ProtocolMessageEnum { - /** - * STANDARD_ACTION_UNSPECIFIED = 0; - */ - STANDARD_ACTION_UNSPECIFIED(0), - /** - * STANDARD_ACTION_DECRYPT = 1; - */ - STANDARD_ACTION_DECRYPT(1), - /** - * STANDARD_ACTION_TRANSMIT = 2; - */ - STANDARD_ACTION_TRANSMIT(2), - UNRECOGNIZED(-1), - ; - - /** - * STANDARD_ACTION_UNSPECIFIED = 0; - */ - public static final int STANDARD_ACTION_UNSPECIFIED_VALUE = 0; - /** - * STANDARD_ACTION_DECRYPT = 1; - */ - public static final int STANDARD_ACTION_DECRYPT_VALUE = 1; - /** - * STANDARD_ACTION_TRANSMIT = 2; - */ - public static final int STANDARD_ACTION_TRANSMIT_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static StandardAction valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static StandardAction forNumber(int value) { - switch (value) { - case 0: return STANDARD_ACTION_UNSPECIFIED; - case 1: return STANDARD_ACTION_DECRYPT; - case 2: return STANDARD_ACTION_TRANSMIT; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - StandardAction> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public StandardAction findValueByNumber(int number) { - return StandardAction.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.opentdf.platform.policy.Action.getDescriptor().getEnumTypes().get(0); - } - - private static final StandardAction[] VALUES = values(); - - public static StandardAction valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private StandardAction(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:policy.Action.StandardAction) - } - - private int valueCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object value_; - public enum ValueCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - STANDARD(1), - CUSTOM(2), - VALUE_NOT_SET(0); - private final int value; - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 1: return STANDARD; - case 2: return CUSTOM; - case 0: return VALUE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ValueCase - getValueCase() { - return ValueCase.forNumber( - valueCase_); - } - - public static final int STANDARD_FIELD_NUMBER = 1; - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return Whether the standard field is set. - */ - public boolean hasStandard() { - return valueCase_ == 1; - } - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return The enum numeric value on the wire for standard. - */ - public int getStandardValue() { - if (valueCase_ == 1) { - return (java.lang.Integer) value_; - } - return 0; - } - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return The standard. - */ - public io.opentdf.platform.policy.Action.StandardAction getStandard() { - if (valueCase_ == 1) { - io.opentdf.platform.policy.Action.StandardAction result = io.opentdf.platform.policy.Action.StandardAction.forNumber( - (java.lang.Integer) value_); - return result == null ? io.opentdf.platform.policy.Action.StandardAction.UNRECOGNIZED : result; - } - return io.opentdf.platform.policy.Action.StandardAction.STANDARD_ACTION_UNSPECIFIED; - } - - public static final int CUSTOM_FIELD_NUMBER = 2; - /** - * string custom = 2 [json_name = "custom"]; - * @return Whether the custom field is set. - */ - public boolean hasCustom() { - return valueCase_ == 2; - } - /** - * string custom = 2 [json_name = "custom"]; - * @return The custom. - */ - public java.lang.String getCustom() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 2) { - value_ = s; - } - return s; - } - } - /** - * string custom = 2 [json_name = "custom"]; - * @return The bytes for custom. - */ - public com.google.protobuf.ByteString - getCustomBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valueCase_ == 2) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (valueCase_ == 1) { - output.writeEnum(1, ((java.lang.Integer) value_)); - } - if (valueCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, ((java.lang.Integer) value_)); - } - if (valueCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.Action)) { - return super.equals(obj); - } - io.opentdf.platform.policy.Action other = (io.opentdf.platform.policy.Action) obj; - - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 1: - if (getStandardValue() - != other.getStandardValue()) return false; - break; - case 2: - if (!getCustom() - .equals(other.getCustom())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (valueCase_) { - case 1: - hash = (37 * hash) + STANDARD_FIELD_NUMBER; - hash = (53 * hash) + getStandardValue(); - break; - case 2: - hash = (37 * hash) + CUSTOM_FIELD_NUMBER; - hash = (53 * hash) + getCustom().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.Action parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Action parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Action parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Action parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Action parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Action parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Action parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Action parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.Action parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.Action parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.Action parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Action parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.Action prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An action an entity can take
-   * 
- * - * Protobuf type {@code policy.Action} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.Action) - io.opentdf.platform.policy.ActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Action.class, io.opentdf.platform.policy.Action.Builder.class); - } - - // Construct using io.opentdf.platform.policy.Action.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Action_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.Action getDefaultInstanceForType() { - return io.opentdf.platform.policy.Action.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.Action build() { - io.opentdf.platform.policy.Action result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.Action buildPartial() { - io.opentdf.platform.policy.Action result = new io.opentdf.platform.policy.Action(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.Action result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(io.opentdf.platform.policy.Action result) { - result.valueCase_ = valueCase_; - result.value_ = this.value_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.Action) { - return mergeFrom((io.opentdf.platform.policy.Action)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.Action other) { - if (other == io.opentdf.platform.policy.Action.getDefaultInstance()) return this; - switch (other.getValueCase()) { - case STANDARD: { - setStandardValue(other.getStandardValue()); - break; - } - case CUSTOM: { - valueCase_ = 2; - value_ = other.value_; - onChanged(); - break; - } - case VALUE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - valueCase_ = 1; - value_ = rawValue; - break; - } // case 8 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - valueCase_ = 2; - value_ = s; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int valueCase_ = 0; - private java.lang.Object value_; - public ValueCase - getValueCase() { - return ValueCase.forNumber( - valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return Whether the standard field is set. - */ - @java.lang.Override - public boolean hasStandard() { - return valueCase_ == 1; - } - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return The enum numeric value on the wire for standard. - */ - @java.lang.Override - public int getStandardValue() { - if (valueCase_ == 1) { - return ((java.lang.Integer) value_).intValue(); - } - return 0; - } - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @param value The enum numeric value on the wire for standard to set. - * @return This builder for chaining. - */ - public Builder setStandardValue(int value) { - valueCase_ = 1; - value_ = value; - onChanged(); - return this; - } - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return The standard. - */ - @java.lang.Override - public io.opentdf.platform.policy.Action.StandardAction getStandard() { - if (valueCase_ == 1) { - io.opentdf.platform.policy.Action.StandardAction result = io.opentdf.platform.policy.Action.StandardAction.forNumber( - (java.lang.Integer) value_); - return result == null ? io.opentdf.platform.policy.Action.StandardAction.UNRECOGNIZED : result; - } - return io.opentdf.platform.policy.Action.StandardAction.STANDARD_ACTION_UNSPECIFIED; - } - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @param value The standard to set. - * @return This builder for chaining. - */ - public Builder setStandard(io.opentdf.platform.policy.Action.StandardAction value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 1; - value_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return This builder for chaining. - */ - public Builder clearStandard() { - if (valueCase_ == 1) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * string custom = 2 [json_name = "custom"]; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return valueCase_ == 2; - } - /** - * string custom = 2 [json_name = "custom"]; - * @return The custom. - */ - @java.lang.Override - public java.lang.String getCustom() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 2) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string custom = 2 [json_name = "custom"]; - * @return The bytes for custom. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCustomBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 2) { - ref = value_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valueCase_ == 2) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string custom = 2 [json_name = "custom"]; - * @param value The custom to set. - * @return This builder for chaining. - */ - public Builder setCustom( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * string custom = 2 [json_name = "custom"]; - * @return This builder for chaining. - */ - public Builder clearCustom() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - /** - * string custom = 2 [json_name = "custom"]; - * @param value The bytes for custom to set. - * @return This builder for chaining. - */ - public Builder setCustomBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.Action) - } - - // @@protoc_insertion_point(class_scope:policy.Action) - private static final io.opentdf.platform.policy.Action DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.Action(); - } - - public static io.opentdf.platform.policy.Action getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Action parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.Action getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ActionOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ActionOrBuilder.java deleted file mode 100644 index 83802d19..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ActionOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface ActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.Action) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return Whether the standard field is set. - */ - boolean hasStandard(); - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return The enum numeric value on the wire for standard. - */ - int getStandardValue(); - /** - * .policy.Action.StandardAction standard = 1 [json_name = "standard"]; - * @return The standard. - */ - io.opentdf.platform.policy.Action.StandardAction getStandard(); - - /** - * string custom = 2 [json_name = "custom"]; - * @return Whether the custom field is set. - */ - boolean hasCustom(); - /** - * string custom = 2 [json_name = "custom"]; - * @return The custom. - */ - java.lang.String getCustom(); - /** - * string custom = 2 [json_name = "custom"]; - * @return The bytes for custom. - */ - com.google.protobuf.ByteString - getCustomBytes(); - - io.opentdf.platform.policy.Action.ValueCase getValueCase(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Attribute.java b/protocol/src/main/java/io/opentdf/platform/policy/Attribute.java deleted file mode 100644 index a540bf70..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/Attribute.java +++ /dev/null @@ -1,2377 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - * Protobuf type {@code policy.Attribute} - */ -public final class Attribute extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.Attribute) - AttributeOrBuilder { -private static final long serialVersionUID = 0L; - // Use Attribute.newBuilder() to construct. - private Attribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Attribute() { - id_ = ""; - name_ = ""; - rule_ = 0; - values_ = java.util.Collections.emptyList(); - grants_ = java.util.Collections.emptyList(); - fqn_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Attribute(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Attribute.class, io.opentdf.platform.policy.Attribute.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAMESPACE_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.Namespace namespace_; - /** - *
-   * namespace of the attribute
-   * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - @java.lang.Override - public boolean hasNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * namespace of the attribute
-   * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - * @return The namespace. - */ - @java.lang.Override - public io.opentdf.platform.policy.Namespace getNamespace() { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - /** - *
-   * namespace of the attribute
-   * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - - public static final int NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   *attribute name
-   * 
- * - * string name = 3 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   *attribute name
-   * 
- * - * string name = 3 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RULE_FIELD_NUMBER = 4; - private int rule_ = 0; - /** - *
-   * attribute rule enum
-   * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for rule. - */ - @java.lang.Override public int getRuleValue() { - return rule_; - } - /** - *
-   * attribute rule enum
-   * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The rule. - */ - @java.lang.Override public io.opentdf.platform.policy.AttributeRuleTypeEnum getRule() { - io.opentdf.platform.policy.AttributeRuleTypeEnum result = io.opentdf.platform.policy.AttributeRuleTypeEnum.forNumber(rule_); - return result == null ? io.opentdf.platform.policy.AttributeRuleTypeEnum.UNRECOGNIZED : result; - } - - public static final int VALUES_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List values_; - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - @java.lang.Override - public java.util.List getValuesList() { - return values_; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - @java.lang.Override - public java.util.List - getValuesOrBuilderList() { - return values_; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - @java.lang.Override - public int getValuesCount() { - return values_.size(); - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getValues(int index) { - return values_.get(index); - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( - int index) { - return values_.get(index); - } - - public static final int GRANTS_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private java.util.List grants_; - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - @java.lang.Override - public java.util.List getGrantsList() { - return grants_; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - @java.lang.Override - public java.util.List - getGrantsOrBuilderList() { - return grants_; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - @java.lang.Override - public int getGrantsCount() { - return grants_.size(); - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index) { - return grants_.get(index); - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( - int index) { - return grants_.get(index); - } - - public static final int FQN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private volatile java.lang.Object fqn_ = ""; - /** - * string fqn = 7 [json_name = "fqn"]; - * @return The fqn. - */ - @java.lang.Override - public java.lang.String getFqn() { - java.lang.Object ref = fqn_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fqn_ = s; - return s; - } - } - /** - * string fqn = 7 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFqnBytes() { - java.lang.Object ref = fqn_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fqn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTIVE_FIELD_NUMBER = 8; - private com.google.protobuf.BoolValue active_; - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - * @return Whether the active field is set. - */ - @java.lang.Override - public boolean hasActive() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - * @return The active. - */ - @java.lang.Override - public com.google.protobuf.BoolValue getActive() { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - @java.lang.Override - public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.Metadata metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.Metadata getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getNamespace()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (rule_ != io.opentdf.platform.policy.AttributeRuleTypeEnum.ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(4, rule_); - } - for (int i = 0; i < values_.size(); i++) { - output.writeMessage(5, values_.get(i)); - } - for (int i = 0; i < grants_.size(); i++) { - output.writeMessage(6, grants_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, fqn_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(8, getActive()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getNamespace()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (rule_ != io.opentdf.platform.policy.AttributeRuleTypeEnum.ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, rule_); - } - for (int i = 0; i < values_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, values_.get(i)); - } - for (int i = 0; i < grants_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, grants_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, fqn_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getActive()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.Attribute)) { - return super.equals(obj); - } - io.opentdf.platform.policy.Attribute other = (io.opentdf.platform.policy.Attribute) obj; - - if (!getId() - .equals(other.getId())) return false; - if (hasNamespace() != other.hasNamespace()) return false; - if (hasNamespace()) { - if (!getNamespace() - .equals(other.getNamespace())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (rule_ != other.rule_) return false; - if (!getValuesList() - .equals(other.getValuesList())) return false; - if (!getGrantsList() - .equals(other.getGrantsList())) return false; - if (!getFqn() - .equals(other.getFqn())) return false; - if (hasActive() != other.hasActive()) return false; - if (hasActive()) { - if (!getActive() - .equals(other.getActive())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (hasNamespace()) { - hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getNamespace().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + RULE_FIELD_NUMBER; - hash = (53 * hash) + rule_; - if (getValuesCount() > 0) { - hash = (37 * hash) + VALUES_FIELD_NUMBER; - hash = (53 * hash) + getValuesList().hashCode(); - } - if (getGrantsCount() > 0) { - hash = (37 * hash) + GRANTS_FIELD_NUMBER; - hash = (53 * hash) + getGrantsList().hashCode(); - } - hash = (37 * hash) + FQN_FIELD_NUMBER; - hash = (53 * hash) + getFqn().hashCode(); - if (hasActive()) { - hash = (37 * hash) + ACTIVE_FIELD_NUMBER; - hash = (53 * hash) + getActive().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.Attribute parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Attribute parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Attribute parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Attribute parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Attribute parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Attribute parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Attribute parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Attribute parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.Attribute parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.Attribute parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.Attribute parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Attribute parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.Attribute prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.Attribute} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.Attribute) - io.opentdf.platform.policy.AttributeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Attribute.class, io.opentdf.platform.policy.Attribute.Builder.class); - } - - // Construct using io.opentdf.platform.policy.Attribute.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNamespaceFieldBuilder(); - getValuesFieldBuilder(); - getGrantsFieldBuilder(); - getActiveFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - namespace_ = null; - if (namespaceBuilder_ != null) { - namespaceBuilder_.dispose(); - namespaceBuilder_ = null; - } - name_ = ""; - rule_ = 0; - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - } else { - values_ = null; - valuesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - if (grantsBuilder_ == null) { - grants_ = java.util.Collections.emptyList(); - } else { - grants_ = null; - grantsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - fqn_ = ""; - active_ = null; - if (activeBuilder_ != null) { - activeBuilder_.dispose(); - activeBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Attribute_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.Attribute getDefaultInstanceForType() { - return io.opentdf.platform.policy.Attribute.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.Attribute build() { - io.opentdf.platform.policy.Attribute result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.Attribute buildPartial() { - io.opentdf.platform.policy.Attribute result = new io.opentdf.platform.policy.Attribute(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.Attribute result) { - if (valuesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.values_ = values_; - } else { - result.values_ = valuesBuilder_.build(); - } - if (grantsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - grants_ = java.util.Collections.unmodifiableList(grants_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.grants_ = grants_; - } else { - result.grants_ = grantsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.Attribute result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.namespace_ = namespaceBuilder_ == null - ? namespace_ - : namespaceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.rule_ = rule_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.fqn_ = fqn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.active_ = activeBuilder_ == null - ? active_ - : activeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.Attribute) { - return mergeFrom((io.opentdf.platform.policy.Attribute)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.Attribute other) { - if (other == io.opentdf.platform.policy.Attribute.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasNamespace()) { - mergeNamespace(other.getNamespace()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.rule_ != 0) { - setRuleValue(other.getRuleValue()); - } - if (valuesBuilder_ == null) { - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureValuesIsMutable(); - values_.addAll(other.values_); - } - onChanged(); - } - } else { - if (!other.values_.isEmpty()) { - if (valuesBuilder_.isEmpty()) { - valuesBuilder_.dispose(); - valuesBuilder_ = null; - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000010); - valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getValuesFieldBuilder() : null; - } else { - valuesBuilder_.addAllMessages(other.values_); - } - } - } - if (grantsBuilder_ == null) { - if (!other.grants_.isEmpty()) { - if (grants_.isEmpty()) { - grants_ = other.grants_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureGrantsIsMutable(); - grants_.addAll(other.grants_); - } - onChanged(); - } - } else { - if (!other.grants_.isEmpty()) { - if (grantsBuilder_.isEmpty()) { - grantsBuilder_.dispose(); - grantsBuilder_ = null; - grants_ = other.grants_; - bitField0_ = (bitField0_ & ~0x00000020); - grantsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getGrantsFieldBuilder() : null; - } else { - grantsBuilder_.addAllMessages(other.grants_); - } - } - } - if (!other.getFqn().isEmpty()) { - fqn_ = other.fqn_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.hasActive()) { - mergeActive(other.getActive()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getNamespaceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - rule_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - io.opentdf.platform.policy.Value m = - input.readMessage( - io.opentdf.platform.policy.Value.parser(), - extensionRegistry); - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(m); - } else { - valuesBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: { - io.opentdf.platform.kasregistry.KeyAccessServer m = - input.readMessage( - io.opentdf.platform.kasregistry.KeyAccessServer.parser(), - extensionRegistry); - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.add(m); - } else { - grantsBuilder_.addMessage(m); - } - break; - } // case 50 - case 58: { - fqn_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - input.readMessage( - getActiveFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.Namespace namespace_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespaceBuilder_; - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - public boolean hasNamespace() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - * @return The namespace. - */ - public io.opentdf.platform.policy.Namespace getNamespace() { - if (namespaceBuilder_ == null) { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } else { - return namespaceBuilder_.getMessage(); - } - } - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - public Builder setNamespace(io.opentdf.platform.policy.Namespace value) { - if (namespaceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - namespace_ = value; - } else { - namespaceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - public Builder setNamespace( - io.opentdf.platform.policy.Namespace.Builder builderForValue) { - if (namespaceBuilder_ == null) { - namespace_ = builderForValue.build(); - } else { - namespaceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - public Builder mergeNamespace(io.opentdf.platform.policy.Namespace value) { - if (namespaceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - namespace_ != null && - namespace_ != io.opentdf.platform.policy.Namespace.getDefaultInstance()) { - getNamespaceBuilder().mergeFrom(value); - } else { - namespace_ = value; - } - } else { - namespaceBuilder_.mergeFrom(value); - } - if (namespace_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - public Builder clearNamespace() { - bitField0_ = (bitField0_ & ~0x00000002); - namespace_ = null; - if (namespaceBuilder_ != null) { - namespaceBuilder_.dispose(); - namespaceBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - public io.opentdf.platform.policy.Namespace.Builder getNamespaceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getNamespaceFieldBuilder().getBuilder(); - } - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { - if (namespaceBuilder_ != null) { - return namespaceBuilder_.getMessageOrBuilder(); - } else { - return namespace_ == null ? - io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - } - /** - *
-     * namespace of the attribute
-     * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> - getNamespaceFieldBuilder() { - if (namespaceBuilder_ == null) { - namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( - getNamespace(), - getParentForChildren(), - isClean()); - namespace_ = null; - } - return namespaceBuilder_; - } - - private java.lang.Object name_ = ""; - /** - *
-     *attribute name
-     * 
- * - * string name = 3 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     *attribute name
-     * 
- * - * string name = 3 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     *attribute name
-     * 
- * - * string name = 3 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     *attribute name
-     * 
- * - * string name = 3 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     *attribute name
-     * 
- * - * string name = 3 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int rule_ = 0; - /** - *
-     * attribute rule enum
-     * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for rule. - */ - @java.lang.Override public int getRuleValue() { - return rule_; - } - /** - *
-     * attribute rule enum
-     * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for rule to set. - * @return This builder for chaining. - */ - public Builder setRuleValue(int value) { - rule_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * attribute rule enum
-     * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The rule. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeRuleTypeEnum getRule() { - io.opentdf.platform.policy.AttributeRuleTypeEnum result = io.opentdf.platform.policy.AttributeRuleTypeEnum.forNumber(rule_); - return result == null ? io.opentdf.platform.policy.AttributeRuleTypeEnum.UNRECOGNIZED : result; - } - /** - *
-     * attribute rule enum
-     * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @param value The rule to set. - * @return This builder for chaining. - */ - public Builder setRule(io.opentdf.platform.policy.AttributeRuleTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - rule_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * attribute rule enum
-     * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearRule() { - bitField0_ = (bitField0_ & ~0x00000008); - rule_ = 0; - onChanged(); - return this; - } - - private java.util.List values_ = - java.util.Collections.emptyList(); - private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - values_ = new java.util.ArrayList(values_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valuesBuilder_; - - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public java.util.List getValuesList() { - if (valuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(values_); - } else { - return valuesBuilder_.getMessageList(); - } - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public int getValuesCount() { - if (valuesBuilder_ == null) { - return values_.size(); - } else { - return valuesBuilder_.getCount(); - } - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public io.opentdf.platform.policy.Value getValues(int index) { - if (valuesBuilder_ == null) { - return values_.get(index); - } else { - return valuesBuilder_.getMessage(index); - } - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder setValues( - int index, io.opentdf.platform.policy.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - onChanged(); - } else { - valuesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder setValues( - int index, io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.set(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder addValues(io.opentdf.platform.policy.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - onChanged(); - } else { - valuesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder addValues( - int index, io.opentdf.platform.policy.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(index, value); - onChanged(); - } else { - valuesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder addValues( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder addValues( - int index, io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder addAllValues( - java.lang.Iterable values) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, values_); - onChanged(); - } else { - valuesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder clearValues() { - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - valuesBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public Builder removeValues(int index) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.remove(index); - onChanged(); - } else { - valuesBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public io.opentdf.platform.policy.Value.Builder getValuesBuilder( - int index) { - return getValuesFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( - int index) { - if (valuesBuilder_ == null) { - return values_.get(index); } else { - return valuesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public java.util.List - getValuesOrBuilderList() { - if (valuesBuilder_ != null) { - return valuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(values_); - } - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public io.opentdf.platform.policy.Value.Builder addValuesBuilder() { - return getValuesFieldBuilder().addBuilder( - io.opentdf.platform.policy.Value.getDefaultInstance()); - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public io.opentdf.platform.policy.Value.Builder addValuesBuilder( - int index) { - return getValuesFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Value.getDefaultInstance()); - } - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - public java.util.List - getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getValuesFieldBuilder() { - if (valuesBuilder_ == null) { - valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - values_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - values_ = null; - } - return valuesBuilder_; - } - - private java.util.List grants_ = - java.util.Collections.emptyList(); - private void ensureGrantsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - grants_ = new java.util.ArrayList(grants_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> grantsBuilder_; - - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public java.util.List getGrantsList() { - if (grantsBuilder_ == null) { - return java.util.Collections.unmodifiableList(grants_); - } else { - return grantsBuilder_.getMessageList(); - } - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public int getGrantsCount() { - if (grantsBuilder_ == null) { - return grants_.size(); - } else { - return grantsBuilder_.getCount(); - } - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index) { - if (grantsBuilder_ == null) { - return grants_.get(index); - } else { - return grantsBuilder_.getMessage(index); - } - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder setGrants( - int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (grantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGrantsIsMutable(); - grants_.set(index, value); - onChanged(); - } else { - grantsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder setGrants( - int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.set(index, builderForValue.build()); - onChanged(); - } else { - grantsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder addGrants(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (grantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGrantsIsMutable(); - grants_.add(value); - onChanged(); - } else { - grantsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder addGrants( - int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (grantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGrantsIsMutable(); - grants_.add(index, value); - onChanged(); - } else { - grantsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder addGrants( - io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.add(builderForValue.build()); - onChanged(); - } else { - grantsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder addGrants( - int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.add(index, builderForValue.build()); - onChanged(); - } else { - grantsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder addAllGrants( - java.lang.Iterable values) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, grants_); - onChanged(); - } else { - grantsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder clearGrants() { - if (grantsBuilder_ == null) { - grants_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - grantsBuilder_.clear(); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public Builder removeGrants(int index) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.remove(index); - onChanged(); - } else { - grantsBuilder_.remove(index); - } - return this; - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getGrantsBuilder( - int index) { - return getGrantsFieldBuilder().getBuilder(index); - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( - int index) { - if (grantsBuilder_ == null) { - return grants_.get(index); } else { - return grantsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public java.util.List - getGrantsOrBuilderList() { - if (grantsBuilder_ != null) { - return grantsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(grants_); - } - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addGrantsBuilder() { - return getGrantsFieldBuilder().addBuilder( - io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addGrantsBuilder( - int index) { - return getGrantsFieldBuilder().addBuilder( - index, io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); - } - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - public java.util.List - getGrantsBuilderList() { - return getGrantsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> - getGrantsFieldBuilder() { - if (grantsBuilder_ == null) { - grantsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( - grants_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - grants_ = null; - } - return grantsBuilder_; - } - - private java.lang.Object fqn_ = ""; - /** - * string fqn = 7 [json_name = "fqn"]; - * @return The fqn. - */ - public java.lang.String getFqn() { - java.lang.Object ref = fqn_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fqn_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string fqn = 7 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - public com.google.protobuf.ByteString - getFqnBytes() { - java.lang.Object ref = fqn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fqn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string fqn = 7 [json_name = "fqn"]; - * @param value The fqn to set. - * @return This builder for chaining. - */ - public Builder setFqn( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fqn_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * string fqn = 7 [json_name = "fqn"]; - * @return This builder for chaining. - */ - public Builder clearFqn() { - fqn_ = getDefaultInstance().getFqn(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * string fqn = 7 [json_name = "fqn"]; - * @param value The bytes for fqn to set. - * @return This builder for chaining. - */ - public Builder setFqnBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fqn_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue active_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> activeBuilder_; - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - * @return Whether the active field is set. - */ - public boolean hasActive() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - * @return The active. - */ - public com.google.protobuf.BoolValue getActive() { - if (activeBuilder_ == null) { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } else { - return activeBuilder_.getMessage(); - } - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - public Builder setActive(com.google.protobuf.BoolValue value) { - if (activeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - active_ = value; - } else { - activeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - public Builder setActive( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (activeBuilder_ == null) { - active_ = builderForValue.build(); - } else { - activeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - public Builder mergeActive(com.google.protobuf.BoolValue value) { - if (activeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - active_ != null && - active_ != com.google.protobuf.BoolValue.getDefaultInstance()) { - getActiveBuilder().mergeFrom(value); - } else { - active_ = value; - } - } else { - activeBuilder_.mergeFrom(value); - } - if (active_ != null) { - bitField0_ |= 0x00000080; - onChanged(); - } - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - public Builder clearActive() { - bitField0_ = (bitField0_ & ~0x00000080); - active_ = null; - if (activeBuilder_ != null) { - activeBuilder_.dispose(); - activeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - public com.google.protobuf.BoolValue.Builder getActiveBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getActiveFieldBuilder().getBuilder(); - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { - if (activeBuilder_ != null) { - return activeBuilder_.getMessageOrBuilder(); - } else { - return active_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getActiveFieldBuilder() { - if (activeBuilder_ == null) { - activeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getActive(), - getParentForChildren(), - isClean()); - active_ = null; - } - return activeBuilder_; - } - - private io.opentdf.platform.common.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000100); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.Attribute) - } - - // @@protoc_insertion_point(class_scope:policy.Attribute) - private static final io.opentdf.platform.policy.Attribute DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.Attribute(); - } - - public static io.opentdf.platform.policy.Attribute getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Attribute parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.Attribute getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelector.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelector.java deleted file mode 100644 index d35cba01..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelector.java +++ /dev/null @@ -1,1871 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/selectors.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - * Protobuf type {@code policy.AttributeDefinitionSelector} - */ -public final class AttributeDefinitionSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeDefinitionSelector) - AttributeDefinitionSelectorOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttributeDefinitionSelector.newBuilder() to construct. - private AttributeDefinitionSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttributeDefinitionSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttributeDefinitionSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeDefinitionSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.Builder.class); - } - - public interface NamespaceSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeDefinitionSelector.NamespaceSelector) - com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code policy.AttributeDefinitionSelector.NamespaceSelector} - */ - public static final class NamespaceSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeDefinitionSelector.NamespaceSelector) - NamespaceSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use NamespaceSelector.newBuilder() to construct. - private NamespaceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NamespaceSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NamespaceSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector other = (io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeDefinitionSelector.NamespaceSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeDefinitionSelector.NamespaceSelector) - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector build() { - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector buildPartial() { - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector result = new io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector other) { - if (other == io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeDefinitionSelector.NamespaceSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeDefinitionSelector.NamespaceSelector) - private static final io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector(); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NamespaceSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ValueSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeDefinitionSelector.ValueSelector) - com.google.protobuf.MessageOrBuilder { - - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - boolean getWithKeyAccessGrants(); - - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - boolean getWithSubjectMaps(); - - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - boolean getWithResourceMaps(); - } - /** - * Protobuf type {@code policy.AttributeDefinitionSelector.ValueSelector} - */ - public static final class ValueSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeDefinitionSelector.ValueSelector) - ValueSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use ValueSelector.newBuilder() to construct. - private ValueSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ValueSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ValueSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder.class); - } - - public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; - private boolean withKeyAccessGrants_ = false; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - - public static final int WITH_SUBJECT_MAPS_FIELD_NUMBER = 2; - private boolean withSubjectMaps_ = false; - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - @java.lang.Override - public boolean getWithSubjectMaps() { - return withSubjectMaps_; - } - - public static final int WITH_RESOURCE_MAPS_FIELD_NUMBER = 3; - private boolean withResourceMaps_ = false; - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - @java.lang.Override - public boolean getWithResourceMaps() { - return withResourceMaps_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (withKeyAccessGrants_ != false) { - output.writeBool(1, withKeyAccessGrants_); - } - if (withSubjectMaps_ != false) { - output.writeBool(2, withSubjectMaps_); - } - if (withResourceMaps_ != false) { - output.writeBool(3, withResourceMaps_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (withKeyAccessGrants_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, withKeyAccessGrants_); - } - if (withSubjectMaps_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, withSubjectMaps_); - } - if (withResourceMaps_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, withResourceMaps_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector other = (io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector) obj; - - if (getWithKeyAccessGrants() - != other.getWithKeyAccessGrants()) return false; - if (getWithSubjectMaps() - != other.getWithSubjectMaps()) return false; - if (getWithResourceMaps() - != other.getWithResourceMaps()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithKeyAccessGrants()); - hash = (37 * hash) + WITH_SUBJECT_MAPS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithSubjectMaps()); - hash = (37 * hash) + WITH_RESOURCE_MAPS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithResourceMaps()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeDefinitionSelector.ValueSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeDefinitionSelector.ValueSelector) - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - withKeyAccessGrants_ = false; - withSubjectMaps_ = false; - withResourceMaps_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector build() { - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector buildPartial() { - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector result = new io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.withKeyAccessGrants_ = withKeyAccessGrants_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.withSubjectMaps_ = withSubjectMaps_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.withResourceMaps_ = withResourceMaps_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector other) { - if (other == io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance()) return this; - if (other.getWithKeyAccessGrants() != false) { - setWithKeyAccessGrants(other.getWithKeyAccessGrants()); - } - if (other.getWithSubjectMaps() != false) { - setWithSubjectMaps(other.getWithSubjectMaps()); - } - if (other.getWithResourceMaps() != false) { - setWithResourceMaps(other.getWithResourceMaps()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - withKeyAccessGrants_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - withSubjectMaps_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - withResourceMaps_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean withKeyAccessGrants_ ; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @param value The withKeyAccessGrants to set. - * @return This builder for chaining. - */ - public Builder setWithKeyAccessGrants(boolean value) { - - withKeyAccessGrants_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return This builder for chaining. - */ - public Builder clearWithKeyAccessGrants() { - bitField0_ = (bitField0_ & ~0x00000001); - withKeyAccessGrants_ = false; - onChanged(); - return this; - } - - private boolean withSubjectMaps_ ; - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - @java.lang.Override - public boolean getWithSubjectMaps() { - return withSubjectMaps_; - } - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @param value The withSubjectMaps to set. - * @return This builder for chaining. - */ - public Builder setWithSubjectMaps(boolean value) { - - withSubjectMaps_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return This builder for chaining. - */ - public Builder clearWithSubjectMaps() { - bitField0_ = (bitField0_ & ~0x00000002); - withSubjectMaps_ = false; - onChanged(); - return this; - } - - private boolean withResourceMaps_ ; - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - @java.lang.Override - public boolean getWithResourceMaps() { - return withResourceMaps_; - } - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @param value The withResourceMaps to set. - * @return This builder for chaining. - */ - public Builder setWithResourceMaps(boolean value) { - - withResourceMaps_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return This builder for chaining. - */ - public Builder clearWithResourceMaps() { - bitField0_ = (bitField0_ & ~0x00000004); - withResourceMaps_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeDefinitionSelector.ValueSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeDefinitionSelector.ValueSelector) - private static final io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector(); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValueSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; - private boolean withKeyAccessGrants_ = false; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - - public static final int WITH_NAMESPACE_FIELD_NUMBER = 10; - private io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector withNamespace_; - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return Whether the withNamespace field is set. - */ - @java.lang.Override - public boolean hasWithNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return The withNamespace. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getWithNamespace() { - return withNamespace_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder() { - return withNamespace_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; - } - - public static final int WITH_VALUES_FIELD_NUMBER = 11; - private io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector withValues_; - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - * @return Whether the withValues field is set. - */ - @java.lang.Override - public boolean hasWithValues() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - * @return The withValues. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getWithValues() { - return withValues_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance() : withValues_; - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder getWithValuesOrBuilder() { - return withValues_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance() : withValues_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (withKeyAccessGrants_ != false) { - output.writeBool(1, withKeyAccessGrants_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(10, getWithNamespace()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(11, getWithValues()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (withKeyAccessGrants_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, withKeyAccessGrants_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getWithNamespace()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getWithValues()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeDefinitionSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeDefinitionSelector other = (io.opentdf.platform.policy.AttributeDefinitionSelector) obj; - - if (getWithKeyAccessGrants() - != other.getWithKeyAccessGrants()) return false; - if (hasWithNamespace() != other.hasWithNamespace()) return false; - if (hasWithNamespace()) { - if (!getWithNamespace() - .equals(other.getWithNamespace())) return false; - } - if (hasWithValues() != other.hasWithValues()) return false; - if (hasWithValues()) { - if (!getWithValues() - .equals(other.getWithValues())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithKeyAccessGrants()); - if (hasWithNamespace()) { - hash = (37 * hash) + WITH_NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getWithNamespace().hashCode(); - } - if (hasWithValues()) { - hash = (37 * hash) + WITH_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getWithValues().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeDefinitionSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeDefinitionSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeDefinitionSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeDefinitionSelector) - io.opentdf.platform.policy.AttributeDefinitionSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeDefinitionSelector.class, io.opentdf.platform.policy.AttributeDefinitionSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeDefinitionSelector.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWithNamespaceFieldBuilder(); - getWithValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - withKeyAccessGrants_ = false; - withNamespace_ = null; - if (withNamespaceBuilder_ != null) { - withNamespaceBuilder_.dispose(); - withNamespaceBuilder_ = null; - } - withValues_ = null; - if (withValuesBuilder_ != null) { - withValuesBuilder_.dispose(); - withValuesBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeDefinitionSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeDefinitionSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector build() { - io.opentdf.platform.policy.AttributeDefinitionSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector buildPartial() { - io.opentdf.platform.policy.AttributeDefinitionSelector result = new io.opentdf.platform.policy.AttributeDefinitionSelector(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.AttributeDefinitionSelector result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.withKeyAccessGrants_ = withKeyAccessGrants_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.withNamespace_ = withNamespaceBuilder_ == null - ? withNamespace_ - : withNamespaceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.withValues_ = withValuesBuilder_ == null - ? withValues_ - : withValuesBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeDefinitionSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeDefinitionSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeDefinitionSelector other) { - if (other == io.opentdf.platform.policy.AttributeDefinitionSelector.getDefaultInstance()) return this; - if (other.getWithKeyAccessGrants() != false) { - setWithKeyAccessGrants(other.getWithKeyAccessGrants()); - } - if (other.hasWithNamespace()) { - mergeWithNamespace(other.getWithNamespace()); - } - if (other.hasWithValues()) { - mergeWithValues(other.getWithValues()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - withKeyAccessGrants_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 82: { - input.readMessage( - getWithNamespaceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 82 - case 90: { - input.readMessage( - getWithValuesFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 90 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean withKeyAccessGrants_ ; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @param value The withKeyAccessGrants to set. - * @return This builder for chaining. - */ - public Builder setWithKeyAccessGrants(boolean value) { - - withKeyAccessGrants_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return This builder for chaining. - */ - public Builder clearWithKeyAccessGrants() { - bitField0_ = (bitField0_ & ~0x00000001); - withKeyAccessGrants_ = false; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector withNamespace_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder> withNamespaceBuilder_; - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return Whether the withNamespace field is set. - */ - public boolean hasWithNamespace() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return The withNamespace. - */ - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getWithNamespace() { - if (withNamespaceBuilder_ == null) { - return withNamespace_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; - } else { - return withNamespaceBuilder_.getMessage(); - } - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public Builder setWithNamespace(io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector value) { - if (withNamespaceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - withNamespace_ = value; - } else { - withNamespaceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public Builder setWithNamespace( - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder builderForValue) { - if (withNamespaceBuilder_ == null) { - withNamespace_ = builderForValue.build(); - } else { - withNamespaceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public Builder mergeWithNamespace(io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector value) { - if (withNamespaceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - withNamespace_ != null && - withNamespace_ != io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance()) { - getWithNamespaceBuilder().mergeFrom(value); - } else { - withNamespace_ = value; - } - } else { - withNamespaceBuilder_.mergeFrom(value); - } - if (withNamespace_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public Builder clearWithNamespace() { - bitField0_ = (bitField0_ & ~0x00000002); - withNamespace_ = null; - if (withNamespaceBuilder_ != null) { - withNamespaceBuilder_.dispose(); - withNamespaceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder getWithNamespaceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getWithNamespaceFieldBuilder().getBuilder(); - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder() { - if (withNamespaceBuilder_ != null) { - return withNamespaceBuilder_.getMessageOrBuilder(); - } else { - return withNamespace_ == null ? - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; - } - } - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder> - getWithNamespaceFieldBuilder() { - if (withNamespaceBuilder_ == null) { - withNamespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder>( - getWithNamespace(), - getParentForChildren(), - isClean()); - withNamespace_ = null; - } - return withNamespaceBuilder_; - } - - private io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector withValues_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder> withValuesBuilder_; - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - * @return Whether the withValues field is set. - */ - public boolean hasWithValues() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - * @return The withValues. - */ - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getWithValues() { - if (withValuesBuilder_ == null) { - return withValues_ == null ? io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance() : withValues_; - } else { - return withValuesBuilder_.getMessage(); - } - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - public Builder setWithValues(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector value) { - if (withValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - withValues_ = value; - } else { - withValuesBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - public Builder setWithValues( - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder builderForValue) { - if (withValuesBuilder_ == null) { - withValues_ = builderForValue.build(); - } else { - withValuesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - public Builder mergeWithValues(io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector value) { - if (withValuesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - withValues_ != null && - withValues_ != io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance()) { - getWithValuesBuilder().mergeFrom(value); - } else { - withValues_ = value; - } - } else { - withValuesBuilder_.mergeFrom(value); - } - if (withValues_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - public Builder clearWithValues() { - bitField0_ = (bitField0_ & ~0x00000004); - withValues_ = null; - if (withValuesBuilder_ != null) { - withValuesBuilder_.dispose(); - withValuesBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder getWithValuesBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getWithValuesFieldBuilder().getBuilder(); - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - public io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder getWithValuesOrBuilder() { - if (withValuesBuilder_ != null) { - return withValuesBuilder_.getMessageOrBuilder(); - } else { - return withValues_ == null ? - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.getDefaultInstance() : withValues_; - } - } - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder> - getWithValuesFieldBuilder() { - if (withValuesBuilder_ == null) { - withValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder>( - getWithValues(), - getParentForChildren(), - isClean()); - withValues_ = null; - } - return withValuesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeDefinitionSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeDefinitionSelector) - private static final io.opentdf.platform.policy.AttributeDefinitionSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeDefinitionSelector(); - } - - public static io.opentdf.platform.policy.AttributeDefinitionSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttributeDefinitionSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeDefinitionSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelectorOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelectorOrBuilder.java deleted file mode 100644 index 6c9839be..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/AttributeDefinitionSelectorOrBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/selectors.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface AttributeDefinitionSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeDefinitionSelector) - com.google.protobuf.MessageOrBuilder { - - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - boolean getWithKeyAccessGrants(); - - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return Whether the withNamespace field is set. - */ - boolean hasWithNamespace(); - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return The withNamespace. - */ - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelector getWithNamespace(); - /** - * .policy.AttributeDefinitionSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - io.opentdf.platform.policy.AttributeDefinitionSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder(); - - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - * @return Whether the withValues field is set. - */ - boolean hasWithValues(); - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - * @return The withValues. - */ - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelector getWithValues(); - /** - * .policy.AttributeDefinitionSelector.ValueSelector with_values = 11 [json_name = "withValues"]; - */ - io.opentdf.platform.policy.AttributeDefinitionSelector.ValueSelectorOrBuilder getWithValuesOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelector.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelector.java deleted file mode 100644 index 50315346..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelector.java +++ /dev/null @@ -1,1907 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/selectors.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - * Protobuf type {@code policy.AttributeNamespaceSelector} - */ -public final class AttributeNamespaceSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeNamespaceSelector) - AttributeNamespaceSelectorOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttributeNamespaceSelector.newBuilder() to construct. - private AttributeNamespaceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttributeNamespaceSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttributeNamespaceSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeNamespaceSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.Builder.class); - } - - public interface AttributeSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeNamespaceSelector.AttributeSelector) - com.google.protobuf.MessageOrBuilder { - - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - boolean getWithKeyAccessGrants(); - - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - * @return Whether the withValues field is set. - */ - boolean hasWithValues(); - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - * @return The withValues. - */ - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getWithValues(); - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder getWithValuesOrBuilder(); - } - /** - * Protobuf type {@code policy.AttributeNamespaceSelector.AttributeSelector} - */ - public static final class AttributeSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeNamespaceSelector.AttributeSelector) - AttributeSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use AttributeSelector.newBuilder() to construct. - private AttributeSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttributeSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttributeSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder.class); - } - - public interface ValueSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) - com.google.protobuf.MessageOrBuilder { - - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - boolean getWithKeyAccessGrants(); - - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - boolean getWithSubjectMaps(); - - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - boolean getWithResourceMaps(); - } - /** - * Protobuf type {@code policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector} - */ - public static final class ValueSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) - ValueSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use ValueSelector.newBuilder() to construct. - private ValueSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ValueSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ValueSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder.class); - } - - public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; - private boolean withKeyAccessGrants_ = false; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - - public static final int WITH_SUBJECT_MAPS_FIELD_NUMBER = 2; - private boolean withSubjectMaps_ = false; - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - @java.lang.Override - public boolean getWithSubjectMaps() { - return withSubjectMaps_; - } - - public static final int WITH_RESOURCE_MAPS_FIELD_NUMBER = 3; - private boolean withResourceMaps_ = false; - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - @java.lang.Override - public boolean getWithResourceMaps() { - return withResourceMaps_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (withKeyAccessGrants_ != false) { - output.writeBool(1, withKeyAccessGrants_); - } - if (withSubjectMaps_ != false) { - output.writeBool(2, withSubjectMaps_); - } - if (withResourceMaps_ != false) { - output.writeBool(3, withResourceMaps_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (withKeyAccessGrants_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, withKeyAccessGrants_); - } - if (withSubjectMaps_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, withSubjectMaps_); - } - if (withResourceMaps_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, withResourceMaps_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector other = (io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) obj; - - if (getWithKeyAccessGrants() - != other.getWithKeyAccessGrants()) return false; - if (getWithSubjectMaps() - != other.getWithSubjectMaps()) return false; - if (getWithResourceMaps() - != other.getWithResourceMaps()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithKeyAccessGrants()); - hash = (37 * hash) + WITH_SUBJECT_MAPS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithSubjectMaps()); - hash = (37 * hash) + WITH_RESOURCE_MAPS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithResourceMaps()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - withKeyAccessGrants_ = false; - withSubjectMaps_ = false; - withResourceMaps_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector build() { - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector buildPartial() { - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector result = new io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.withKeyAccessGrants_ = withKeyAccessGrants_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.withSubjectMaps_ = withSubjectMaps_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.withResourceMaps_ = withResourceMaps_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector other) { - if (other == io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance()) return this; - if (other.getWithKeyAccessGrants() != false) { - setWithKeyAccessGrants(other.getWithKeyAccessGrants()); - } - if (other.getWithSubjectMaps() != false) { - setWithSubjectMaps(other.getWithSubjectMaps()); - } - if (other.getWithResourceMaps() != false) { - setWithResourceMaps(other.getWithResourceMaps()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - withKeyAccessGrants_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - withSubjectMaps_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - withResourceMaps_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean withKeyAccessGrants_ ; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @param value The withKeyAccessGrants to set. - * @return This builder for chaining. - */ - public Builder setWithKeyAccessGrants(boolean value) { - - withKeyAccessGrants_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return This builder for chaining. - */ - public Builder clearWithKeyAccessGrants() { - bitField0_ = (bitField0_ & ~0x00000001); - withKeyAccessGrants_ = false; - onChanged(); - return this; - } - - private boolean withSubjectMaps_ ; - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - @java.lang.Override - public boolean getWithSubjectMaps() { - return withSubjectMaps_; - } - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @param value The withSubjectMaps to set. - * @return This builder for chaining. - */ - public Builder setWithSubjectMaps(boolean value) { - - withSubjectMaps_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return This builder for chaining. - */ - public Builder clearWithSubjectMaps() { - bitField0_ = (bitField0_ & ~0x00000002); - withSubjectMaps_ = false; - onChanged(); - return this; - } - - private boolean withResourceMaps_ ; - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - @java.lang.Override - public boolean getWithResourceMaps() { - return withResourceMaps_; - } - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @param value The withResourceMaps to set. - * @return This builder for chaining. - */ - public Builder setWithResourceMaps(boolean value) { - - withResourceMaps_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return This builder for chaining. - */ - public Builder clearWithResourceMaps() { - bitField0_ = (bitField0_ & ~0x00000004); - withResourceMaps_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector) - private static final io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector(); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValueSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; - private boolean withKeyAccessGrants_ = false; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - - public static final int WITH_VALUES_FIELD_NUMBER = 10; - private io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector withValues_; - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - * @return Whether the withValues field is set. - */ - @java.lang.Override - public boolean hasWithValues() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - * @return The withValues. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getWithValues() { - return withValues_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance() : withValues_; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder getWithValuesOrBuilder() { - return withValues_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance() : withValues_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (withKeyAccessGrants_ != false) { - output.writeBool(1, withKeyAccessGrants_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(10, getWithValues()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (withKeyAccessGrants_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, withKeyAccessGrants_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getWithValues()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector other = (io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector) obj; - - if (getWithKeyAccessGrants() - != other.getWithKeyAccessGrants()) return false; - if (hasWithValues() != other.hasWithValues()) return false; - if (hasWithValues()) { - if (!getWithValues() - .equals(other.getWithValues())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithKeyAccessGrants()); - if (hasWithValues()) { - hash = (37 * hash) + WITH_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getWithValues().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeNamespaceSelector.AttributeSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeNamespaceSelector.AttributeSelector) - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWithValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - withKeyAccessGrants_ = false; - withValues_ = null; - if (withValuesBuilder_ != null) { - withValuesBuilder_.dispose(); - withValuesBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector build() { - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector buildPartial() { - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector result = new io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.withKeyAccessGrants_ = withKeyAccessGrants_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.withValues_ = withValuesBuilder_ == null - ? withValues_ - : withValuesBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector other) { - if (other == io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance()) return this; - if (other.getWithKeyAccessGrants() != false) { - setWithKeyAccessGrants(other.getWithKeyAccessGrants()); - } - if (other.hasWithValues()) { - mergeWithValues(other.getWithValues()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - withKeyAccessGrants_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 82: { - input.readMessage( - getWithValuesFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 82 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean withKeyAccessGrants_ ; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @param value The withKeyAccessGrants to set. - * @return This builder for chaining. - */ - public Builder setWithKeyAccessGrants(boolean value) { - - withKeyAccessGrants_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return This builder for chaining. - */ - public Builder clearWithKeyAccessGrants() { - bitField0_ = (bitField0_ & ~0x00000001); - withKeyAccessGrants_ = false; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector withValues_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder> withValuesBuilder_; - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - * @return Whether the withValues field is set. - */ - public boolean hasWithValues() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - * @return The withValues. - */ - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector getWithValues() { - if (withValuesBuilder_ == null) { - return withValues_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance() : withValues_; - } else { - return withValuesBuilder_.getMessage(); - } - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - public Builder setWithValues(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector value) { - if (withValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - withValues_ = value; - } else { - withValuesBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - public Builder setWithValues( - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder builderForValue) { - if (withValuesBuilder_ == null) { - withValues_ = builderForValue.build(); - } else { - withValuesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - public Builder mergeWithValues(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector value) { - if (withValuesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - withValues_ != null && - withValues_ != io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance()) { - getWithValuesBuilder().mergeFrom(value); - } else { - withValues_ = value; - } - } else { - withValuesBuilder_.mergeFrom(value); - } - if (withValues_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - public Builder clearWithValues() { - bitField0_ = (bitField0_ & ~0x00000002); - withValues_ = null; - if (withValuesBuilder_ != null) { - withValuesBuilder_.dispose(); - withValuesBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder getWithValuesBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getWithValuesFieldBuilder().getBuilder(); - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder getWithValuesOrBuilder() { - if (withValuesBuilder_ != null) { - return withValuesBuilder_.getMessageOrBuilder(); - } else { - return withValues_ == null ? - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.getDefaultInstance() : withValues_; - } - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector with_values = 10 [json_name = "withValues"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder> - getWithValuesFieldBuilder() { - if (withValuesBuilder_ == null) { - withValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.ValueSelectorOrBuilder>( - getWithValues(), - getParentForChildren(), - isClean()); - withValues_ = null; - } - return withValuesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeNamespaceSelector.AttributeSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeNamespaceSelector.AttributeSelector) - private static final io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector(); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttributeSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int WITH_ATTRIBUTES_FIELD_NUMBER = 10; - private io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector withAttributes_; - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - * @return Whether the withAttributes field is set. - */ - @java.lang.Override - public boolean hasWithAttributes() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - * @return The withAttributes. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getWithAttributes() { - return withAttributes_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance() : withAttributes_; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder getWithAttributesOrBuilder() { - return withAttributes_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance() : withAttributes_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(10, getWithAttributes()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getWithAttributes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeNamespaceSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeNamespaceSelector other = (io.opentdf.platform.policy.AttributeNamespaceSelector) obj; - - if (hasWithAttributes() != other.hasWithAttributes()) return false; - if (hasWithAttributes()) { - if (!getWithAttributes() - .equals(other.getWithAttributes())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasWithAttributes()) { - hash = (37 * hash) + WITH_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getWithAttributes().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeNamespaceSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeNamespaceSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeNamespaceSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeNamespaceSelector) - io.opentdf.platform.policy.AttributeNamespaceSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeNamespaceSelector.class, io.opentdf.platform.policy.AttributeNamespaceSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeNamespaceSelector.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWithAttributesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - withAttributes_ = null; - if (withAttributesBuilder_ != null) { - withAttributesBuilder_.dispose(); - withAttributesBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeNamespaceSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeNamespaceSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector build() { - io.opentdf.platform.policy.AttributeNamespaceSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector buildPartial() { - io.opentdf.platform.policy.AttributeNamespaceSelector result = new io.opentdf.platform.policy.AttributeNamespaceSelector(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.AttributeNamespaceSelector result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.withAttributes_ = withAttributesBuilder_ == null - ? withAttributes_ - : withAttributesBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeNamespaceSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeNamespaceSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeNamespaceSelector other) { - if (other == io.opentdf.platform.policy.AttributeNamespaceSelector.getDefaultInstance()) return this; - if (other.hasWithAttributes()) { - mergeWithAttributes(other.getWithAttributes()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 82: { - input.readMessage( - getWithAttributesFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 82 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector withAttributes_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder> withAttributesBuilder_; - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - * @return Whether the withAttributes field is set. - */ - public boolean hasWithAttributes() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - * @return The withAttributes. - */ - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getWithAttributes() { - if (withAttributesBuilder_ == null) { - return withAttributes_ == null ? io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance() : withAttributes_; - } else { - return withAttributesBuilder_.getMessage(); - } - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - public Builder setWithAttributes(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector value) { - if (withAttributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - withAttributes_ = value; - } else { - withAttributesBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - public Builder setWithAttributes( - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder builderForValue) { - if (withAttributesBuilder_ == null) { - withAttributes_ = builderForValue.build(); - } else { - withAttributesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - public Builder mergeWithAttributes(io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector value) { - if (withAttributesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - withAttributes_ != null && - withAttributes_ != io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance()) { - getWithAttributesBuilder().mergeFrom(value); - } else { - withAttributes_ = value; - } - } else { - withAttributesBuilder_.mergeFrom(value); - } - if (withAttributes_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - public Builder clearWithAttributes() { - bitField0_ = (bitField0_ & ~0x00000001); - withAttributes_ = null; - if (withAttributesBuilder_ != null) { - withAttributesBuilder_.dispose(); - withAttributesBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder getWithAttributesBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getWithAttributesFieldBuilder().getBuilder(); - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - public io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder getWithAttributesOrBuilder() { - if (withAttributesBuilder_ != null) { - return withAttributesBuilder_.getMessageOrBuilder(); - } else { - return withAttributes_ == null ? - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.getDefaultInstance() : withAttributes_; - } - } - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder> - getWithAttributesFieldBuilder() { - if (withAttributesBuilder_ == null) { - withAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder>( - getWithAttributes(), - getParentForChildren(), - isClean()); - withAttributes_ = null; - } - return withAttributesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeNamespaceSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeNamespaceSelector) - private static final io.opentdf.platform.policy.AttributeNamespaceSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeNamespaceSelector(); - } - - public static io.opentdf.platform.policy.AttributeNamespaceSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttributeNamespaceSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeNamespaceSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelectorOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelectorOrBuilder.java deleted file mode 100644 index b6415c0f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/AttributeNamespaceSelectorOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/selectors.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface AttributeNamespaceSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeNamespaceSelector) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - * @return Whether the withAttributes field is set. - */ - boolean hasWithAttributes(); - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - * @return The withAttributes. - */ - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelector getWithAttributes(); - /** - * .policy.AttributeNamespaceSelector.AttributeSelector with_attributes = 10 [json_name = "withAttributes"]; - */ - io.opentdf.platform.policy.AttributeNamespaceSelector.AttributeSelectorOrBuilder getWithAttributesOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeOrBuilder.java deleted file mode 100644 index 11eb3572..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/AttributeOrBuilder.java +++ /dev/null @@ -1,202 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface AttributeOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.Attribute) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * namespace of the attribute
-   * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - boolean hasNamespace(); - /** - *
-   * namespace of the attribute
-   * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - * @return The namespace. - */ - io.opentdf.platform.policy.Namespace getNamespace(); - /** - *
-   * namespace of the attribute
-   * 
- * - * .policy.Namespace namespace = 2 [json_name = "namespace"]; - */ - io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder(); - - /** - *
-   *attribute name
-   * 
- * - * string name = 3 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   *attribute name
-   * 
- * - * string name = 3 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * attribute rule enum
-   * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for rule. - */ - int getRuleValue(); - /** - *
-   * attribute rule enum
-   * 
- * - * .policy.AttributeRuleTypeEnum rule = 4 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The rule. - */ - io.opentdf.platform.policy.AttributeRuleTypeEnum getRule(); - - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - java.util.List - getValuesList(); - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - io.opentdf.platform.policy.Value getValues(int index); - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - int getValuesCount(); - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - java.util.List - getValuesOrBuilderList(); - /** - * repeated .policy.Value values = 5 [json_name = "values"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( - int index); - - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - java.util.List - getGrantsList(); - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index); - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - int getGrantsCount(); - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - java.util.List - getGrantsOrBuilderList(); - /** - * repeated .kasregistry.KeyAccessServer grants = 6 [json_name = "grants"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( - int index); - - /** - * string fqn = 7 [json_name = "fqn"]; - * @return The fqn. - */ - java.lang.String getFqn(); - /** - * string fqn = 7 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - com.google.protobuf.ByteString - getFqnBytes(); - - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - * @return Whether the active field is set. - */ - boolean hasActive(); - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - * @return The active. - */ - com.google.protobuf.BoolValue getActive(); - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 8 [json_name = "active"]; - */ - com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder(); - - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeRuleTypeEnum.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeRuleTypeEnum.java deleted file mode 100644 index 51df5a9a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/AttributeRuleTypeEnum.java +++ /dev/null @@ -1,136 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package
- * 
- * - * Protobuf enum {@code policy.AttributeRuleTypeEnum} - */ -public enum AttributeRuleTypeEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; - */ - ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED(0), - /** - * ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; - */ - ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF(1), - /** - * ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; - */ - ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF(2), - /** - * ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; - */ - ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY(3), - UNRECOGNIZED(-1), - ; - - /** - * ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; - */ - public static final int ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED_VALUE = 0; - /** - * ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; - */ - public static final int ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF_VALUE = 1; - /** - * ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; - */ - public static final int ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF_VALUE = 2; - /** - * ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; - */ - public static final int ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AttributeRuleTypeEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AttributeRuleTypeEnum forNumber(int value) { - switch (value) { - case 0: return ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED; - case 1: return ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF; - case 2: return ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF; - case 3: return ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AttributeRuleTypeEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AttributeRuleTypeEnum findValueByNumber(int number) { - return AttributeRuleTypeEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.getDescriptor().getEnumTypes().get(0); - } - - private static final AttributeRuleTypeEnum[] VALUES = values(); - - public static AttributeRuleTypeEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AttributeRuleTypeEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:policy.AttributeRuleTypeEnum) -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelector.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelector.java deleted file mode 100644 index ab6c5683..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelector.java +++ /dev/null @@ -1,1882 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/selectors.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - * Protobuf type {@code policy.AttributeValueSelector} - */ -public final class AttributeValueSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeValueSelector) - AttributeValueSelectorOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttributeValueSelector.newBuilder() to construct. - private AttributeValueSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttributeValueSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttributeValueSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeValueSelector.class, io.opentdf.platform.policy.AttributeValueSelector.Builder.class); - } - - public interface AttributeSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeValueSelector.AttributeSelector) - com.google.protobuf.MessageOrBuilder { - - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - boolean getWithKeyAccessGrants(); - - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return Whether the withNamespace field is set. - */ - boolean hasWithNamespace(); - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return The withNamespace. - */ - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getWithNamespace(); - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder(); - } - /** - * Protobuf type {@code policy.AttributeValueSelector.AttributeSelector} - */ - public static final class AttributeSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeValueSelector.AttributeSelector) - AttributeSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use AttributeSelector.newBuilder() to construct. - private AttributeSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttributeSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttributeSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.class, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder.class); - } - - public interface NamespaceSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) - com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code policy.AttributeValueSelector.AttributeSelector.NamespaceSelector} - */ - public static final class NamespaceSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) - NamespaceSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use NamespaceSelector.newBuilder() to construct. - private NamespaceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NamespaceSelector() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NamespaceSelector(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.class, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector other = (io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeValueSelector.AttributeSelector.NamespaceSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.class, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector build() { - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector buildPartial() { - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector result = new io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector other) { - if (other == io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeValueSelector.AttributeSelector.NamespaceSelector) - private static final io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector(); - } - - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NamespaceSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; - private boolean withKeyAccessGrants_ = false; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - - public static final int WITH_NAMESPACE_FIELD_NUMBER = 10; - private io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector withNamespace_; - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return Whether the withNamespace field is set. - */ - @java.lang.Override - public boolean hasWithNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return The withNamespace. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getWithNamespace() { - return withNamespace_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder() { - return withNamespace_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (withKeyAccessGrants_ != false) { - output.writeBool(1, withKeyAccessGrants_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(10, getWithNamespace()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (withKeyAccessGrants_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, withKeyAccessGrants_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getWithNamespace()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector other = (io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector) obj; - - if (getWithKeyAccessGrants() - != other.getWithKeyAccessGrants()) return false; - if (hasWithNamespace() != other.hasWithNamespace()) return false; - if (hasWithNamespace()) { - if (!getWithNamespace() - .equals(other.getWithNamespace())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithKeyAccessGrants()); - if (hasWithNamespace()) { - hash = (37 * hash) + WITH_NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getWithNamespace().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeValueSelector.AttributeSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeValueSelector.AttributeSelector) - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.class, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWithNamespaceFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - withKeyAccessGrants_ = false; - withNamespace_ = null; - if (withNamespaceBuilder_ != null) { - withNamespaceBuilder_.dispose(); - withNamespaceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector build() { - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector buildPartial() { - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector result = new io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.withKeyAccessGrants_ = withKeyAccessGrants_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.withNamespace_ = withNamespaceBuilder_ == null - ? withNamespace_ - : withNamespaceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector other) { - if (other == io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance()) return this; - if (other.getWithKeyAccessGrants() != false) { - setWithKeyAccessGrants(other.getWithKeyAccessGrants()); - } - if (other.hasWithNamespace()) { - mergeWithNamespace(other.getWithNamespace()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - withKeyAccessGrants_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 82: { - input.readMessage( - getWithNamespaceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 82 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean withKeyAccessGrants_ ; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @param value The withKeyAccessGrants to set. - * @return This builder for chaining. - */ - public Builder setWithKeyAccessGrants(boolean value) { - - withKeyAccessGrants_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return This builder for chaining. - */ - public Builder clearWithKeyAccessGrants() { - bitField0_ = (bitField0_ & ~0x00000001); - withKeyAccessGrants_ = false; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector withNamespace_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder> withNamespaceBuilder_; - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return Whether the withNamespace field is set. - */ - public boolean hasWithNamespace() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - * @return The withNamespace. - */ - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector getWithNamespace() { - if (withNamespaceBuilder_ == null) { - return withNamespace_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; - } else { - return withNamespaceBuilder_.getMessage(); - } - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public Builder setWithNamespace(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector value) { - if (withNamespaceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - withNamespace_ = value; - } else { - withNamespaceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public Builder setWithNamespace( - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder builderForValue) { - if (withNamespaceBuilder_ == null) { - withNamespace_ = builderForValue.build(); - } else { - withNamespaceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public Builder mergeWithNamespace(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector value) { - if (withNamespaceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - withNamespace_ != null && - withNamespace_ != io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance()) { - getWithNamespaceBuilder().mergeFrom(value); - } else { - withNamespace_ = value; - } - } else { - withNamespaceBuilder_.mergeFrom(value); - } - if (withNamespace_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public Builder clearWithNamespace() { - bitField0_ = (bitField0_ & ~0x00000002); - withNamespace_ = null; - if (withNamespaceBuilder_ != null) { - withNamespaceBuilder_.dispose(); - withNamespaceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder getWithNamespaceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getWithNamespaceFieldBuilder().getBuilder(); - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder getWithNamespaceOrBuilder() { - if (withNamespaceBuilder_ != null) { - return withNamespaceBuilder_.getMessageOrBuilder(); - } else { - return withNamespace_ == null ? - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.getDefaultInstance() : withNamespace_; - } - } - /** - * .policy.AttributeValueSelector.AttributeSelector.NamespaceSelector with_namespace = 10 [json_name = "withNamespace"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder> - getWithNamespaceFieldBuilder() { - if (withNamespaceBuilder_ == null) { - withNamespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.NamespaceSelectorOrBuilder>( - getWithNamespace(), - getParentForChildren(), - isClean()); - withNamespace_ = null; - } - return withNamespaceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeValueSelector.AttributeSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeValueSelector.AttributeSelector) - private static final io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector(); - } - - public static io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttributeSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER = 1; - private boolean withKeyAccessGrants_ = false; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - - public static final int WITH_SUBJECT_MAPS_FIELD_NUMBER = 2; - private boolean withSubjectMaps_ = false; - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - @java.lang.Override - public boolean getWithSubjectMaps() { - return withSubjectMaps_; - } - - public static final int WITH_RESOURCE_MAPS_FIELD_NUMBER = 3; - private boolean withResourceMaps_ = false; - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - @java.lang.Override - public boolean getWithResourceMaps() { - return withResourceMaps_; - } - - public static final int WITH_ATTRIBUTE_FIELD_NUMBER = 10; - private io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector withAttribute_; - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - * @return Whether the withAttribute field is set. - */ - @java.lang.Override - public boolean hasWithAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - * @return The withAttribute. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getWithAttribute() { - return withAttribute_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance() : withAttribute_; - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder getWithAttributeOrBuilder() { - return withAttribute_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance() : withAttribute_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (withKeyAccessGrants_ != false) { - output.writeBool(1, withKeyAccessGrants_); - } - if (withSubjectMaps_ != false) { - output.writeBool(2, withSubjectMaps_); - } - if (withResourceMaps_ != false) { - output.writeBool(3, withResourceMaps_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(10, getWithAttribute()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (withKeyAccessGrants_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, withKeyAccessGrants_); - } - if (withSubjectMaps_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, withSubjectMaps_); - } - if (withResourceMaps_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, withResourceMaps_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getWithAttribute()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.AttributeValueSelector)) { - return super.equals(obj); - } - io.opentdf.platform.policy.AttributeValueSelector other = (io.opentdf.platform.policy.AttributeValueSelector) obj; - - if (getWithKeyAccessGrants() - != other.getWithKeyAccessGrants()) return false; - if (getWithSubjectMaps() - != other.getWithSubjectMaps()) return false; - if (getWithResourceMaps() - != other.getWithResourceMaps()) return false; - if (hasWithAttribute() != other.hasWithAttribute()) return false; - if (hasWithAttribute()) { - if (!getWithAttribute() - .equals(other.getWithAttribute())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WITH_KEY_ACCESS_GRANTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithKeyAccessGrants()); - hash = (37 * hash) + WITH_SUBJECT_MAPS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithSubjectMaps()); - hash = (37 * hash) + WITH_RESOURCE_MAPS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getWithResourceMaps()); - if (hasWithAttribute()) { - hash = (37 * hash) + WITH_ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getWithAttribute().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.AttributeValueSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.AttributeValueSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.AttributeValueSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.AttributeValueSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.AttributeValueSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.AttributeValueSelector) - io.opentdf.platform.policy.AttributeValueSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.AttributeValueSelector.class, io.opentdf.platform.policy.AttributeValueSelector.Builder.class); - } - - // Construct using io.opentdf.platform.policy.AttributeValueSelector.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWithAttributeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - withKeyAccessGrants_ = false; - withSubjectMaps_ = false; - withResourceMaps_ = false; - withAttribute_ = null; - if (withAttributeBuilder_ != null) { - withAttributeBuilder_.dispose(); - withAttributeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.SelectorsProto.internal_static_policy_AttributeValueSelector_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector getDefaultInstanceForType() { - return io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector build() { - io.opentdf.platform.policy.AttributeValueSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector buildPartial() { - io.opentdf.platform.policy.AttributeValueSelector result = new io.opentdf.platform.policy.AttributeValueSelector(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.AttributeValueSelector result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.withKeyAccessGrants_ = withKeyAccessGrants_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.withSubjectMaps_ = withSubjectMaps_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.withResourceMaps_ = withResourceMaps_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.withAttribute_ = withAttributeBuilder_ == null - ? withAttribute_ - : withAttributeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.AttributeValueSelector) { - return mergeFrom((io.opentdf.platform.policy.AttributeValueSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.AttributeValueSelector other) { - if (other == io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance()) return this; - if (other.getWithKeyAccessGrants() != false) { - setWithKeyAccessGrants(other.getWithKeyAccessGrants()); - } - if (other.getWithSubjectMaps() != false) { - setWithSubjectMaps(other.getWithSubjectMaps()); - } - if (other.getWithResourceMaps() != false) { - setWithResourceMaps(other.getWithResourceMaps()); - } - if (other.hasWithAttribute()) { - mergeWithAttribute(other.getWithAttribute()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - withKeyAccessGrants_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - withSubjectMaps_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - withResourceMaps_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 82: { - input.readMessage( - getWithAttributeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 82 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private boolean withKeyAccessGrants_ ; - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - @java.lang.Override - public boolean getWithKeyAccessGrants() { - return withKeyAccessGrants_; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @param value The withKeyAccessGrants to set. - * @return This builder for chaining. - */ - public Builder setWithKeyAccessGrants(boolean value) { - - withKeyAccessGrants_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return This builder for chaining. - */ - public Builder clearWithKeyAccessGrants() { - bitField0_ = (bitField0_ & ~0x00000001); - withKeyAccessGrants_ = false; - onChanged(); - return this; - } - - private boolean withSubjectMaps_ ; - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - @java.lang.Override - public boolean getWithSubjectMaps() { - return withSubjectMaps_; - } - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @param value The withSubjectMaps to set. - * @return This builder for chaining. - */ - public Builder setWithSubjectMaps(boolean value) { - - withSubjectMaps_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return This builder for chaining. - */ - public Builder clearWithSubjectMaps() { - bitField0_ = (bitField0_ & ~0x00000002); - withSubjectMaps_ = false; - onChanged(); - return this; - } - - private boolean withResourceMaps_ ; - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - @java.lang.Override - public boolean getWithResourceMaps() { - return withResourceMaps_; - } - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @param value The withResourceMaps to set. - * @return This builder for chaining. - */ - public Builder setWithResourceMaps(boolean value) { - - withResourceMaps_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return This builder for chaining. - */ - public Builder clearWithResourceMaps() { - bitField0_ = (bitField0_ & ~0x00000004); - withResourceMaps_ = false; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector withAttribute_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder> withAttributeBuilder_; - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - * @return Whether the withAttribute field is set. - */ - public boolean hasWithAttribute() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - * @return The withAttribute. - */ - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getWithAttribute() { - if (withAttributeBuilder_ == null) { - return withAttribute_ == null ? io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance() : withAttribute_; - } else { - return withAttributeBuilder_.getMessage(); - } - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - public Builder setWithAttribute(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector value) { - if (withAttributeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - withAttribute_ = value; - } else { - withAttributeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - public Builder setWithAttribute( - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder builderForValue) { - if (withAttributeBuilder_ == null) { - withAttribute_ = builderForValue.build(); - } else { - withAttributeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - public Builder mergeWithAttribute(io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector value) { - if (withAttributeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - withAttribute_ != null && - withAttribute_ != io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance()) { - getWithAttributeBuilder().mergeFrom(value); - } else { - withAttribute_ = value; - } - } else { - withAttributeBuilder_.mergeFrom(value); - } - if (withAttribute_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - public Builder clearWithAttribute() { - bitField0_ = (bitField0_ & ~0x00000008); - withAttribute_ = null; - if (withAttributeBuilder_ != null) { - withAttributeBuilder_.dispose(); - withAttributeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder getWithAttributeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getWithAttributeFieldBuilder().getBuilder(); - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - public io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder getWithAttributeOrBuilder() { - if (withAttributeBuilder_ != null) { - return withAttributeBuilder_.getMessageOrBuilder(); - } else { - return withAttribute_ == null ? - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.getDefaultInstance() : withAttribute_; - } - } - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder> - getWithAttributeFieldBuilder() { - if (withAttributeBuilder_ == null) { - withAttributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector.Builder, io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder>( - getWithAttribute(), - getParentForChildren(), - isClean()); - withAttribute_ = null; - } - return withAttributeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.AttributeValueSelector) - } - - // @@protoc_insertion_point(class_scope:policy.AttributeValueSelector) - private static final io.opentdf.platform.policy.AttributeValueSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.AttributeValueSelector(); - } - - public static io.opentdf.platform.policy.AttributeValueSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttributeValueSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelectorOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelectorOrBuilder.java deleted file mode 100644 index d530a217..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/AttributeValueSelectorOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/selectors.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface AttributeValueSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.AttributeValueSelector) - com.google.protobuf.MessageOrBuilder { - - /** - * bool with_key_access_grants = 1 [json_name = "withKeyAccessGrants"]; - * @return The withKeyAccessGrants. - */ - boolean getWithKeyAccessGrants(); - - /** - * bool with_subject_maps = 2 [json_name = "withSubjectMaps"]; - * @return The withSubjectMaps. - */ - boolean getWithSubjectMaps(); - - /** - * bool with_resource_maps = 3 [json_name = "withResourceMaps"]; - * @return The withResourceMaps. - */ - boolean getWithResourceMaps(); - - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - * @return Whether the withAttribute field is set. - */ - boolean hasWithAttribute(); - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - * @return The withAttribute. - */ - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelector getWithAttribute(); - /** - * .policy.AttributeValueSelector.AttributeSelector with_attribute = 10 [json_name = "withAttribute"]; - */ - io.opentdf.platform.policy.AttributeValueSelector.AttributeSelectorOrBuilder getWithAttributeOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Condition.java b/protocol/src/main/java/io/opentdf/platform/policy/Condition.java deleted file mode 100644 index 52253e37..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/Condition.java +++ /dev/null @@ -1,971 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- **
- *A Condition defines a rule of <subject external field name> <operator> <subject external values>
- *
- *Example:  Subjects with field "division" and a value of "Accounting" or "Marketing":
- *{
- *"subject_external_field": "division",
- *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN",
- *"subject_external_values" : ["Accounting", "Marketing"]
- *}
- *
- *Example: Subjects that are not part of the Fantastic Four:
- *{
- *"subject_external_field": "superhero_name",
- *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN",
- *"subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"]
- *}
- * 
- * - * Protobuf type {@code policy.Condition} - */ -public final class Condition extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.Condition) - ConditionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Condition.newBuilder() to construct. - private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Condition() { - subjectExternalField_ = ""; - operator_ = 0; - subjectExternalValues_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Condition(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Condition.class, io.opentdf.platform.policy.Condition.Builder.class); - } - - public static final int SUBJECT_EXTERNAL_FIELD_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object subjectExternalField_ = ""; - /** - *
-   * externally known field name (such as from idP/LDAP)
-   * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @return The subjectExternalField. - */ - @java.lang.Override - public java.lang.String getSubjectExternalField() { - java.lang.Object ref = subjectExternalField_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subjectExternalField_ = s; - return s; - } - } - /** - *
-   * externally known field name (such as from idP/LDAP)
-   * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @return The bytes for subjectExternalField. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSubjectExternalFieldBytes() { - java.lang.Object ref = subjectExternalField_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subjectExternalField_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OPERATOR_FIELD_NUMBER = 2; - private int operator_ = 0; - /** - *
-   * the evaluation operator of relation
-   * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for operator. - */ - @java.lang.Override public int getOperatorValue() { - return operator_; - } - /** - *
-   * the evaluation operator of relation
-   * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @return The operator. - */ - @java.lang.Override public io.opentdf.platform.policy.SubjectMappingOperatorEnum getOperator() { - io.opentdf.platform.policy.SubjectMappingOperatorEnum result = io.opentdf.platform.policy.SubjectMappingOperatorEnum.forNumber(operator_); - return result == null ? io.opentdf.platform.policy.SubjectMappingOperatorEnum.UNRECOGNIZED : result; - } - - public static final int SUBJECT_EXTERNAL_VALUES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList subjectExternalValues_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * list of comparison values for the subject_external_field, evaluated by the operator
-   * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @return A list containing the subjectExternalValues. - */ - public com.google.protobuf.ProtocolStringList - getSubjectExternalValuesList() { - return subjectExternalValues_; - } - /** - *
-   * list of comparison values for the subject_external_field, evaluated by the operator
-   * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @return The count of subjectExternalValues. - */ - public int getSubjectExternalValuesCount() { - return subjectExternalValues_.size(); - } - /** - *
-   * list of comparison values for the subject_external_field, evaluated by the operator
-   * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param index The index of the element to return. - * @return The subjectExternalValues at the given index. - */ - public java.lang.String getSubjectExternalValues(int index) { - return subjectExternalValues_.get(index); - } - /** - *
-   * list of comparison values for the subject_external_field, evaluated by the operator
-   * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param index The index of the value to return. - * @return The bytes of the subjectExternalValues at the given index. - */ - public com.google.protobuf.ByteString - getSubjectExternalValuesBytes(int index) { - return subjectExternalValues_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectExternalField_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectExternalField_); - } - if (operator_ != io.opentdf.platform.policy.SubjectMappingOperatorEnum.SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(2, operator_); - } - for (int i = 0; i < subjectExternalValues_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subjectExternalValues_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectExternalField_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectExternalField_); - } - if (operator_ != io.opentdf.platform.policy.SubjectMappingOperatorEnum.SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, operator_); - } - { - int dataSize = 0; - for (int i = 0; i < subjectExternalValues_.size(); i++) { - dataSize += computeStringSizeNoTag(subjectExternalValues_.getRaw(i)); - } - size += dataSize; - size += 1 * getSubjectExternalValuesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.Condition)) { - return super.equals(obj); - } - io.opentdf.platform.policy.Condition other = (io.opentdf.platform.policy.Condition) obj; - - if (!getSubjectExternalField() - .equals(other.getSubjectExternalField())) return false; - if (operator_ != other.operator_) return false; - if (!getSubjectExternalValuesList() - .equals(other.getSubjectExternalValuesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SUBJECT_EXTERNAL_FIELD_FIELD_NUMBER; - hash = (53 * hash) + getSubjectExternalField().hashCode(); - hash = (37 * hash) + OPERATOR_FIELD_NUMBER; - hash = (53 * hash) + operator_; - if (getSubjectExternalValuesCount() > 0) { - hash = (37 * hash) + SUBJECT_EXTERNAL_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getSubjectExternalValuesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.Condition parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Condition parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Condition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Condition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Condition parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Condition parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Condition parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Condition parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.Condition parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.Condition parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.Condition parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Condition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.Condition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   **
-   *A Condition defines a rule of <subject external field name> <operator> <subject external values>
-   *
-   *Example:  Subjects with field "division" and a value of "Accounting" or "Marketing":
-   *{
-   *"subject_external_field": "division",
-   *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN",
-   *"subject_external_values" : ["Accounting", "Marketing"]
-   *}
-   *
-   *Example: Subjects that are not part of the Fantastic Four:
-   *{
-   *"subject_external_field": "superhero_name",
-   *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN",
-   *"subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"]
-   *}
-   * 
- * - * Protobuf type {@code policy.Condition} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.Condition) - io.opentdf.platform.policy.ConditionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Condition.class, io.opentdf.platform.policy.Condition.Builder.class); - } - - // Construct using io.opentdf.platform.policy.Condition.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectExternalField_ = ""; - operator_ = 0; - subjectExternalValues_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Condition_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.Condition getDefaultInstanceForType() { - return io.opentdf.platform.policy.Condition.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.Condition build() { - io.opentdf.platform.policy.Condition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.Condition buildPartial() { - io.opentdf.platform.policy.Condition result = new io.opentdf.platform.policy.Condition(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.Condition result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectExternalField_ = subjectExternalField_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.operator_ = operator_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - subjectExternalValues_.makeImmutable(); - result.subjectExternalValues_ = subjectExternalValues_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.Condition) { - return mergeFrom((io.opentdf.platform.policy.Condition)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.Condition other) { - if (other == io.opentdf.platform.policy.Condition.getDefaultInstance()) return this; - if (!other.getSubjectExternalField().isEmpty()) { - subjectExternalField_ = other.subjectExternalField_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.operator_ != 0) { - setOperatorValue(other.getOperatorValue()); - } - if (!other.subjectExternalValues_.isEmpty()) { - if (subjectExternalValues_.isEmpty()) { - subjectExternalValues_ = other.subjectExternalValues_; - bitField0_ |= 0x00000004; - } else { - ensureSubjectExternalValuesIsMutable(); - subjectExternalValues_.addAll(other.subjectExternalValues_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - subjectExternalField_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - operator_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureSubjectExternalValuesIsMutable(); - subjectExternalValues_.add(s); - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object subjectExternalField_ = ""; - /** - *
-     * externally known field name (such as from idP/LDAP)
-     * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @return The subjectExternalField. - */ - public java.lang.String getSubjectExternalField() { - java.lang.Object ref = subjectExternalField_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subjectExternalField_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * externally known field name (such as from idP/LDAP)
-     * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @return The bytes for subjectExternalField. - */ - public com.google.protobuf.ByteString - getSubjectExternalFieldBytes() { - java.lang.Object ref = subjectExternalField_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subjectExternalField_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * externally known field name (such as from idP/LDAP)
-     * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @param value The subjectExternalField to set. - * @return This builder for chaining. - */ - public Builder setSubjectExternalField( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - subjectExternalField_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * externally known field name (such as from idP/LDAP)
-     * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @return This builder for chaining. - */ - public Builder clearSubjectExternalField() { - subjectExternalField_ = getDefaultInstance().getSubjectExternalField(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * externally known field name (such as from idP/LDAP)
-     * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @param value The bytes for subjectExternalField to set. - * @return This builder for chaining. - */ - public Builder setSubjectExternalFieldBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - subjectExternalField_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int operator_ = 0; - /** - *
-     * the evaluation operator of relation
-     * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for operator. - */ - @java.lang.Override public int getOperatorValue() { - return operator_; - } - /** - *
-     * the evaluation operator of relation
-     * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for operator to set. - * @return This builder for chaining. - */ - public Builder setOperatorValue(int value) { - operator_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * the evaluation operator of relation
-     * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @return The operator. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOperatorEnum getOperator() { - io.opentdf.platform.policy.SubjectMappingOperatorEnum result = io.opentdf.platform.policy.SubjectMappingOperatorEnum.forNumber(operator_); - return result == null ? io.opentdf.platform.policy.SubjectMappingOperatorEnum.UNRECOGNIZED : result; - } - /** - *
-     * the evaluation operator of relation
-     * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @param value The operator to set. - * @return This builder for chaining. - */ - public Builder setOperator(io.opentdf.platform.policy.SubjectMappingOperatorEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - operator_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * the evaluation operator of relation
-     * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearOperator() { - bitField0_ = (bitField0_ & ~0x00000002); - operator_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList subjectExternalValues_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureSubjectExternalValuesIsMutable() { - if (!subjectExternalValues_.isModifiable()) { - subjectExternalValues_ = new com.google.protobuf.LazyStringArrayList(subjectExternalValues_); - } - bitField0_ |= 0x00000004; - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @return A list containing the subjectExternalValues. - */ - public com.google.protobuf.ProtocolStringList - getSubjectExternalValuesList() { - subjectExternalValues_.makeImmutable(); - return subjectExternalValues_; - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @return The count of subjectExternalValues. - */ - public int getSubjectExternalValuesCount() { - return subjectExternalValues_.size(); - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param index The index of the element to return. - * @return The subjectExternalValues at the given index. - */ - public java.lang.String getSubjectExternalValues(int index) { - return subjectExternalValues_.get(index); - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param index The index of the value to return. - * @return The bytes of the subjectExternalValues at the given index. - */ - public com.google.protobuf.ByteString - getSubjectExternalValuesBytes(int index) { - return subjectExternalValues_.getByteString(index); - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param index The index to set the value at. - * @param value The subjectExternalValues to set. - * @return This builder for chaining. - */ - public Builder setSubjectExternalValues( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureSubjectExternalValuesIsMutable(); - subjectExternalValues_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param value The subjectExternalValues to add. - * @return This builder for chaining. - */ - public Builder addSubjectExternalValues( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureSubjectExternalValuesIsMutable(); - subjectExternalValues_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param values The subjectExternalValues to add. - * @return This builder for chaining. - */ - public Builder addAllSubjectExternalValues( - java.lang.Iterable values) { - ensureSubjectExternalValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectExternalValues_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @return This builder for chaining. - */ - public Builder clearSubjectExternalValues() { - subjectExternalValues_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004);; - onChanged(); - return this; - } - /** - *
-     * list of comparison values for the subject_external_field, evaluated by the operator
-     * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param value The bytes of the subjectExternalValues to add. - * @return This builder for chaining. - */ - public Builder addSubjectExternalValuesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureSubjectExternalValuesIsMutable(); - subjectExternalValues_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.Condition) - } - - // @@protoc_insertion_point(class_scope:policy.Condition) - private static final io.opentdf.platform.policy.Condition DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.Condition(); - } - - public static io.opentdf.platform.policy.Condition getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Condition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.Condition getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ConditionBooleanTypeEnum.java b/protocol/src/main/java/io/opentdf/platform/policy/ConditionBooleanTypeEnum.java deleted file mode 100644 index 05bc8c3c..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ConditionBooleanTypeEnum.java +++ /dev/null @@ -1,127 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package
- * 
- * - * Protobuf enum {@code policy.ConditionBooleanTypeEnum} - */ -public enum ConditionBooleanTypeEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0; - */ - CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED(0), - /** - * CONDITION_BOOLEAN_TYPE_ENUM_AND = 1; - */ - CONDITION_BOOLEAN_TYPE_ENUM_AND(1), - /** - * CONDITION_BOOLEAN_TYPE_ENUM_OR = 2; - */ - CONDITION_BOOLEAN_TYPE_ENUM_OR(2), - UNRECOGNIZED(-1), - ; - - /** - * CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED = 0; - */ - public static final int CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED_VALUE = 0; - /** - * CONDITION_BOOLEAN_TYPE_ENUM_AND = 1; - */ - public static final int CONDITION_BOOLEAN_TYPE_ENUM_AND_VALUE = 1; - /** - * CONDITION_BOOLEAN_TYPE_ENUM_OR = 2; - */ - public static final int CONDITION_BOOLEAN_TYPE_ENUM_OR_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConditionBooleanTypeEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ConditionBooleanTypeEnum forNumber(int value) { - switch (value) { - case 0: return CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED; - case 1: return CONDITION_BOOLEAN_TYPE_ENUM_AND; - case 2: return CONDITION_BOOLEAN_TYPE_ENUM_OR; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ConditionBooleanTypeEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ConditionBooleanTypeEnum findValueByNumber(int number) { - return ConditionBooleanTypeEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.getDescriptor().getEnumTypes().get(2); - } - - private static final ConditionBooleanTypeEnum[] VALUES = values(); - - public static ConditionBooleanTypeEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ConditionBooleanTypeEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:policy.ConditionBooleanTypeEnum) -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroup.java b/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroup.java deleted file mode 100644 index 22510d3b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroup.java +++ /dev/null @@ -1,890 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- * A collection of Conditions evaluated by the boolean_operator provided
- * 
- * - * Protobuf type {@code policy.ConditionGroup} - */ -public final class ConditionGroup extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.ConditionGroup) - ConditionGroupOrBuilder { -private static final long serialVersionUID = 0L; - // Use ConditionGroup.newBuilder() to construct. - private ConditionGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConditionGroup() { - conditions_ = java.util.Collections.emptyList(); - booleanOperator_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConditionGroup(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.ConditionGroup.class, io.opentdf.platform.policy.ConditionGroup.Builder.class); - } - - public static final int CONDITIONS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List conditions_; - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getConditionsList() { - return conditions_; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getConditionsOrBuilderList() { - return conditions_; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getConditionsCount() { - return conditions_.size(); - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.Condition getConditions(int index) { - return conditions_.get(index); - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.ConditionOrBuilder getConditionsOrBuilder( - int index) { - return conditions_.get(index); - } - - public static final int BOOLEAN_OPERATOR_FIELD_NUMBER = 2; - private int booleanOperator_ = 0; - /** - *
-   * the boolean evaluation type across the conditions
-   * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for booleanOperator. - */ - @java.lang.Override public int getBooleanOperatorValue() { - return booleanOperator_; - } - /** - *
-   * the boolean evaluation type across the conditions
-   * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @return The booleanOperator. - */ - @java.lang.Override public io.opentdf.platform.policy.ConditionBooleanTypeEnum getBooleanOperator() { - io.opentdf.platform.policy.ConditionBooleanTypeEnum result = io.opentdf.platform.policy.ConditionBooleanTypeEnum.forNumber(booleanOperator_); - return result == null ? io.opentdf.platform.policy.ConditionBooleanTypeEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < conditions_.size(); i++) { - output.writeMessage(1, conditions_.get(i)); - } - if (booleanOperator_ != io.opentdf.platform.policy.ConditionBooleanTypeEnum.CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(2, booleanOperator_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < conditions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, conditions_.get(i)); - } - if (booleanOperator_ != io.opentdf.platform.policy.ConditionBooleanTypeEnum.CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, booleanOperator_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.ConditionGroup)) { - return super.equals(obj); - } - io.opentdf.platform.policy.ConditionGroup other = (io.opentdf.platform.policy.ConditionGroup) obj; - - if (!getConditionsList() - .equals(other.getConditionsList())) return false; - if (booleanOperator_ != other.booleanOperator_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConditionsCount() > 0) { - hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; - hash = (53 * hash) + getConditionsList().hashCode(); - } - hash = (37 * hash) + BOOLEAN_OPERATOR_FIELD_NUMBER; - hash = (53 * hash) + booleanOperator_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.ConditionGroup parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.ConditionGroup parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.ConditionGroup parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.ConditionGroup parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.ConditionGroup prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A collection of Conditions evaluated by the boolean_operator provided
-   * 
- * - * Protobuf type {@code policy.ConditionGroup} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.ConditionGroup) - io.opentdf.platform.policy.ConditionGroupOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.ConditionGroup.class, io.opentdf.platform.policy.ConditionGroup.Builder.class); - } - - // Construct using io.opentdf.platform.policy.ConditionGroup.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (conditionsBuilder_ == null) { - conditions_ = java.util.Collections.emptyList(); - } else { - conditions_ = null; - conditionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - booleanOperator_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ConditionGroup_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.ConditionGroup getDefaultInstanceForType() { - return io.opentdf.platform.policy.ConditionGroup.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.ConditionGroup build() { - io.opentdf.platform.policy.ConditionGroup result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.ConditionGroup buildPartial() { - io.opentdf.platform.policy.ConditionGroup result = new io.opentdf.platform.policy.ConditionGroup(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.ConditionGroup result) { - if (conditionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - conditions_ = java.util.Collections.unmodifiableList(conditions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.conditions_ = conditions_; - } else { - result.conditions_ = conditionsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.ConditionGroup result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.booleanOperator_ = booleanOperator_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.ConditionGroup) { - return mergeFrom((io.opentdf.platform.policy.ConditionGroup)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.ConditionGroup other) { - if (other == io.opentdf.platform.policy.ConditionGroup.getDefaultInstance()) return this; - if (conditionsBuilder_ == null) { - if (!other.conditions_.isEmpty()) { - if (conditions_.isEmpty()) { - conditions_ = other.conditions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConditionsIsMutable(); - conditions_.addAll(other.conditions_); - } - onChanged(); - } - } else { - if (!other.conditions_.isEmpty()) { - if (conditionsBuilder_.isEmpty()) { - conditionsBuilder_.dispose(); - conditionsBuilder_ = null; - conditions_ = other.conditions_; - bitField0_ = (bitField0_ & ~0x00000001); - conditionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConditionsFieldBuilder() : null; - } else { - conditionsBuilder_.addAllMessages(other.conditions_); - } - } - } - if (other.booleanOperator_ != 0) { - setBooleanOperatorValue(other.getBooleanOperatorValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.Condition m = - input.readMessage( - io.opentdf.platform.policy.Condition.parser(), - extensionRegistry); - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.add(m); - } else { - conditionsBuilder_.addMessage(m); - } - break; - } // case 10 - case 16: { - booleanOperator_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List conditions_ = - java.util.Collections.emptyList(); - private void ensureConditionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - conditions_ = new java.util.ArrayList(conditions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Condition, io.opentdf.platform.policy.Condition.Builder, io.opentdf.platform.policy.ConditionOrBuilder> conditionsBuilder_; - - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public java.util.List getConditionsList() { - if (conditionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(conditions_); - } else { - return conditionsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public int getConditionsCount() { - if (conditionsBuilder_ == null) { - return conditions_.size(); - } else { - return conditionsBuilder_.getCount(); - } - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Condition getConditions(int index) { - if (conditionsBuilder_ == null) { - return conditions_.get(index); - } else { - return conditionsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder setConditions( - int index, io.opentdf.platform.policy.Condition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.set(index, value); - onChanged(); - } else { - conditionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder setConditions( - int index, io.opentdf.platform.policy.Condition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.set(index, builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder addConditions(io.opentdf.platform.policy.Condition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.add(value); - onChanged(); - } else { - conditionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder addConditions( - int index, io.opentdf.platform.policy.Condition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.add(index, value); - onChanged(); - } else { - conditionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder addConditions( - io.opentdf.platform.policy.Condition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.add(builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder addConditions( - int index, io.opentdf.platform.policy.Condition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.add(index, builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder addAllConditions( - java.lang.Iterable values) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, conditions_); - onChanged(); - } else { - conditionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder clearConditions() { - if (conditionsBuilder_ == null) { - conditions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - conditionsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public Builder removeConditions(int index) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.remove(index); - onChanged(); - } else { - conditionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Condition.Builder getConditionsBuilder( - int index) { - return getConditionsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.ConditionOrBuilder getConditionsOrBuilder( - int index) { - if (conditionsBuilder_ == null) { - return conditions_.get(index); } else { - return conditionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public java.util.List - getConditionsOrBuilderList() { - if (conditionsBuilder_ != null) { - return conditionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(conditions_); - } - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Condition.Builder addConditionsBuilder() { - return getConditionsFieldBuilder().addBuilder( - io.opentdf.platform.policy.Condition.getDefaultInstance()); - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Condition.Builder addConditionsBuilder( - int index) { - return getConditionsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Condition.getDefaultInstance()); - } - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - public java.util.List - getConditionsBuilderList() { - return getConditionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Condition, io.opentdf.platform.policy.Condition.Builder, io.opentdf.platform.policy.ConditionOrBuilder> - getConditionsFieldBuilder() { - if (conditionsBuilder_ == null) { - conditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Condition, io.opentdf.platform.policy.Condition.Builder, io.opentdf.platform.policy.ConditionOrBuilder>( - conditions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - conditions_ = null; - } - return conditionsBuilder_; - } - - private int booleanOperator_ = 0; - /** - *
-     * the boolean evaluation type across the conditions
-     * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for booleanOperator. - */ - @java.lang.Override public int getBooleanOperatorValue() { - return booleanOperator_; - } - /** - *
-     * the boolean evaluation type across the conditions
-     * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for booleanOperator to set. - * @return This builder for chaining. - */ - public Builder setBooleanOperatorValue(int value) { - booleanOperator_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * the boolean evaluation type across the conditions
-     * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @return The booleanOperator. - */ - @java.lang.Override - public io.opentdf.platform.policy.ConditionBooleanTypeEnum getBooleanOperator() { - io.opentdf.platform.policy.ConditionBooleanTypeEnum result = io.opentdf.platform.policy.ConditionBooleanTypeEnum.forNumber(booleanOperator_); - return result == null ? io.opentdf.platform.policy.ConditionBooleanTypeEnum.UNRECOGNIZED : result; - } - /** - *
-     * the boolean evaluation type across the conditions
-     * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @param value The booleanOperator to set. - * @return This builder for chaining. - */ - public Builder setBooleanOperator(io.opentdf.platform.policy.ConditionBooleanTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - booleanOperator_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * the boolean evaluation type across the conditions
-     * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearBooleanOperator() { - bitField0_ = (bitField0_ & ~0x00000002); - booleanOperator_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.ConditionGroup) - } - - // @@protoc_insertion_point(class_scope:policy.ConditionGroup) - private static final io.opentdf.platform.policy.ConditionGroup DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.ConditionGroup(); - } - - public static io.opentdf.platform.policy.ConditionGroup getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConditionGroup parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.ConditionGroup getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroupOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroupOrBuilder.java deleted file mode 100644 index 97dd8fbe..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ConditionGroupOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface ConditionGroupOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.ConditionGroup) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - java.util.List - getConditionsList(); - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.Condition getConditions(int index); - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - int getConditionsCount(); - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - java.util.List - getConditionsOrBuilderList(); - /** - * repeated .policy.Condition conditions = 1 [json_name = "conditions", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.ConditionOrBuilder getConditionsOrBuilder( - int index); - - /** - *
-   * the boolean evaluation type across the conditions
-   * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for booleanOperator. - */ - int getBooleanOperatorValue(); - /** - *
-   * the boolean evaluation type across the conditions
-   * 
- * - * .policy.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } - * @return The booleanOperator. - */ - io.opentdf.platform.policy.ConditionBooleanTypeEnum getBooleanOperator(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ConditionOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ConditionOrBuilder.java deleted file mode 100644 index 1a5d6930..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ConditionOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface ConditionOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.Condition) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * externally known field name (such as from idP/LDAP)
-   * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @return The subjectExternalField. - */ - java.lang.String getSubjectExternalField(); - /** - *
-   * externally known field name (such as from idP/LDAP)
-   * 
- * - * string subject_external_field = 1 [json_name = "subjectExternalField"]; - * @return The bytes for subjectExternalField. - */ - com.google.protobuf.ByteString - getSubjectExternalFieldBytes(); - - /** - *
-   * the evaluation operator of relation
-   * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for operator. - */ - int getOperatorValue(); - /** - *
-   * the evaluation operator of relation
-   * 
- * - * .policy.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } - * @return The operator. - */ - io.opentdf.platform.policy.SubjectMappingOperatorEnum getOperator(); - - /** - *
-   * list of comparison values for the subject_external_field, evaluated by the operator
-   * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @return A list containing the subjectExternalValues. - */ - java.util.List - getSubjectExternalValuesList(); - /** - *
-   * list of comparison values for the subject_external_field, evaluated by the operator
-   * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @return The count of subjectExternalValues. - */ - int getSubjectExternalValuesCount(); - /** - *
-   * list of comparison values for the subject_external_field, evaluated by the operator
-   * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param index The index of the element to return. - * @return The subjectExternalValues at the given index. - */ - java.lang.String getSubjectExternalValues(int index); - /** - *
-   * list of comparison values for the subject_external_field, evaluated by the operator
-   * 
- * - * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; - * @param index The index of the value to return. - * @return The bytes of the subjectExternalValues at the given index. - */ - com.google.protobuf.ByteString - getSubjectExternalValuesBytes(int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Namespace.java b/protocol/src/main/java/io/opentdf/platform/policy/Namespace.java deleted file mode 100644 index 0521586c..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/Namespace.java +++ /dev/null @@ -1,1296 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - * Protobuf type {@code policy.Namespace} - */ -public final class Namespace extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.Namespace) - NamespaceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Namespace.newBuilder() to construct. - private Namespace(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Namespace() { - id_ = ""; - name_ = ""; - fqn_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Namespace(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Namespace.class, io.opentdf.platform.policy.Namespace.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * generated uuid in database
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * generated uuid in database
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-   * 
- * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-   * 
- * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FQN_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object fqn_ = ""; - /** - * string fqn = 3 [json_name = "fqn"]; - * @return The fqn. - */ - @java.lang.Override - public java.lang.String getFqn() { - java.lang.Object ref = fqn_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fqn_ = s; - return s; - } - } - /** - * string fqn = 3 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFqnBytes() { - java.lang.Object ref = fqn_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fqn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTIVE_FIELD_NUMBER = 4; - private com.google.protobuf.BoolValue active_; - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - * @return Whether the active field is set. - */ - @java.lang.Override - public boolean hasActive() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - * @return The active. - */ - @java.lang.Override - public com.google.protobuf.BoolValue getActive() { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - @java.lang.Override - public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - - public static final int METADATA_FIELD_NUMBER = 5; - private io.opentdf.platform.common.Metadata metadata_; - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.Metadata getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fqn_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getActive()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(5, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, fqn_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getActive()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.Namespace)) { - return super.equals(obj); - } - io.opentdf.platform.policy.Namespace other = (io.opentdf.platform.policy.Namespace) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getFqn() - .equals(other.getFqn())) return false; - if (hasActive() != other.hasActive()) return false; - if (hasActive()) { - if (!getActive() - .equals(other.getActive())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + FQN_FIELD_NUMBER; - hash = (53 * hash) + getFqn().hashCode(); - if (hasActive()) { - hash = (37 * hash) + ACTIVE_FIELD_NUMBER; - hash = (53 * hash) + getActive().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.Namespace parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Namespace parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Namespace parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Namespace parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Namespace parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Namespace parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Namespace parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Namespace parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.Namespace parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.Namespace parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.Namespace parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Namespace parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.Namespace prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.Namespace} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.Namespace) - io.opentdf.platform.policy.NamespaceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Namespace.class, io.opentdf.platform.policy.Namespace.Builder.class); - } - - // Construct using io.opentdf.platform.policy.Namespace.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getActiveFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - name_ = ""; - fqn_ = ""; - active_ = null; - if (activeBuilder_ != null) { - activeBuilder_.dispose(); - activeBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Namespace_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.Namespace getDefaultInstanceForType() { - return io.opentdf.platform.policy.Namespace.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.Namespace build() { - io.opentdf.platform.policy.Namespace result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.Namespace buildPartial() { - io.opentdf.platform.policy.Namespace result = new io.opentdf.platform.policy.Namespace(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.Namespace result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.fqn_ = fqn_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.active_ = activeBuilder_ == null - ? active_ - : activeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.Namespace) { - return mergeFrom((io.opentdf.platform.policy.Namespace)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.Namespace other) { - if (other == io.opentdf.platform.policy.Namespace.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getFqn().isEmpty()) { - fqn_ = other.fqn_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasActive()) { - mergeActive(other.getActive()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - fqn_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getActiveFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-     * 
- * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-     * 
- * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-     * 
- * - * string name = 2 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-     * 
- * - * string name = 2 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-     * 
- * - * string name = 2 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object fqn_ = ""; - /** - * string fqn = 3 [json_name = "fqn"]; - * @return The fqn. - */ - public java.lang.String getFqn() { - java.lang.Object ref = fqn_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fqn_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string fqn = 3 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - public com.google.protobuf.ByteString - getFqnBytes() { - java.lang.Object ref = fqn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fqn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string fqn = 3 [json_name = "fqn"]; - * @param value The fqn to set. - * @return This builder for chaining. - */ - public Builder setFqn( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fqn_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * string fqn = 3 [json_name = "fqn"]; - * @return This builder for chaining. - */ - public Builder clearFqn() { - fqn_ = getDefaultInstance().getFqn(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * string fqn = 3 [json_name = "fqn"]; - * @param value The bytes for fqn to set. - * @return This builder for chaining. - */ - public Builder setFqnBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fqn_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue active_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> activeBuilder_; - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - * @return Whether the active field is set. - */ - public boolean hasActive() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - * @return The active. - */ - public com.google.protobuf.BoolValue getActive() { - if (activeBuilder_ == null) { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } else { - return activeBuilder_.getMessage(); - } - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - public Builder setActive(com.google.protobuf.BoolValue value) { - if (activeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - active_ = value; - } else { - activeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - public Builder setActive( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (activeBuilder_ == null) { - active_ = builderForValue.build(); - } else { - activeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - public Builder mergeActive(com.google.protobuf.BoolValue value) { - if (activeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - active_ != null && - active_ != com.google.protobuf.BoolValue.getDefaultInstance()) { - getActiveBuilder().mergeFrom(value); - } else { - active_ = value; - } - } else { - activeBuilder_.mergeFrom(value); - } - if (active_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - public Builder clearActive() { - bitField0_ = (bitField0_ & ~0x00000008); - active_ = null; - if (activeBuilder_ != null) { - activeBuilder_.dispose(); - activeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - public com.google.protobuf.BoolValue.Builder getActiveBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getActiveFieldBuilder().getBuilder(); - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { - if (activeBuilder_ != null) { - return activeBuilder_.getMessageOrBuilder(); - } else { - return active_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getActiveFieldBuilder() { - if (activeBuilder_ == null) { - activeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getActive(), - getParentForChildren(), - isClean()); - active_ = null; - } - return activeBuilder_; - } - - private io.opentdf.platform.common.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000010); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - } - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.Namespace) - } - - // @@protoc_insertion_point(class_scope:policy.Namespace) - private static final io.opentdf.platform.policy.Namespace DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.Namespace(); - } - - public static io.opentdf.platform.policy.Namespace getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Namespace parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.Namespace getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/NamespaceOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/NamespaceOrBuilder.java deleted file mode 100644 index bbee0b34..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/NamespaceOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface NamespaceOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.Namespace) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * generated uuid in database
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * generated uuid in database
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-   * 
- * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * used to partition Attribute Definitions, support by namespace AuthN and enable federation
-   * 
- * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * string fqn = 3 [json_name = "fqn"]; - * @return The fqn. - */ - java.lang.String getFqn(); - /** - * string fqn = 3 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - com.google.protobuf.ByteString - getFqnBytes(); - - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - * @return Whether the active field is set. - */ - boolean hasActive(); - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - * @return The active. - */ - com.google.protobuf.BoolValue getActive(); - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 4 [json_name = "active"]; - */ - com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder(); - - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - * .common.Metadata metadata = 5 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ObjectsProto.java b/protocol/src/main/java/io/opentdf/platform/policy/ObjectsProto.java deleted file mode 100644 index ea90d865..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ObjectsProto.java +++ /dev/null @@ -1,245 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public final class ObjectsProto { - private ObjectsProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_Namespace_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_Namespace_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_Attribute_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_Attribute_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_Value_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_Value_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_Action_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_Action_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_SubjectMapping_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_SubjectMapping_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_Condition_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_Condition_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_ConditionGroup_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_ConditionGroup_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_SubjectSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_SubjectSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_SubjectConditionSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_SubjectConditionSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_SubjectProperty_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_SubjectProperty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_ResourceMapping_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_ResourceMapping_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\024policy/objects.proto\022\006policy\032\033buf/vali" + - "date/validate.proto\032\023common/common.proto" + - "\032\036google/protobuf/wrappers.proto\032,kasreg" + - "istry/key_access_server_registry.proto\"\243" + - "\001\n\tNamespace\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004name\030\002 \001" + - "(\tR\004name\022\020\n\003fqn\030\003 \001(\tR\003fqn\0222\n\006active\030\004 \001" + - "(\0132\032.google.protobuf.BoolValueR\006active\022," + - "\n\010metadata\030\005 \001(\0132\020.common.MetadataR\010meta" + - "data\"\361\002\n\tAttribute\022\016\n\002id\030\001 \001(\tR\002id\022/\n\tna" + - "mespace\030\002 \001(\0132\021.policy.NamespaceR\tnamesp" + - "ace\022\022\n\004name\030\003 \001(\tR\004name\022>\n\004rule\030\004 \001(\0162\035." + - "policy.AttributeRuleTypeEnumB\013\272H\010\202\001\002\020\001\310\001" + - "\001R\004rule\022%\n\006values\030\005 \003(\0132\r.policy.ValueR\006" + - "values\0224\n\006grants\030\006 \003(\0132\034.kasregistry.Key" + - "AccessServerR\006grants\022\020\n\003fqn\030\007 \001(\tR\003fqn\0222" + - "\n\006active\030\010 \001(\0132\032.google.protobuf.BoolVal" + - "ueR\006active\022,\n\010metadata\030d \001(\0132\020.common.Me" + - "tadataR\010metadata\"\364\002\n\005Value\022\016\n\002id\030\001 \001(\tR\002" + - "id\022/\n\tattribute\030\002 \001(\0132\021.policy.Attribute" + - "R\tattribute\022\024\n\005value\030\003 \001(\tR\005value\022\'\n\007mem" + - "bers\030\004 \003(\0132\r.policy.ValueR\007members\0224\n\006gr" + - "ants\030\005 \003(\0132\034.kasregistry.KeyAccessServer" + - "R\006grants\022\020\n\003fqn\030\006 \001(\tR\003fqn\0222\n\006active\030\007 \001" + - "(\0132\032.google.protobuf.BoolValueR\006active\022A" + - "\n\020subject_mappings\030\010 \003(\0132\026.policy.Subjec" + - "tMappingR\017subjectMappings\022,\n\010metadata\030d " + - "\001(\0132\020.common.MetadataR\010metadata\"\326\001\n\006Acti" + - "on\022;\n\010standard\030\001 \001(\0162\035.policy.Action.Sta" + - "ndardActionH\000R\010standard\022\030\n\006custom\030\002 \001(\tH" + - "\000R\006custom\"l\n\016StandardAction\022\037\n\033STANDARD_" + - "ACTION_UNSPECIFIED\020\000\022\033\n\027STANDARD_ACTION_" + - "DECRYPT\020\001\022\034\n\030STANDARD_ACTION_TRANSMIT\020\002B" + - "\007\n\005value\"\201\002\n\016SubjectMapping\022\016\n\002id\030\001 \001(\tR" + - "\002id\0226\n\017attribute_value\030\002 \001(\0132\r.policy.Va" + - "lueR\016attributeValue\022O\n\025subject_condition" + - "_set\030\003 \001(\0132\033.policy.SubjectConditionSetR" + - "\023subjectConditionSet\022(\n\007actions\030\004 \003(\0132\016." + - "policy.ActionR\007actions\022,\n\010metadata\030d \001(\013" + - "2\020.common.MetadataR\010metadata\"\306\001\n\tConditi" + - "on\0224\n\026subject_external_field\030\001 \001(\tR\024subj" + - "ectExternalField\022K\n\010operator\030\002 \001(\0162\".pol" + - "icy.SubjectMappingOperatorEnumB\013\272H\010\202\001\002\020\001" + - "\310\001\001R\010operator\0226\n\027subject_external_values" + - "\030\003 \003(\tR\025subjectExternalValues\"\247\001\n\016Condit" + - "ionGroup\022;\n\nconditions\030\001 \003(\0132\021.policy.Co" + - "nditionB\010\272H\005\222\001\002\010\001R\nconditions\022X\n\020boolean" + - "_operator\030\002 \001(\0162 .policy.ConditionBoolea" + - "nTypeEnumB\013\272H\010\202\001\002\020\001\310\001\001R\017booleanOperator\"" + - "Y\n\nSubjectSet\022K\n\020condition_groups\030\001 \003(\0132" + - "\026.policy.ConditionGroupB\010\272H\005\222\001\002\010\001R\017condi" + - "tionGroups\"\224\001\n\023SubjectConditionSet\022\016\n\002id" + - "\030\001 \001(\tR\002id\022?\n\014subject_sets\030\003 \003(\0132\022.polic" + - "y.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\022,\n\010m" + - "etadata\030d \001(\0132\020.common.MetadataR\010metadat" + - "a\"o\n\017SubjectProperty\022-\n\016external_field\030\001" + - " \001(\tB\006\272H\003\310\001\001R\rexternalField\022-\n\016external_" + - "value\030\002 \001(\tB\006\272H\003\310\001\001R\rexternalValue\"\245\001\n\017R" + - "esourceMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010metada" + - "ta\030\002 \001(\0132\020.common.MetadataR\010metadata\022>\n\017" + - "attribute_value\030\003 \001(\0132\r.policy.ValueB\006\272H" + - "\003\310\001\001R\016attributeValue\022\024\n\005terms\030\004 \003(\tR\005ter" + - "ms*\263\001\n\025AttributeRuleTypeEnum\022(\n$ATTRIBUT" + - "E_RULE_TYPE_ENUM_UNSPECIFIED\020\000\022#\n\037ATTRIB" + - "UTE_RULE_TYPE_ENUM_ALL_OF\020\001\022#\n\037ATTRIBUTE" + - "_RULE_TYPE_ENUM_ANY_OF\020\002\022&\n\"ATTRIBUTE_RU" + - "LE_TYPE_ENUM_HIERARCHY\020\003*\233\001\n\032SubjectMapp" + - "ingOperatorEnum\022-\n)SUBJECT_MAPPING_OPERA" + - "TOR_ENUM_UNSPECIFIED\020\000\022$\n SUBJECT_MAPPIN" + - "G_OPERATOR_ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_" + - "OPERATOR_ENUM_NOT_IN\020\002*\220\001\n\030ConditionBool" + - "eanTypeEnum\022+\n\'CONDITION_BOOLEAN_TYPE_EN" + - "UM_UNSPECIFIED\020\000\022#\n\037CONDITION_BOOLEAN_TY" + - "PE_ENUM_AND\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_" + - "ENUM_OR\020\002Bb\n\032io.opentdf.platform.policyB" + - "\014ObjectsProtoP\001\242\002\003PXX\252\002\006Policy\312\002\006Policy\342" + - "\002\022Policy\\GPBMetadata\352\002\006Policyb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - io.opentdf.platform.common.CommonProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.getDescriptor(), - }); - internal_static_policy_Namespace_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_Namespace_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_Namespace_descriptor, - new java.lang.String[] { "Id", "Name", "Fqn", "Active", "Metadata", }); - internal_static_policy_Attribute_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_policy_Attribute_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_Attribute_descriptor, - new java.lang.String[] { "Id", "Namespace", "Name", "Rule", "Values", "Grants", "Fqn", "Active", "Metadata", }); - internal_static_policy_Value_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_policy_Value_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_Value_descriptor, - new java.lang.String[] { "Id", "Attribute", "Value", "Members", "Grants", "Fqn", "Active", "SubjectMappings", "Metadata", }); - internal_static_policy_Action_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_policy_Action_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_Action_descriptor, - new java.lang.String[] { "Standard", "Custom", "Value", }); - internal_static_policy_SubjectMapping_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_policy_SubjectMapping_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_SubjectMapping_descriptor, - new java.lang.String[] { "Id", "AttributeValue", "SubjectConditionSet", "Actions", "Metadata", }); - internal_static_policy_Condition_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_policy_Condition_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_Condition_descriptor, - new java.lang.String[] { "SubjectExternalField", "Operator", "SubjectExternalValues", }); - internal_static_policy_ConditionGroup_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_policy_ConditionGroup_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_ConditionGroup_descriptor, - new java.lang.String[] { "Conditions", "BooleanOperator", }); - internal_static_policy_SubjectSet_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_policy_SubjectSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_SubjectSet_descriptor, - new java.lang.String[] { "ConditionGroups", }); - internal_static_policy_SubjectConditionSet_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_policy_SubjectConditionSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_SubjectConditionSet_descriptor, - new java.lang.String[] { "Id", "SubjectSets", "Metadata", }); - internal_static_policy_SubjectProperty_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_policy_SubjectProperty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_SubjectProperty_descriptor, - new java.lang.String[] { "ExternalField", "ExternalValue", }); - internal_static_policy_ResourceMapping_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_policy_ResourceMapping_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_ResourceMapping_descriptor, - new java.lang.String[] { "Id", "Metadata", "AttributeValue", "Terms", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - build.buf.validate.ValidateProto.getDescriptor(); - io.opentdf.platform.common.CommonProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - io.opentdf.platform.kasregistry.KeyAccessServerRegistryProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ResourceMapping.java b/protocol/src/main/java/io/opentdf/platform/policy/ResourceMapping.java deleted file mode 100644 index 24f0abfb..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ResourceMapping.java +++ /dev/null @@ -1,1119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- *
- *Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values
- * 
- * - * Protobuf type {@code policy.ResourceMapping} - */ -public final class ResourceMapping extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.ResourceMapping) - ResourceMappingOrBuilder { -private static final long serialVersionUID = 0L; - // Use ResourceMapping.newBuilder() to construct. - private ResourceMapping(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ResourceMapping() { - id_ = ""; - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ResourceMapping(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.ResourceMapping.class, io.opentdf.platform.policy.ResourceMapping.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_FIELD_NUMBER = 2; - private io.opentdf.platform.common.Metadata metadata_; - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.Metadata getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - - public static final int ATTRIBUTE_VALUE_FIELD_NUMBER = 3; - private io.opentdf.platform.policy.Value attributeValue_; - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - * @return Whether the attributeValue field is set. - */ - @java.lang.Override - public boolean hasAttributeValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - * @return The attributeValue. - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getAttributeValue() { - return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder() { - return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; - } - - public static final int TERMS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string terms = 4 [json_name = "terms"]; - * @return A list containing the terms. - */ - public com.google.protobuf.ProtocolStringList - getTermsList() { - return terms_; - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @return The count of terms. - */ - public int getTermsCount() { - return terms_.size(); - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param index The index of the element to return. - * @return The terms at the given index. - */ - public java.lang.String getTerms(int index) { - return terms_.get(index); - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - public com.google.protobuf.ByteString - getTermsBytes(int index) { - return terms_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getMetadata()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getAttributeValue()); - } - for (int i = 0; i < terms_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, terms_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMetadata()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAttributeValue()); - } - { - int dataSize = 0; - for (int i = 0; i < terms_.size(); i++) { - dataSize += computeStringSizeNoTag(terms_.getRaw(i)); - } - size += dataSize; - size += 1 * getTermsList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.ResourceMapping)) { - return super.equals(obj); - } - io.opentdf.platform.policy.ResourceMapping other = (io.opentdf.platform.policy.ResourceMapping) obj; - - if (!getId() - .equals(other.getId())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (hasAttributeValue() != other.hasAttributeValue()) return false; - if (hasAttributeValue()) { - if (!getAttributeValue() - .equals(other.getAttributeValue())) return false; - } - if (!getTermsList() - .equals(other.getTermsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (hasAttributeValue()) { - hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getAttributeValue().hashCode(); - } - if (getTermsCount() > 0) { - hash = (37 * hash) + TERMS_FIELD_NUMBER; - hash = (53 * hash) + getTermsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.ResourceMapping parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.ResourceMapping parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.ResourceMapping parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.ResourceMapping parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.ResourceMapping prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *Resource Mappings (aka Access Control Resource Encodings aka ACRE) are structures supporting the mapping of Resources and Attribute Values
-   * 
- * - * Protobuf type {@code policy.ResourceMapping} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.ResourceMapping) - io.opentdf.platform.policy.ResourceMappingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.ResourceMapping.class, io.opentdf.platform.policy.ResourceMapping.Builder.class); - } - - // Construct using io.opentdf.platform.policy.ResourceMapping.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - getAttributeValueFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - attributeValue_ = null; - if (attributeValueBuilder_ != null) { - attributeValueBuilder_.dispose(); - attributeValueBuilder_ = null; - } - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_ResourceMapping_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping getDefaultInstanceForType() { - return io.opentdf.platform.policy.ResourceMapping.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping build() { - io.opentdf.platform.policy.ResourceMapping result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping buildPartial() { - io.opentdf.platform.policy.ResourceMapping result = new io.opentdf.platform.policy.ResourceMapping(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.ResourceMapping result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.attributeValue_ = attributeValueBuilder_ == null - ? attributeValue_ - : attributeValueBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - terms_.makeImmutable(); - result.terms_ = terms_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.ResourceMapping) { - return mergeFrom((io.opentdf.platform.policy.ResourceMapping)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.ResourceMapping other) { - if (other == io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.hasAttributeValue()) { - mergeAttributeValue(other.getAttributeValue()); - } - if (!other.terms_.isEmpty()) { - if (terms_.isEmpty()) { - terms_ = other.terms_; - bitField0_ |= 0x00000008; - } else { - ensureTermsIsMutable(); - terms_.addAll(other.terms_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getAttributeValueFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - ensureTermsIsMutable(); - terms_.add(s); - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.common.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private io.opentdf.platform.policy.Value attributeValue_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> attributeValueBuilder_; - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - * @return Whether the attributeValue field is set. - */ - public boolean hasAttributeValue() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - * @return The attributeValue. - */ - public io.opentdf.platform.policy.Value getAttributeValue() { - if (attributeValueBuilder_ == null) { - return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; - } else { - return attributeValueBuilder_.getMessage(); - } - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - public Builder setAttributeValue(io.opentdf.platform.policy.Value value) { - if (attributeValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attributeValue_ = value; - } else { - attributeValueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - public Builder setAttributeValue( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (attributeValueBuilder_ == null) { - attributeValue_ = builderForValue.build(); - } else { - attributeValueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - public Builder mergeAttributeValue(io.opentdf.platform.policy.Value value) { - if (attributeValueBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - attributeValue_ != null && - attributeValue_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { - getAttributeValueBuilder().mergeFrom(value); - } else { - attributeValue_ = value; - } - } else { - attributeValueBuilder_.mergeFrom(value); - } - if (attributeValue_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - public Builder clearAttributeValue() { - bitField0_ = (bitField0_ & ~0x00000004); - attributeValue_ = null; - if (attributeValueBuilder_ != null) { - attributeValueBuilder_.dispose(); - attributeValueBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Value.Builder getAttributeValueBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getAttributeValueFieldBuilder().getBuilder(); - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder() { - if (attributeValueBuilder_ != null) { - return attributeValueBuilder_.getMessageOrBuilder(); - } else { - return attributeValue_ == null ? - io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; - } - } - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getAttributeValueFieldBuilder() { - if (attributeValueBuilder_ == null) { - attributeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - getAttributeValue(), - getParentForChildren(), - isClean()); - attributeValue_ = null; - } - return attributeValueBuilder_; - } - - private com.google.protobuf.LazyStringArrayList terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureTermsIsMutable() { - if (!terms_.isModifiable()) { - terms_ = new com.google.protobuf.LazyStringArrayList(terms_); - } - bitField0_ |= 0x00000008; - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @return A list containing the terms. - */ - public com.google.protobuf.ProtocolStringList - getTermsList() { - terms_.makeImmutable(); - return terms_; - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @return The count of terms. - */ - public int getTermsCount() { - return terms_.size(); - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param index The index of the element to return. - * @return The terms at the given index. - */ - public java.lang.String getTerms(int index) { - return terms_.get(index); - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - public com.google.protobuf.ByteString - getTermsBytes(int index) { - return terms_.getByteString(index); - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param index The index to set the value at. - * @param value The terms to set. - * @return This builder for chaining. - */ - public Builder setTerms( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureTermsIsMutable(); - terms_.set(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param value The terms to add. - * @return This builder for chaining. - */ - public Builder addTerms( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureTermsIsMutable(); - terms_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param values The terms to add. - * @return This builder for chaining. - */ - public Builder addAllTerms( - java.lang.Iterable values) { - ensureTermsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, terms_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @return This builder for chaining. - */ - public Builder clearTerms() { - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008);; - onChanged(); - return this; - } - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param value The bytes of the terms to add. - * @return This builder for chaining. - */ - public Builder addTermsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureTermsIsMutable(); - terms_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.ResourceMapping) - } - - // @@protoc_insertion_point(class_scope:policy.ResourceMapping) - private static final io.opentdf.platform.policy.ResourceMapping DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.ResourceMapping(); - } - - public static io.opentdf.platform.policy.ResourceMapping getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResourceMapping parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ResourceMappingOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ResourceMappingOrBuilder.java deleted file mode 100644 index a694033a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ResourceMappingOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface ResourceMappingOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.ResourceMapping) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); - - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - * @return Whether the attributeValue field is set. - */ - boolean hasAttributeValue(); - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - * @return The attributeValue. - */ - io.opentdf.platform.policy.Value getAttributeValue(); - /** - * .policy.Value attribute_value = 3 [json_name = "attributeValue", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder(); - - /** - * repeated string terms = 4 [json_name = "terms"]; - * @return A list containing the terms. - */ - java.util.List - getTermsList(); - /** - * repeated string terms = 4 [json_name = "terms"]; - * @return The count of terms. - */ - int getTermsCount(); - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param index The index of the element to return. - * @return The terms at the given index. - */ - java.lang.String getTerms(int index); - /** - * repeated string terms = 4 [json_name = "terms"]; - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - com.google.protobuf.ByteString - getTermsBytes(int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SelectorsProto.java b/protocol/src/main/java/io/opentdf/platform/policy/SelectorsProto.java deleted file mode 100644 index 9a741556..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SelectorsProto.java +++ /dev/null @@ -1,172 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/selectors.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public final class SelectorsProto { - private SelectorsProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeNamespaceSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeNamespaceSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeDefinitionSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeDefinitionSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeDefinitionSelector_ValueSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeValueSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeValueSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeValueSelector_AttributeSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026policy/selectors.proto\022\006policy\"\314\003\n\032Att" + - "ributeNamespaceSelector\022]\n\017with_attribut" + - "es\030\n \001(\01324.policy.AttributeNamespaceSele" + - "ctor.AttributeSelectorR\016withAttributes\032\316" + - "\002\n\021AttributeSelector\0223\n\026with_key_access_" + - "grants\030\001 \001(\010R\023withKeyAccessGrants\022c\n\013wit" + - "h_values\030\n \001(\0132B.policy.AttributeNamespa" + - "ceSelector.AttributeSelector.ValueSelect" + - "orR\nwithValues\032\236\001\n\rValueSelector\0223\n\026with" + - "_key_access_grants\030\001 \001(\010R\023withKeyAccessG" + - "rants\022*\n\021with_subject_maps\030\002 \001(\010R\017withSu" + - "bjectMaps\022,\n\022with_resource_maps\030\003 \001(\010R\020w" + - "ithResourceMaps\"\272\003\n\033AttributeDefinitionS" + - "elector\0223\n\026with_key_access_grants\030\001 \001(\010R" + - "\023withKeyAccessGrants\022\\\n\016with_namespace\030\n" + - " \001(\01325.policy.AttributeDefinitionSelecto" + - "r.NamespaceSelectorR\rwithNamespace\022R\n\013wi" + - "th_values\030\013 \001(\01321.policy.AttributeDefini" + - "tionSelector.ValueSelectorR\nwithValues\032\023" + - "\n\021NamespaceSelector\032\236\001\n\rValueSelector\0223\n" + - "\026with_key_access_grants\030\001 \001(\010R\023withKeyAc" + - "cessGrants\022*\n\021with_subject_maps\030\002 \001(\010R\017w" + - "ithSubjectMaps\022,\n\022with_resource_maps\030\003 \001" + - "(\010R\020withResourceMaps\"\313\003\n\026AttributeValueS" + - "elector\0223\n\026with_key_access_grants\030\001 \001(\010R" + - "\023withKeyAccessGrants\022*\n\021with_subject_map" + - "s\030\002 \001(\010R\017withSubjectMaps\022,\n\022with_resourc" + - "e_maps\030\003 \001(\010R\020withResourceMaps\022W\n\016with_a" + - "ttribute\030\n \001(\01320.policy.AttributeValueSe" + - "lector.AttributeSelectorR\rwithAttribute\032" + - "\310\001\n\021AttributeSelector\0223\n\026with_key_access" + - "_grants\030\001 \001(\010R\023withKeyAccessGrants\022i\n\016wi" + - "th_namespace\030\n \001(\0132B.policy.AttributeVal" + - "ueSelector.AttributeSelector.NamespaceSe" + - "lectorR\rwithNamespace\032\023\n\021NamespaceSelect" + - "orBd\n\032io.opentdf.platform.policyB\016Select" + - "orsProtoP\001\242\002\003PXX\252\002\006Policy\312\002\006Policy\342\002\022Pol" + - "icy\\GPBMetadata\352\002\006Policyb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_policy_AttributeNamespaceSelector_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_AttributeNamespaceSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeNamespaceSelector_descriptor, - new java.lang.String[] { "WithAttributes", }); - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor = - internal_static_policy_AttributeNamespaceSelector_descriptor.getNestedTypes().get(0); - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor, - new java.lang.String[] { "WithKeyAccessGrants", "WithValues", }); - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor = - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_descriptor.getNestedTypes().get(0); - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeNamespaceSelector_AttributeSelector_ValueSelector_descriptor, - new java.lang.String[] { "WithKeyAccessGrants", "WithSubjectMaps", "WithResourceMaps", }); - internal_static_policy_AttributeDefinitionSelector_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_policy_AttributeDefinitionSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeDefinitionSelector_descriptor, - new java.lang.String[] { "WithKeyAccessGrants", "WithNamespace", "WithValues", }); - internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor = - internal_static_policy_AttributeDefinitionSelector_descriptor.getNestedTypes().get(0); - internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeDefinitionSelector_NamespaceSelector_descriptor, - new java.lang.String[] { }); - internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor = - internal_static_policy_AttributeDefinitionSelector_descriptor.getNestedTypes().get(1); - internal_static_policy_AttributeDefinitionSelector_ValueSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeDefinitionSelector_ValueSelector_descriptor, - new java.lang.String[] { "WithKeyAccessGrants", "WithSubjectMaps", "WithResourceMaps", }); - internal_static_policy_AttributeValueSelector_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_policy_AttributeValueSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeValueSelector_descriptor, - new java.lang.String[] { "WithKeyAccessGrants", "WithSubjectMaps", "WithResourceMaps", "WithAttribute", }); - internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor = - internal_static_policy_AttributeValueSelector_descriptor.getNestedTypes().get(0); - internal_static_policy_AttributeValueSelector_AttributeSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor, - new java.lang.String[] { "WithKeyAccessGrants", "WithNamespace", }); - internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor = - internal_static_policy_AttributeValueSelector_AttributeSelector_descriptor.getNestedTypes().get(0); - internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_AttributeValueSelector_AttributeSelector_NamespaceSelector_descriptor, - new java.lang.String[] { }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSet.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSet.java deleted file mode 100644 index 2f0150b4..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSet.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- *
- *A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet
- *are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple
- *Subject Mappings / Attribute Values and is an independent unit.
- * 
- * - * Protobuf type {@code policy.SubjectConditionSet} - */ -public final class SubjectConditionSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.SubjectConditionSet) - SubjectConditionSetOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectConditionSet.newBuilder() to construct. - private SubjectConditionSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectConditionSet() { - id_ = ""; - subjectSets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectConditionSet(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.SubjectConditionSet.class, io.opentdf.platform.policy.SubjectConditionSet.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBJECT_SETS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List subjectSets_; - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getSubjectSetsList() { - return subjectSets_; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getSubjectSetsOrBuilderList() { - return subjectSets_; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getSubjectSetsCount() { - return subjectSets_.size(); - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { - return subjectSets_.get(index); - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index) { - return subjectSets_.get(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.Metadata metadata_; - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.Metadata getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - for (int i = 0; i < subjectSets_.size(); i++) { - output.writeMessage(3, subjectSets_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - for (int i = 0; i < subjectSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, subjectSets_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.SubjectConditionSet)) { - return super.equals(obj); - } - io.opentdf.platform.policy.SubjectConditionSet other = (io.opentdf.platform.policy.SubjectConditionSet) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getSubjectSetsList() - .equals(other.getSubjectSetsList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getSubjectSetsCount() > 0) { - hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSetsList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.SubjectConditionSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.SubjectConditionSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.SubjectConditionSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.SubjectConditionSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet
-   *are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple
-   *Subject Mappings / Attribute Values and is an independent unit.
-   * 
- * - * Protobuf type {@code policy.SubjectConditionSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.SubjectConditionSet) - io.opentdf.platform.policy.SubjectConditionSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.SubjectConditionSet.class, io.opentdf.platform.policy.SubjectConditionSet.Builder.class); - } - - // Construct using io.opentdf.platform.policy.SubjectConditionSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetsFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); - } else { - subjectSets_ = null; - subjectSetsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectConditionSet_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet getDefaultInstanceForType() { - return io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet build() { - io.opentdf.platform.policy.SubjectConditionSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet buildPartial() { - io.opentdf.platform.policy.SubjectConditionSet result = new io.opentdf.platform.policy.SubjectConditionSet(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.SubjectConditionSet result) { - if (subjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.subjectSets_ = subjectSets_; - } else { - result.subjectSets_ = subjectSetsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.SubjectConditionSet result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.SubjectConditionSet) { - return mergeFrom((io.opentdf.platform.policy.SubjectConditionSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.SubjectConditionSet other) { - if (other == io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (subjectSetsBuilder_ == null) { - if (!other.subjectSets_.isEmpty()) { - if (subjectSets_.isEmpty()) { - subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSubjectSetsIsMutable(); - subjectSets_.addAll(other.subjectSets_); - } - onChanged(); - } - } else { - if (!other.subjectSets_.isEmpty()) { - if (subjectSetsBuilder_.isEmpty()) { - subjectSetsBuilder_.dispose(); - subjectSetsBuilder_ = null; - subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000002); - subjectSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectSetsFieldBuilder() : null; - } else { - subjectSetsBuilder_.addAllMessages(other.subjectSets_); - } - } - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 26: { - io.opentdf.platform.policy.SubjectSet m = - input.readMessage( - io.opentdf.platform.policy.SubjectSet.parser(), - extensionRegistry); - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(m); - } else { - subjectSetsBuilder_.addMessage(m); - } - break; - } // case 26 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List subjectSets_ = - java.util.Collections.emptyList(); - private void ensureSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - subjectSets_ = new java.util.ArrayList(subjectSets_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> subjectSetsBuilder_; - - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List getSubjectSetsList() { - if (subjectSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectSets_); - } else { - return subjectSetsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public int getSubjectSetsCount() { - if (subjectSetsBuilder_ == null) { - return subjectSets_.size(); - } else { - return subjectSetsBuilder_.getCount(); - } - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); - } else { - return subjectSetsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, value); - onChanged(); - } else { - subjectSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addSubjectSets(io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.add(value); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, value); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addSubjectSets( - io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addAllSubjectSets( - java.lang.Iterable values) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectSets_); - onChanged(); - } else { - subjectSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder clearSubjectSets() { - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - subjectSetsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder removeSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.remove(index); - onChanged(); - } else { - subjectSetsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSet.Builder getSubjectSetsBuilder( - int index) { - return getSubjectSetsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); } else { - return subjectSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List - getSubjectSetsOrBuilderList() { - if (subjectSetsBuilder_ != null) { - return subjectSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectSets_); - } - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder() { - return getSubjectSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder( - int index) { - return getSubjectSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); - } - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List - getSubjectSetsBuilderList() { - return getSubjectSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> - getSubjectSetsFieldBuilder() { - if (subjectSetsBuilder_ == null) { - subjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder>( - subjectSets_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - subjectSets_ = null; - } - return subjectSetsBuilder_; - } - - private io.opentdf.platform.common.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.SubjectConditionSet) - } - - // @@protoc_insertion_point(class_scope:policy.SubjectConditionSet) - private static final io.opentdf.platform.policy.SubjectConditionSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.SubjectConditionSet(); - } - - public static io.opentdf.platform.policy.SubjectConditionSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectConditionSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSetOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSetOrBuilder.java deleted file mode 100644 index 440224b5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectConditionSetOrBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface SubjectConditionSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.SubjectConditionSet) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - java.util.List - getSubjectSetsList(); - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.SubjectSet getSubjectSets(int index); - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - int getSubjectSetsCount(); - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - java.util.List - getSubjectSetsOrBuilderList(); - /** - * repeated .policy.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index); - - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMapping.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMapping.java deleted file mode 100644 index d8d0c94f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMapping.java +++ /dev/null @@ -1,1676 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- *
- *Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination
- *
- *Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one
- *with permitted actions TRANSMIT and DECRYPT
- *{
- *"id": "someid",
- *"attribute_value": {example_one_attribute_value...},
- *"subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...},
- *"actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}]
- *}
- * 
- * - * Protobuf type {@code policy.SubjectMapping} - */ -public final class SubjectMapping extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.SubjectMapping) - SubjectMappingOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectMapping.newBuilder() to construct. - private SubjectMapping(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectMapping() { - id_ = ""; - actions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectMapping(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.SubjectMapping.class, io.opentdf.platform.policy.SubjectMapping.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTRIBUTE_VALUE_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.Value attributeValue_; - /** - *
-   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-   * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - * @return Whether the attributeValue field is set. - */ - @java.lang.Override - public boolean hasAttributeValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-   * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - * @return The attributeValue. - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getAttributeValue() { - return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; - } - /** - *
-   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-   * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder() { - return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; - } - - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 3; - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - /** - *
-   * the reusable SubjectConditionSet mapped to the given Attribute Value
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * the reusable SubjectConditionSet mapped to the given Attribute Value
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - /** - *
-   * the reusable SubjectConditionSet mapped to the given Attribute Value
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - - public static final int ACTIONS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List actions_; - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.Action getActions(int index) { - return actions_.get(index); - } - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.Metadata metadata_; - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.Metadata getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getAttributeValue()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getSubjectConditionSet()); - } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(4, actions_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getAttributeValue()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getSubjectConditionSet()); - } - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, actions_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.SubjectMapping)) { - return super.equals(obj); - } - io.opentdf.platform.policy.SubjectMapping other = (io.opentdf.platform.policy.SubjectMapping) obj; - - if (!getId() - .equals(other.getId())) return false; - if (hasAttributeValue() != other.hasAttributeValue()) return false; - if (hasAttributeValue()) { - if (!getAttributeValue() - .equals(other.getAttributeValue())) return false; - } - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } - if (!getActionsList() - .equals(other.getActionsList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (hasAttributeValue()) { - hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getAttributeValue().hashCode(); - } - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.SubjectMapping parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.SubjectMapping parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.SubjectMapping parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.SubjectMapping parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.SubjectMapping prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination
-   *
-   *Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one
-   *with permitted actions TRANSMIT and DECRYPT
-   *{
-   *"id": "someid",
-   *"attribute_value": {example_one_attribute_value...},
-   *"subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...},
-   *"actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}]
-   *}
-   * 
- * - * Protobuf type {@code policy.SubjectMapping} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.SubjectMapping) - io.opentdf.platform.policy.SubjectMappingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.SubjectMapping.class, io.opentdf.platform.policy.SubjectMapping.Builder.class); - } - - // Construct using io.opentdf.platform.policy.SubjectMapping.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeValueFieldBuilder(); - getSubjectConditionSetFieldBuilder(); - getActionsFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - attributeValue_ = null; - if (attributeValueBuilder_ != null) { - attributeValueBuilder_.dispose(); - attributeValueBuilder_ = null; - } - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - } else { - actions_ = null; - actionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectMapping_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getDefaultInstanceForType() { - return io.opentdf.platform.policy.SubjectMapping.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping build() { - io.opentdf.platform.policy.SubjectMapping result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping buildPartial() { - io.opentdf.platform.policy.SubjectMapping result = new io.opentdf.platform.policy.SubjectMapping(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.SubjectMapping result) { - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.SubjectMapping result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.attributeValue_ = attributeValueBuilder_ == null - ? attributeValue_ - : attributeValueBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.SubjectMapping) { - return mergeFrom((io.opentdf.platform.policy.SubjectMapping)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.SubjectMapping other) { - if (other == io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasAttributeValue()) { - mergeAttributeValue(other.getAttributeValue()); - } - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); - } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000008); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } - } - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getAttributeValueFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.opentdf.platform.policy.Action m = - input.readMessage( - io.opentdf.platform.policy.Action.parser(), - extensionRegistry); - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(m); - } else { - actionsBuilder_.addMessage(m); - } - break; - } // case 34 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.Value attributeValue_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> attributeValueBuilder_; - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - * @return Whether the attributeValue field is set. - */ - public boolean hasAttributeValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - * @return The attributeValue. - */ - public io.opentdf.platform.policy.Value getAttributeValue() { - if (attributeValueBuilder_ == null) { - return attributeValue_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; - } else { - return attributeValueBuilder_.getMessage(); - } - } - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - public Builder setAttributeValue(io.opentdf.platform.policy.Value value) { - if (attributeValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attributeValue_ = value; - } else { - attributeValueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - public Builder setAttributeValue( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (attributeValueBuilder_ == null) { - attributeValue_ = builderForValue.build(); - } else { - attributeValueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - public Builder mergeAttributeValue(io.opentdf.platform.policy.Value value) { - if (attributeValueBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - attributeValue_ != null && - attributeValue_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { - getAttributeValueBuilder().mergeFrom(value); - } else { - attributeValue_ = value; - } - } else { - attributeValueBuilder_.mergeFrom(value); - } - if (attributeValue_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - public Builder clearAttributeValue() { - bitField0_ = (bitField0_ & ~0x00000002); - attributeValue_ = null; - if (attributeValueBuilder_ != null) { - attributeValueBuilder_.dispose(); - attributeValueBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - public io.opentdf.platform.policy.Value.Builder getAttributeValueBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getAttributeValueFieldBuilder().getBuilder(); - } - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder() { - if (attributeValueBuilder_ != null) { - return attributeValueBuilder_.getMessageOrBuilder(); - } else { - return attributeValue_ == null ? - io.opentdf.platform.policy.Value.getDefaultInstance() : attributeValue_; - } - } - /** - *
-     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-     * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getAttributeValueFieldBuilder() { - if (attributeValueBuilder_ == null) { - attributeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - getAttributeValue(), - getParentForChildren(), - isClean()); - attributeValue_ = null; - } - return attributeValueBuilder_; - } - - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } else { - return subjectConditionSetBuilder_.getMessage(); - } - } - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; - } else { - subjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000004); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - } - /** - *
-     * the reusable SubjectConditionSet mapped to the given Attribute Value
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; - } - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionsBuilder_; - - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder addActions(io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder addActions( - io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - io.opentdf.platform.policy.Action.getDefaultInstance()); - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Action.getDefaultInstance()); - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } - - private io.opentdf.platform.common.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000010); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - } - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.SubjectMapping) - } - - // @@protoc_insertion_point(class_scope:policy.SubjectMapping) - private static final io.opentdf.platform.policy.SubjectMapping DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.SubjectMapping(); - } - - public static io.opentdf.platform.policy.SubjectMapping getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectMapping parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOperatorEnum.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOperatorEnum.java deleted file mode 100644 index 201eab38..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOperatorEnum.java +++ /dev/null @@ -1,127 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- * buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package
- * 
- * - * Protobuf enum {@code policy.SubjectMappingOperatorEnum} - */ -public enum SubjectMappingOperatorEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0; - */ - SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED(0), - /** - * SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1; - */ - SUBJECT_MAPPING_OPERATOR_ENUM_IN(1), - /** - * SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2; - */ - SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN(2), - UNRECOGNIZED(-1), - ; - - /** - * SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED = 0; - */ - public static final int SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED_VALUE = 0; - /** - * SUBJECT_MAPPING_OPERATOR_ENUM_IN = 1; - */ - public static final int SUBJECT_MAPPING_OPERATOR_ENUM_IN_VALUE = 1; - /** - * SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN = 2; - */ - public static final int SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SubjectMappingOperatorEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static SubjectMappingOperatorEnum forNumber(int value) { - switch (value) { - case 0: return SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED; - case 1: return SUBJECT_MAPPING_OPERATOR_ENUM_IN; - case 2: return SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SubjectMappingOperatorEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SubjectMappingOperatorEnum findValueByNumber(int number) { - return SubjectMappingOperatorEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.getDescriptor().getEnumTypes().get(1); - } - - private static final SubjectMappingOperatorEnum[] VALUES = values(); - - public static SubjectMappingOperatorEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private SubjectMappingOperatorEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:policy.SubjectMappingOperatorEnum) -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOrBuilder.java deleted file mode 100644 index 8c500afb..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectMappingOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface SubjectMappingOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.SubjectMapping) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-   * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - * @return Whether the attributeValue field is set. - */ - boolean hasAttributeValue(); - /** - *
-   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-   * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - * @return The attributeValue. - */ - io.opentdf.platform.policy.Value getAttributeValue(); - /** - *
-   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
-   * 
- * - * .policy.Value attribute_value = 2 [json_name = "attributeValue"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getAttributeValueOrBuilder(); - - /** - *
-   * the reusable SubjectConditionSet mapped to the given Attribute Value
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - boolean hasSubjectConditionSet(); - /** - *
-   * the reusable SubjectConditionSet mapped to the given Attribute Value
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); - /** - *
-   * the reusable SubjectConditionSet mapped to the given Attribute Value
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); - - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - java.util.List - getActionsList(); - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - io.opentdf.platform.policy.Action getActions(int index); - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - int getActionsCount(); - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - java.util.List - getActionsOrBuilderList(); - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 4 [json_name = "actions"]; - */ - io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index); - - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectProperty.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectProperty.java deleted file mode 100644 index 96769a22..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectProperty.java +++ /dev/null @@ -1,692 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- *
- *A property of a Subject/Entity as a field->value pair.  This would mirror external user attributes retrieved
- *from an authoritative source such as an IDP (Identity Provider) or User Store.  Examples include such ADFS/LDAP, OKTA, etc.
- *For now, a valid property must contain both field & value. 
- * 
- * - * Protobuf type {@code policy.SubjectProperty} - */ -public final class SubjectProperty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.SubjectProperty) - SubjectPropertyOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectProperty.newBuilder() to construct. - private SubjectProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectProperty() { - externalField_ = ""; - externalValue_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectProperty(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.SubjectProperty.class, io.opentdf.platform.policy.SubjectProperty.Builder.class); - } - - public static final int EXTERNAL_FIELD_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object externalField_ = ""; - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @return The externalField. - */ - @java.lang.Override - public java.lang.String getExternalField() { - java.lang.Object ref = externalField_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalField_ = s; - return s; - } - } - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @return The bytes for externalField. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExternalFieldBytes() { - java.lang.Object ref = externalField_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalField_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTERNAL_VALUE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object externalValue_ = ""; - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @return The externalValue. - */ - @java.lang.Override - public java.lang.String getExternalValue() { - java.lang.Object ref = externalValue_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalValue_ = s; - return s; - } - } - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @return The bytes for externalValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExternalValueBytes() { - java.lang.Object ref = externalValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalField_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, externalField_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalValue_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalValue_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalField_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, externalField_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalValue_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, externalValue_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.SubjectProperty)) { - return super.equals(obj); - } - io.opentdf.platform.policy.SubjectProperty other = (io.opentdf.platform.policy.SubjectProperty) obj; - - if (!getExternalField() - .equals(other.getExternalField())) return false; - if (!getExternalValue() - .equals(other.getExternalValue())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EXTERNAL_FIELD_FIELD_NUMBER; - hash = (53 * hash) + getExternalField().hashCode(); - hash = (37 * hash) + EXTERNAL_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getExternalValue().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.SubjectProperty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.SubjectProperty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.SubjectProperty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.SubjectProperty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.SubjectProperty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *A property of a Subject/Entity as a field->value pair.  This would mirror external user attributes retrieved
-   *from an authoritative source such as an IDP (Identity Provider) or User Store.  Examples include such ADFS/LDAP, OKTA, etc.
-   *For now, a valid property must contain both field & value. 
-   * 
- * - * Protobuf type {@code policy.SubjectProperty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.SubjectProperty) - io.opentdf.platform.policy.SubjectPropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.SubjectProperty.class, io.opentdf.platform.policy.SubjectProperty.Builder.class); - } - - // Construct using io.opentdf.platform.policy.SubjectProperty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - externalField_ = ""; - externalValue_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectProperty_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectProperty getDefaultInstanceForType() { - return io.opentdf.platform.policy.SubjectProperty.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectProperty build() { - io.opentdf.platform.policy.SubjectProperty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectProperty buildPartial() { - io.opentdf.platform.policy.SubjectProperty result = new io.opentdf.platform.policy.SubjectProperty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.SubjectProperty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.externalField_ = externalField_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.externalValue_ = externalValue_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.SubjectProperty) { - return mergeFrom((io.opentdf.platform.policy.SubjectProperty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.SubjectProperty other) { - if (other == io.opentdf.platform.policy.SubjectProperty.getDefaultInstance()) return this; - if (!other.getExternalField().isEmpty()) { - externalField_ = other.externalField_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getExternalValue().isEmpty()) { - externalValue_ = other.externalValue_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - externalField_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - externalValue_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object externalField_ = ""; - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @return The externalField. - */ - public java.lang.String getExternalField() { - java.lang.Object ref = externalField_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalField_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @return The bytes for externalField. - */ - public com.google.protobuf.ByteString - getExternalFieldBytes() { - java.lang.Object ref = externalField_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalField_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @param value The externalField to set. - * @return This builder for chaining. - */ - public Builder setExternalField( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - externalField_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearExternalField() { - externalField_ = getDefaultInstance().getExternalField(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @param value The bytes for externalField to set. - * @return This builder for chaining. - */ - public Builder setExternalFieldBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - externalField_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object externalValue_ = ""; - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @return The externalValue. - */ - public java.lang.String getExternalValue() { - java.lang.Object ref = externalValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalValue_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @return The bytes for externalValue. - */ - public com.google.protobuf.ByteString - getExternalValueBytes() { - java.lang.Object ref = externalValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - externalValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @param value The externalValue to set. - * @return This builder for chaining. - */ - public Builder setExternalValue( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - externalValue_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearExternalValue() { - externalValue_ = getDefaultInstance().getExternalValue(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @param value The bytes for externalValue to set. - * @return This builder for chaining. - */ - public Builder setExternalValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - externalValue_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.SubjectProperty) - } - - // @@protoc_insertion_point(class_scope:policy.SubjectProperty) - private static final io.opentdf.platform.policy.SubjectProperty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.SubjectProperty(); - } - - public static io.opentdf.platform.policy.SubjectProperty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectProperty parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectProperty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectPropertyOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectPropertyOrBuilder.java deleted file mode 100644 index 69b9597b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectPropertyOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface SubjectPropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.SubjectProperty) - com.google.protobuf.MessageOrBuilder { - - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @return The externalField. - */ - java.lang.String getExternalField(); - /** - * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } - * @return The bytes for externalField. - */ - com.google.protobuf.ByteString - getExternalFieldBytes(); - - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @return The externalValue. - */ - java.lang.String getExternalValue(); - /** - * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } - * @return The bytes for externalValue. - */ - com.google.protobuf.ByteString - getExternalValueBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectSet.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectSet.java deleted file mode 100644 index 1123b8a9..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectSet.java +++ /dev/null @@ -1,860 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - *
- * A collection of Condition Groups
- * 
- * - * Protobuf type {@code policy.SubjectSet} - */ -public final class SubjectSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.SubjectSet) - SubjectSetOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectSet.newBuilder() to construct. - private SubjectSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectSet() { - conditionGroups_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectSet(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.SubjectSet.class, io.opentdf.platform.policy.SubjectSet.Builder.class); - } - - public static final int CONDITION_GROUPS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List conditionGroups_; - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getConditionGroupsList() { - return conditionGroups_; - } - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getConditionGroupsOrBuilderList() { - return conditionGroups_; - } - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getConditionGroupsCount() { - return conditionGroups_.size(); - } - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.ConditionGroup getConditionGroups(int index) { - return conditionGroups_.get(index); - } - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.ConditionGroupOrBuilder getConditionGroupsOrBuilder( - int index) { - return conditionGroups_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < conditionGroups_.size(); i++) { - output.writeMessage(1, conditionGroups_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < conditionGroups_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, conditionGroups_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.SubjectSet)) { - return super.equals(obj); - } - io.opentdf.platform.policy.SubjectSet other = (io.opentdf.platform.policy.SubjectSet) obj; - - if (!getConditionGroupsList() - .equals(other.getConditionGroupsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConditionGroupsCount() > 0) { - hash = (37 * hash) + CONDITION_GROUPS_FIELD_NUMBER; - hash = (53 * hash) + getConditionGroupsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.SubjectSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.SubjectSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.SubjectSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.SubjectSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.SubjectSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A collection of Condition Groups
-   * 
- * - * Protobuf type {@code policy.SubjectSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.SubjectSet) - io.opentdf.platform.policy.SubjectSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.SubjectSet.class, io.opentdf.platform.policy.SubjectSet.Builder.class); - } - - // Construct using io.opentdf.platform.policy.SubjectSet.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (conditionGroupsBuilder_ == null) { - conditionGroups_ = java.util.Collections.emptyList(); - } else { - conditionGroups_ = null; - conditionGroupsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_SubjectSet_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectSet getDefaultInstanceForType() { - return io.opentdf.platform.policy.SubjectSet.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectSet build() { - io.opentdf.platform.policy.SubjectSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectSet buildPartial() { - io.opentdf.platform.policy.SubjectSet result = new io.opentdf.platform.policy.SubjectSet(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.SubjectSet result) { - if (conditionGroupsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - conditionGroups_ = java.util.Collections.unmodifiableList(conditionGroups_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.conditionGroups_ = conditionGroups_; - } else { - result.conditionGroups_ = conditionGroupsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.SubjectSet result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.SubjectSet) { - return mergeFrom((io.opentdf.platform.policy.SubjectSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.SubjectSet other) { - if (other == io.opentdf.platform.policy.SubjectSet.getDefaultInstance()) return this; - if (conditionGroupsBuilder_ == null) { - if (!other.conditionGroups_.isEmpty()) { - if (conditionGroups_.isEmpty()) { - conditionGroups_ = other.conditionGroups_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConditionGroupsIsMutable(); - conditionGroups_.addAll(other.conditionGroups_); - } - onChanged(); - } - } else { - if (!other.conditionGroups_.isEmpty()) { - if (conditionGroupsBuilder_.isEmpty()) { - conditionGroupsBuilder_.dispose(); - conditionGroupsBuilder_ = null; - conditionGroups_ = other.conditionGroups_; - bitField0_ = (bitField0_ & ~0x00000001); - conditionGroupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConditionGroupsFieldBuilder() : null; - } else { - conditionGroupsBuilder_.addAllMessages(other.conditionGroups_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.ConditionGroup m = - input.readMessage( - io.opentdf.platform.policy.ConditionGroup.parser(), - extensionRegistry); - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.add(m); - } else { - conditionGroupsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List conditionGroups_ = - java.util.Collections.emptyList(); - private void ensureConditionGroupsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - conditionGroups_ = new java.util.ArrayList(conditionGroups_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.ConditionGroup, io.opentdf.platform.policy.ConditionGroup.Builder, io.opentdf.platform.policy.ConditionGroupOrBuilder> conditionGroupsBuilder_; - - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public java.util.List getConditionGroupsList() { - if (conditionGroupsBuilder_ == null) { - return java.util.Collections.unmodifiableList(conditionGroups_); - } else { - return conditionGroupsBuilder_.getMessageList(); - } - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public int getConditionGroupsCount() { - if (conditionGroupsBuilder_ == null) { - return conditionGroups_.size(); - } else { - return conditionGroupsBuilder_.getCount(); - } - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.ConditionGroup getConditionGroups(int index) { - if (conditionGroupsBuilder_ == null) { - return conditionGroups_.get(index); - } else { - return conditionGroupsBuilder_.getMessage(index); - } - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder setConditionGroups( - int index, io.opentdf.platform.policy.ConditionGroup value) { - if (conditionGroupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionGroupsIsMutable(); - conditionGroups_.set(index, value); - onChanged(); - } else { - conditionGroupsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder setConditionGroups( - int index, io.opentdf.platform.policy.ConditionGroup.Builder builderForValue) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.set(index, builderForValue.build()); - onChanged(); - } else { - conditionGroupsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder addConditionGroups(io.opentdf.platform.policy.ConditionGroup value) { - if (conditionGroupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionGroupsIsMutable(); - conditionGroups_.add(value); - onChanged(); - } else { - conditionGroupsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder addConditionGroups( - int index, io.opentdf.platform.policy.ConditionGroup value) { - if (conditionGroupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionGroupsIsMutable(); - conditionGroups_.add(index, value); - onChanged(); - } else { - conditionGroupsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder addConditionGroups( - io.opentdf.platform.policy.ConditionGroup.Builder builderForValue) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.add(builderForValue.build()); - onChanged(); - } else { - conditionGroupsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder addConditionGroups( - int index, io.opentdf.platform.policy.ConditionGroup.Builder builderForValue) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.add(index, builderForValue.build()); - onChanged(); - } else { - conditionGroupsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder addAllConditionGroups( - java.lang.Iterable values) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, conditionGroups_); - onChanged(); - } else { - conditionGroupsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder clearConditionGroups() { - if (conditionGroupsBuilder_ == null) { - conditionGroups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - conditionGroupsBuilder_.clear(); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public Builder removeConditionGroups(int index) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.remove(index); - onChanged(); - } else { - conditionGroupsBuilder_.remove(index); - } - return this; - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.ConditionGroup.Builder getConditionGroupsBuilder( - int index) { - return getConditionGroupsFieldBuilder().getBuilder(index); - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.ConditionGroupOrBuilder getConditionGroupsOrBuilder( - int index) { - if (conditionGroupsBuilder_ == null) { - return conditionGroups_.get(index); } else { - return conditionGroupsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public java.util.List - getConditionGroupsOrBuilderList() { - if (conditionGroupsBuilder_ != null) { - return conditionGroupsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(conditionGroups_); - } - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.ConditionGroup.Builder addConditionGroupsBuilder() { - return getConditionGroupsFieldBuilder().addBuilder( - io.opentdf.platform.policy.ConditionGroup.getDefaultInstance()); - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.ConditionGroup.Builder addConditionGroupsBuilder( - int index) { - return getConditionGroupsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.ConditionGroup.getDefaultInstance()); - } - /** - *
-     * multiple Condition Groups are evaluated with AND logic
-     * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - public java.util.List - getConditionGroupsBuilderList() { - return getConditionGroupsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.ConditionGroup, io.opentdf.platform.policy.ConditionGroup.Builder, io.opentdf.platform.policy.ConditionGroupOrBuilder> - getConditionGroupsFieldBuilder() { - if (conditionGroupsBuilder_ == null) { - conditionGroupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.ConditionGroup, io.opentdf.platform.policy.ConditionGroup.Builder, io.opentdf.platform.policy.ConditionGroupOrBuilder>( - conditionGroups_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - conditionGroups_ = null; - } - return conditionGroupsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.SubjectSet) - } - - // @@protoc_insertion_point(class_scope:policy.SubjectSet) - private static final io.opentdf.platform.policy.SubjectSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.SubjectSet(); - } - - public static io.opentdf.platform.policy.SubjectSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.SubjectSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/SubjectSetOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/SubjectSetOrBuilder.java deleted file mode 100644 index 9e1a1d6b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/SubjectSetOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface SubjectSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.SubjectSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - java.util.List - getConditionGroupsList(); - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.ConditionGroup getConditionGroups(int index); - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - int getConditionGroupsCount(); - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - java.util.List - getConditionGroupsOrBuilderList(); - /** - *
-   * multiple Condition Groups are evaluated with AND logic
-   * 
- * - * repeated .policy.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.ConditionGroupOrBuilder getConditionGroupsOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/Value.java b/protocol/src/main/java/io/opentdf/platform/policy/Value.java deleted file mode 100644 index 752bb064..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/Value.java +++ /dev/null @@ -1,2834 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -/** - * Protobuf type {@code policy.Value} - */ -public final class Value extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.Value) - ValueOrBuilder { -private static final long serialVersionUID = 0L; - // Use Value.newBuilder() to construct. - private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Value() { - id_ = ""; - value_ = ""; - members_ = java.util.Collections.emptyList(); - grants_ = java.util.Collections.emptyList(); - fqn_ = ""; - subjectMappings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Value(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Value.class, io.opentdf.platform.policy.Value.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * generated uuid in database
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * generated uuid in database
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTRIBUTE_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.Attribute attribute_; - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - @java.lang.Override - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - * @return The attribute. - */ - @java.lang.Override - public io.opentdf.platform.policy.Attribute getAttribute() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - - public static final int VALUE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object value_ = ""; - /** - * string value = 3 [json_name = "value"]; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - * string value = 3 [json_name = "value"]; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEMBERS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List members_; - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - @java.lang.Override - public java.util.List getMembersList() { - return members_; - } - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - @java.lang.Override - public java.util.List - getMembersOrBuilderList() { - return members_; - } - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - @java.lang.Override - public int getMembersCount() { - return members_.size(); - } - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getMembers(int index) { - return members_.get(index); - } - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getMembersOrBuilder( - int index) { - return members_.get(index); - } - - public static final int GRANTS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List grants_; - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - @java.lang.Override - public java.util.List getGrantsList() { - return grants_; - } - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - @java.lang.Override - public java.util.List - getGrantsOrBuilderList() { - return grants_; - } - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - @java.lang.Override - public int getGrantsCount() { - return grants_.size(); - } - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index) { - return grants_.get(index); - } - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - @java.lang.Override - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( - int index) { - return grants_.get(index); - } - - public static final int FQN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object fqn_ = ""; - /** - * string fqn = 6 [json_name = "fqn"]; - * @return The fqn. - */ - @java.lang.Override - public java.lang.String getFqn() { - java.lang.Object ref = fqn_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fqn_ = s; - return s; - } - } - /** - * string fqn = 6 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFqnBytes() { - java.lang.Object ref = fqn_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fqn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTIVE_FIELD_NUMBER = 7; - private com.google.protobuf.BoolValue active_; - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - * @return Whether the active field is set. - */ - @java.lang.Override - public boolean hasActive() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - * @return The active. - */ - @java.lang.Override - public com.google.protobuf.BoolValue getActive() { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - @java.lang.Override - public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - - public static final int SUBJECT_MAPPINGS_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private java.util.List subjectMappings_; - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public java.util.List getSubjectMappingsList() { - return subjectMappings_; - } - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public java.util.List - getSubjectMappingsOrBuilderList() { - return subjectMappings_; - } - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public int getSubjectMappingsCount() { - return subjectMappings_.size(); - } - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { - return subjectMappings_.get(index); - } - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index) { - return subjectMappings_.get(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.Metadata metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.Metadata getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getAttribute()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_); - } - for (int i = 0; i < members_.size(); i++) { - output.writeMessage(4, members_.get(i)); - } - for (int i = 0; i < grants_.size(); i++) { - output.writeMessage(5, grants_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, fqn_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getActive()); - } - for (int i = 0; i < subjectMappings_.size(); i++) { - output.writeMessage(8, subjectMappings_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getAttribute()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_); - } - for (int i = 0; i < members_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, members_.get(i)); - } - for (int i = 0; i < grants_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, grants_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fqn_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, fqn_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getActive()); - } - for (int i = 0; i < subjectMappings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, subjectMappings_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.Value)) { - return super.equals(obj); - } - io.opentdf.platform.policy.Value other = (io.opentdf.platform.policy.Value) obj; - - if (!getId() - .equals(other.getId())) return false; - if (hasAttribute() != other.hasAttribute()) return false; - if (hasAttribute()) { - if (!getAttribute() - .equals(other.getAttribute())) return false; - } - if (!getValue() - .equals(other.getValue())) return false; - if (!getMembersList() - .equals(other.getMembersList())) return false; - if (!getGrantsList() - .equals(other.getGrantsList())) return false; - if (!getFqn() - .equals(other.getFqn())) return false; - if (hasActive() != other.hasActive()) return false; - if (hasActive()) { - if (!getActive() - .equals(other.getActive())) return false; - } - if (!getSubjectMappingsList() - .equals(other.getSubjectMappingsList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (hasAttribute()) { - hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getAttribute().hashCode(); - } - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - if (getMembersCount() > 0) { - hash = (37 * hash) + MEMBERS_FIELD_NUMBER; - hash = (53 * hash) + getMembersList().hashCode(); - } - if (getGrantsCount() > 0) { - hash = (37 * hash) + GRANTS_FIELD_NUMBER; - hash = (53 * hash) + getGrantsList().hashCode(); - } - hash = (37 * hash) + FQN_FIELD_NUMBER; - hash = (53 * hash) + getFqn().hashCode(); - if (hasActive()) { - hash = (37 * hash) + ACTIVE_FIELD_NUMBER; - hash = (53 * hash) + getActive().hashCode(); - } - if (getSubjectMappingsCount() > 0) { - hash = (37 * hash) + SUBJECT_MAPPINGS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMappingsList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.Value parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Value parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Value parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Value parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Value parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.Value parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.Value parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Value parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.Value parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.Value parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.Value parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.Value parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.Value prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.Value} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.Value) - io.opentdf.platform.policy.ValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.Value.class, io.opentdf.platform.policy.Value.Builder.class); - } - - // Construct using io.opentdf.platform.policy.Value.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeFieldBuilder(); - getMembersFieldBuilder(); - getGrantsFieldBuilder(); - getActiveFieldBuilder(); - getSubjectMappingsFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - value_ = ""; - if (membersBuilder_ == null) { - members_ = java.util.Collections.emptyList(); - } else { - members_ = null; - membersBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (grantsBuilder_ == null) { - grants_ = java.util.Collections.emptyList(); - } else { - grants_ = null; - grantsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - fqn_ = ""; - active_ = null; - if (activeBuilder_ != null) { - activeBuilder_.dispose(); - activeBuilder_ = null; - } - if (subjectMappingsBuilder_ == null) { - subjectMappings_ = java.util.Collections.emptyList(); - } else { - subjectMappings_ = null; - subjectMappingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.ObjectsProto.internal_static_policy_Value_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.Value getDefaultInstanceForType() { - return io.opentdf.platform.policy.Value.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.Value build() { - io.opentdf.platform.policy.Value result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.Value buildPartial() { - io.opentdf.platform.policy.Value result = new io.opentdf.platform.policy.Value(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.Value result) { - if (membersBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - members_ = java.util.Collections.unmodifiableList(members_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.members_ = members_; - } else { - result.members_ = membersBuilder_.build(); - } - if (grantsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - grants_ = java.util.Collections.unmodifiableList(grants_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.grants_ = grants_; - } else { - result.grants_ = grantsBuilder_.build(); - } - if (subjectMappingsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - subjectMappings_ = java.util.Collections.unmodifiableList(subjectMappings_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.subjectMappings_ = subjectMappings_; - } else { - result.subjectMappings_ = subjectMappingsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.Value result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.attribute_ = attributeBuilder_ == null - ? attribute_ - : attributeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.value_ = value_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.fqn_ = fqn_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.active_ = activeBuilder_ == null - ? active_ - : activeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.Value) { - return mergeFrom((io.opentdf.platform.policy.Value)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.Value other) { - if (other == io.opentdf.platform.policy.Value.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasAttribute()) { - mergeAttribute(other.getAttribute()); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (membersBuilder_ == null) { - if (!other.members_.isEmpty()) { - if (members_.isEmpty()) { - members_ = other.members_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureMembersIsMutable(); - members_.addAll(other.members_); - } - onChanged(); - } - } else { - if (!other.members_.isEmpty()) { - if (membersBuilder_.isEmpty()) { - membersBuilder_.dispose(); - membersBuilder_ = null; - members_ = other.members_; - bitField0_ = (bitField0_ & ~0x00000008); - membersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMembersFieldBuilder() : null; - } else { - membersBuilder_.addAllMessages(other.members_); - } - } - } - if (grantsBuilder_ == null) { - if (!other.grants_.isEmpty()) { - if (grants_.isEmpty()) { - grants_ = other.grants_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureGrantsIsMutable(); - grants_.addAll(other.grants_); - } - onChanged(); - } - } else { - if (!other.grants_.isEmpty()) { - if (grantsBuilder_.isEmpty()) { - grantsBuilder_.dispose(); - grantsBuilder_ = null; - grants_ = other.grants_; - bitField0_ = (bitField0_ & ~0x00000010); - grantsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getGrantsFieldBuilder() : null; - } else { - grantsBuilder_.addAllMessages(other.grants_); - } - } - } - if (!other.getFqn().isEmpty()) { - fqn_ = other.fqn_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.hasActive()) { - mergeActive(other.getActive()); - } - if (subjectMappingsBuilder_ == null) { - if (!other.subjectMappings_.isEmpty()) { - if (subjectMappings_.isEmpty()) { - subjectMappings_ = other.subjectMappings_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureSubjectMappingsIsMutable(); - subjectMappings_.addAll(other.subjectMappings_); - } - onChanged(); - } - } else { - if (!other.subjectMappings_.isEmpty()) { - if (subjectMappingsBuilder_.isEmpty()) { - subjectMappingsBuilder_.dispose(); - subjectMappingsBuilder_ = null; - subjectMappings_ = other.subjectMappings_; - bitField0_ = (bitField0_ & ~0x00000080); - subjectMappingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectMappingsFieldBuilder() : null; - } else { - subjectMappingsBuilder_.addAllMessages(other.subjectMappings_); - } - } - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getAttributeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - value_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - io.opentdf.platform.policy.Value m = - input.readMessage( - io.opentdf.platform.policy.Value.parser(), - extensionRegistry); - if (membersBuilder_ == null) { - ensureMembersIsMutable(); - members_.add(m); - } else { - membersBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - io.opentdf.platform.kasregistry.KeyAccessServer m = - input.readMessage( - io.opentdf.platform.kasregistry.KeyAccessServer.parser(), - extensionRegistry); - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.add(m); - } else { - grantsBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: { - fqn_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getActiveFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - io.opentdf.platform.policy.SubjectMapping m = - input.readMessage( - io.opentdf.platform.policy.SubjectMapping.parser(), - extensionRegistry); - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(m); - } else { - subjectMappingsBuilder_.addMessage(m); - } - break; - } // case 66 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * generated uuid in database
-     * 
- * - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.Attribute attribute_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - public boolean hasAttribute() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - * @return The attribute. - */ - public io.opentdf.platform.policy.Attribute getAttribute() { - if (attributeBuilder_ == null) { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } else { - return attributeBuilder_.getMessage(); - } - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attribute_ = value; - } else { - attributeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - public Builder setAttribute( - io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributeBuilder_ == null) { - attribute_ = builderForValue.build(); - } else { - attributeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - attribute_ != null && - attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { - getAttributeBuilder().mergeFrom(value); - } else { - attribute_ = value; - } - } else { - attributeBuilder_.mergeFrom(value); - } - if (attribute_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - public Builder clearAttribute() { - bitField0_ = (bitField0_ & ~0x00000002); - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getAttributeFieldBuilder().getBuilder(); - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - if (attributeBuilder_ != null) { - return attributeBuilder_.getMessageOrBuilder(); - } else { - return attribute_ == null ? - io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - } - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> - getAttributeFieldBuilder() { - if (attributeBuilder_ == null) { - attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( - getAttribute(), - getParentForChildren(), - isClean()); - attribute_ = null; - } - return attributeBuilder_; - } - - private java.lang.Object value_ = ""; - /** - * string value = 3 [json_name = "value"]; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string value = 3 [json_name = "value"]; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string value = 3 [json_name = "value"]; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - value_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * string value = 3 [json_name = "value"]; - * @return This builder for chaining. - */ - public Builder clearValue() { - value_ = getDefaultInstance().getValue(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * string value = 3 [json_name = "value"]; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - value_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List members_ = - java.util.Collections.emptyList(); - private void ensureMembersIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - members_ = new java.util.ArrayList(members_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> membersBuilder_; - - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public java.util.List getMembersList() { - if (membersBuilder_ == null) { - return java.util.Collections.unmodifiableList(members_); - } else { - return membersBuilder_.getMessageList(); - } - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public int getMembersCount() { - if (membersBuilder_ == null) { - return members_.size(); - } else { - return membersBuilder_.getCount(); - } - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public io.opentdf.platform.policy.Value getMembers(int index) { - if (membersBuilder_ == null) { - return members_.get(index); - } else { - return membersBuilder_.getMessage(index); - } - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder setMembers( - int index, io.opentdf.platform.policy.Value value) { - if (membersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMembersIsMutable(); - members_.set(index, value); - onChanged(); - } else { - membersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder setMembers( - int index, io.opentdf.platform.policy.Value.Builder builderForValue) { - if (membersBuilder_ == null) { - ensureMembersIsMutable(); - members_.set(index, builderForValue.build()); - onChanged(); - } else { - membersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder addMembers(io.opentdf.platform.policy.Value value) { - if (membersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMembersIsMutable(); - members_.add(value); - onChanged(); - } else { - membersBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder addMembers( - int index, io.opentdf.platform.policy.Value value) { - if (membersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMembersIsMutable(); - members_.add(index, value); - onChanged(); - } else { - membersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder addMembers( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (membersBuilder_ == null) { - ensureMembersIsMutable(); - members_.add(builderForValue.build()); - onChanged(); - } else { - membersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder addMembers( - int index, io.opentdf.platform.policy.Value.Builder builderForValue) { - if (membersBuilder_ == null) { - ensureMembersIsMutable(); - members_.add(index, builderForValue.build()); - onChanged(); - } else { - membersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder addAllMembers( - java.lang.Iterable values) { - if (membersBuilder_ == null) { - ensureMembersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, members_); - onChanged(); - } else { - membersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder clearMembers() { - if (membersBuilder_ == null) { - members_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - membersBuilder_.clear(); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public Builder removeMembers(int index) { - if (membersBuilder_ == null) { - ensureMembersIsMutable(); - members_.remove(index); - onChanged(); - } else { - membersBuilder_.remove(index); - } - return this; - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public io.opentdf.platform.policy.Value.Builder getMembersBuilder( - int index) { - return getMembersFieldBuilder().getBuilder(index); - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getMembersOrBuilder( - int index) { - if (membersBuilder_ == null) { - return members_.get(index); } else { - return membersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public java.util.List - getMembersOrBuilderList() { - if (membersBuilder_ != null) { - return membersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(members_); - } - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public io.opentdf.platform.policy.Value.Builder addMembersBuilder() { - return getMembersFieldBuilder().addBuilder( - io.opentdf.platform.policy.Value.getDefaultInstance()); - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public io.opentdf.platform.policy.Value.Builder addMembersBuilder( - int index) { - return getMembersFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Value.getDefaultInstance()); - } - /** - *
-     * list of attribute values that this value is related to (attribute group)
-     * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - public java.util.List - getMembersBuilderList() { - return getMembersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getMembersFieldBuilder() { - if (membersBuilder_ == null) { - membersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - members_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - members_ = null; - } - return membersBuilder_; - } - - private java.util.List grants_ = - java.util.Collections.emptyList(); - private void ensureGrantsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - grants_ = new java.util.ArrayList(grants_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> grantsBuilder_; - - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public java.util.List getGrantsList() { - if (grantsBuilder_ == null) { - return java.util.Collections.unmodifiableList(grants_); - } else { - return grantsBuilder_.getMessageList(); - } - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public int getGrantsCount() { - if (grantsBuilder_ == null) { - return grants_.size(); - } else { - return grantsBuilder_.getCount(); - } - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index) { - if (grantsBuilder_ == null) { - return grants_.get(index); - } else { - return grantsBuilder_.getMessage(index); - } - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder setGrants( - int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (grantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGrantsIsMutable(); - grants_.set(index, value); - onChanged(); - } else { - grantsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder setGrants( - int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.set(index, builderForValue.build()); - onChanged(); - } else { - grantsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder addGrants(io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (grantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGrantsIsMutable(); - grants_.add(value); - onChanged(); - } else { - grantsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder addGrants( - int index, io.opentdf.platform.kasregistry.KeyAccessServer value) { - if (grantsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGrantsIsMutable(); - grants_.add(index, value); - onChanged(); - } else { - grantsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder addGrants( - io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.add(builderForValue.build()); - onChanged(); - } else { - grantsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder addGrants( - int index, io.opentdf.platform.kasregistry.KeyAccessServer.Builder builderForValue) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.add(index, builderForValue.build()); - onChanged(); - } else { - grantsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder addAllGrants( - java.lang.Iterable values) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, grants_); - onChanged(); - } else { - grantsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder clearGrants() { - if (grantsBuilder_ == null) { - grants_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - grantsBuilder_.clear(); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public Builder removeGrants(int index) { - if (grantsBuilder_ == null) { - ensureGrantsIsMutable(); - grants_.remove(index); - onChanged(); - } else { - grantsBuilder_.remove(index); - } - return this; - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder getGrantsBuilder( - int index) { - return getGrantsFieldBuilder().getBuilder(index); - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( - int index) { - if (grantsBuilder_ == null) { - return grants_.get(index); } else { - return grantsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public java.util.List - getGrantsOrBuilderList() { - if (grantsBuilder_ != null) { - return grantsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(grants_); - } - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addGrantsBuilder() { - return getGrantsFieldBuilder().addBuilder( - io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public io.opentdf.platform.kasregistry.KeyAccessServer.Builder addGrantsBuilder( - int index) { - return getGrantsFieldBuilder().addBuilder( - index, io.opentdf.platform.kasregistry.KeyAccessServer.getDefaultInstance()); - } - /** - *
-     * list of key access servers
-     * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - public java.util.List - getGrantsBuilderList() { - return getGrantsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder> - getGrantsFieldBuilder() { - if (grantsBuilder_ == null) { - grantsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.kasregistry.KeyAccessServer, io.opentdf.platform.kasregistry.KeyAccessServer.Builder, io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder>( - grants_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - grants_ = null; - } - return grantsBuilder_; - } - - private java.lang.Object fqn_ = ""; - /** - * string fqn = 6 [json_name = "fqn"]; - * @return The fqn. - */ - public java.lang.String getFqn() { - java.lang.Object ref = fqn_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fqn_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string fqn = 6 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - public com.google.protobuf.ByteString - getFqnBytes() { - java.lang.Object ref = fqn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fqn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string fqn = 6 [json_name = "fqn"]; - * @param value The fqn to set. - * @return This builder for chaining. - */ - public Builder setFqn( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fqn_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * string fqn = 6 [json_name = "fqn"]; - * @return This builder for chaining. - */ - public Builder clearFqn() { - fqn_ = getDefaultInstance().getFqn(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * string fqn = 6 [json_name = "fqn"]; - * @param value The bytes for fqn to set. - * @return This builder for chaining. - */ - public Builder setFqnBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fqn_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue active_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> activeBuilder_; - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - * @return Whether the active field is set. - */ - public boolean hasActive() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - * @return The active. - */ - public com.google.protobuf.BoolValue getActive() { - if (activeBuilder_ == null) { - return active_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } else { - return activeBuilder_.getMessage(); - } - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - public Builder setActive(com.google.protobuf.BoolValue value) { - if (activeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - active_ = value; - } else { - activeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - public Builder setActive( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (activeBuilder_ == null) { - active_ = builderForValue.build(); - } else { - activeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - public Builder mergeActive(com.google.protobuf.BoolValue value) { - if (activeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - active_ != null && - active_ != com.google.protobuf.BoolValue.getDefaultInstance()) { - getActiveBuilder().mergeFrom(value); - } else { - active_ = value; - } - } else { - activeBuilder_.mergeFrom(value); - } - if (active_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - public Builder clearActive() { - bitField0_ = (bitField0_ & ~0x00000040); - active_ = null; - if (activeBuilder_ != null) { - activeBuilder_.dispose(); - activeBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - public com.google.protobuf.BoolValue.Builder getActiveBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getActiveFieldBuilder().getBuilder(); - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - public com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder() { - if (activeBuilder_ != null) { - return activeBuilder_.getMessageOrBuilder(); - } else { - return active_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : active_; - } - } - /** - *
-     * active by default until explicitly deactivated
-     * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getActiveFieldBuilder() { - if (activeBuilder_ == null) { - activeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getActive(), - getParentForChildren(), - isClean()); - active_ = null; - } - return activeBuilder_; - } - - private java.util.List subjectMappings_ = - java.util.Collections.emptyList(); - private void ensureSubjectMappingsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - subjectMappings_ = new java.util.ArrayList(subjectMappings_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingsBuilder_; - - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public java.util.List getSubjectMappingsList() { - if (subjectMappingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectMappings_); - } else { - return subjectMappingsBuilder_.getMessageList(); - } - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public int getSubjectMappingsCount() { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.size(); - } else { - return subjectMappingsBuilder_.getCount(); - } - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.get(index); - } else { - return subjectMappingsBuilder_.getMessage(index); - } - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder setSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.set(index, value); - onChanged(); - } else { - subjectMappingsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder setSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(value); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(index, value); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder addAllSubjectMappings( - java.lang.Iterable values) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectMappings_); - onChanged(); - } else { - subjectMappingsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder clearSubjectMappings() { - if (subjectMappingsBuilder_ == null) { - subjectMappings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - subjectMappingsBuilder_.clear(); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public Builder removeSubjectMappings(int index) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.remove(index); - onChanged(); - } else { - subjectMappingsBuilder_.remove(index); - } - return this; - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingsBuilder( - int index) { - return getSubjectMappingsFieldBuilder().getBuilder(index); - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index) { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.get(index); } else { - return subjectMappingsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public java.util.List - getSubjectMappingsOrBuilderList() { - if (subjectMappingsBuilder_ != null) { - return subjectMappingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectMappings_); - } - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder() { - return getSubjectMappingsFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder( - int index) { - return getSubjectMappingsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); - } - /** - *
-     * subject mapping
-     * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - public java.util.List - getSubjectMappingsBuilderList() { - return getSubjectMappingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> - getSubjectMappingsFieldBuilder() { - if (subjectMappingsBuilder_ == null) { - subjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( - subjectMappings_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - subjectMappings_ = null; - } - return subjectMappingsBuilder_; - } - - private io.opentdf.platform.common.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000100); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.Value) - } - - // @@protoc_insertion_point(class_scope:policy.Value) - private static final io.opentdf.platform.policy.Value DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.Value(); - } - - public static io.opentdf.platform.policy.Value getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Value parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.Value getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/ValueOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/ValueOrBuilder.java deleted file mode 100644 index 9f79c4e9..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/ValueOrBuilder.java +++ /dev/null @@ -1,255 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/objects.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy; - -public interface ValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.Value) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * generated uuid in database
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * generated uuid in database
-   * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - boolean hasAttribute(); - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - * @return The attribute. - */ - io.opentdf.platform.policy.Attribute getAttribute(); - /** - * .policy.Attribute attribute = 2 [json_name = "attribute"]; - */ - io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); - - /** - * string value = 3 [json_name = "value"]; - * @return The value. - */ - java.lang.String getValue(); - /** - * string value = 3 [json_name = "value"]; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - java.util.List - getMembersList(); - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - io.opentdf.platform.policy.Value getMembers(int index); - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - int getMembersCount(); - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - java.util.List - getMembersOrBuilderList(); - /** - *
-   * list of attribute values that this value is related to (attribute group)
-   * 
- * - * repeated .policy.Value members = 4 [json_name = "members"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getMembersOrBuilder( - int index); - - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - java.util.List - getGrantsList(); - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServer getGrants(int index); - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - int getGrantsCount(); - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - java.util.List - getGrantsOrBuilderList(); - /** - *
-   * list of key access servers
-   * 
- * - * repeated .kasregistry.KeyAccessServer grants = 5 [json_name = "grants"]; - */ - io.opentdf.platform.kasregistry.KeyAccessServerOrBuilder getGrantsOrBuilder( - int index); - - /** - * string fqn = 6 [json_name = "fqn"]; - * @return The fqn. - */ - java.lang.String getFqn(); - /** - * string fqn = 6 [json_name = "fqn"]; - * @return The bytes for fqn. - */ - com.google.protobuf.ByteString - getFqnBytes(); - - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - * @return Whether the active field is set. - */ - boolean hasActive(); - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - * @return The active. - */ - com.google.protobuf.BoolValue getActive(); - /** - *
-   * active by default until explicitly deactivated
-   * 
- * - * .google.protobuf.BoolValue active = 7 [json_name = "active"]; - */ - com.google.protobuf.BoolValueOrBuilder getActiveOrBuilder(); - - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - java.util.List - getSubjectMappingsList(); - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index); - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - int getSubjectMappingsCount(); - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - java.util.List - getSubjectMappingsOrBuilderList(); - /** - *
-   * subject mapping
-   * 
- * - * repeated .policy.SubjectMapping subject_mappings = 8 [json_name = "subjectMappings"]; - */ - io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index); - - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.Metadata metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequest.java deleted file mode 100644 index 96752c7c..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequest.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.AssignKeyAccessServerToAttributeRequest} - */ -public final class AssignKeyAccessServerToAttributeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.AssignKeyAccessServerToAttributeRequest) - AssignKeyAccessServerToAttributeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AssignKeyAccessServerToAttributeRequest.newBuilder() to construct. - private AssignKeyAccessServerToAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AssignKeyAccessServerToAttributeRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AssignKeyAccessServerToAttributeRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - @java.lang.Override - public boolean hasAttributeKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttributeKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttributeKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest other = (io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest) obj; - - if (hasAttributeKeyAccessServer() != other.hasAttributeKeyAccessServer()) return false; - if (hasAttributeKeyAccessServer()) { - if (!getAttributeKeyAccessServer() - .equals(other.getAttributeKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttributeKeyAccessServer()) { - hash = (37 * hash) + ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getAttributeKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.AssignKeyAccessServerToAttributeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.AssignKeyAccessServerToAttributeRequest) - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeKeyAccessServer_ = null; - if (attributeKeyAccessServerBuilder_ != null) { - attributeKeyAccessServerBuilder_.dispose(); - attributeKeyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest build() { - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest buildPartial() { - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest result = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeKeyAccessServer_ = attributeKeyAccessServerBuilder_ == null - ? attributeKeyAccessServer_ - : attributeKeyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest other) { - if (other == io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.getDefaultInstance()) return this; - if (other.hasAttributeKeyAccessServer()) { - mergeAttributeKeyAccessServer(other.getAttributeKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> attributeKeyAccessServerBuilder_; - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - public boolean hasAttributeKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { - if (attributeKeyAccessServerBuilder_ == null) { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } else { - return attributeKeyAccessServerBuilder_.getMessage(); - } - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder setAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { - if (attributeKeyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attributeKeyAccessServer_ = value; - } else { - attributeKeyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder setAttributeKeyAccessServer( - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder builderForValue) { - if (attributeKeyAccessServerBuilder_ == null) { - attributeKeyAccessServer_ = builderForValue.build(); - } else { - attributeKeyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder mergeAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { - if (attributeKeyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attributeKeyAccessServer_ != null && - attributeKeyAccessServer_ != io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) { - getAttributeKeyAccessServerBuilder().mergeFrom(value); - } else { - attributeKeyAccessServer_ = value; - } - } else { - attributeKeyAccessServerBuilder_.mergeFrom(value); - } - if (attributeKeyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder clearAttributeKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - attributeKeyAccessServer_ = null; - if (attributeKeyAccessServerBuilder_ != null) { - attributeKeyAccessServerBuilder_.dispose(); - attributeKeyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder getAttributeKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { - if (attributeKeyAccessServerBuilder_ != null) { - return attributeKeyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return attributeKeyAccessServer_ == null ? - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> - getAttributeKeyAccessServerFieldBuilder() { - if (attributeKeyAccessServerBuilder_ == null) { - attributeKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder>( - getAttributeKeyAccessServer(), - getParentForChildren(), - isClean()); - attributeKeyAccessServer_ = null; - } - return attributeKeyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.AssignKeyAccessServerToAttributeRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.AssignKeyAccessServerToAttributeRequest) - private static final io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest(); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AssignKeyAccessServerToAttributeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequestOrBuilder.java deleted file mode 100644 index a50a7da5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeRequestOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface AssignKeyAccessServerToAttributeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.AssignKeyAccessServerToAttributeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - boolean hasAttributeKeyAccessServer(); - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer(); - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponse.java deleted file mode 100644 index ed36fdbc..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.AssignKeyAccessServerToAttributeResponse} - */ -public final class AssignKeyAccessServerToAttributeResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.AssignKeyAccessServerToAttributeResponse) - AssignKeyAccessServerToAttributeResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AssignKeyAccessServerToAttributeResponse.newBuilder() to construct. - private AssignKeyAccessServerToAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AssignKeyAccessServerToAttributeResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AssignKeyAccessServerToAttributeResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - @java.lang.Override - public boolean hasAttributeKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttributeKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttributeKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse other = (io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse) obj; - - if (hasAttributeKeyAccessServer() != other.hasAttributeKeyAccessServer()) return false; - if (hasAttributeKeyAccessServer()) { - if (!getAttributeKeyAccessServer() - .equals(other.getAttributeKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttributeKeyAccessServer()) { - hash = (37 * hash) + ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getAttributeKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.AssignKeyAccessServerToAttributeResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.AssignKeyAccessServerToAttributeResponse) - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeKeyAccessServer_ = null; - if (attributeKeyAccessServerBuilder_ != null) { - attributeKeyAccessServerBuilder_.dispose(); - attributeKeyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse build() { - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse buildPartial() { - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse result = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeKeyAccessServer_ = attributeKeyAccessServerBuilder_ == null - ? attributeKeyAccessServer_ - : attributeKeyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse other) { - if (other == io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.getDefaultInstance()) return this; - if (other.hasAttributeKeyAccessServer()) { - mergeAttributeKeyAccessServer(other.getAttributeKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> attributeKeyAccessServerBuilder_; - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - public boolean hasAttributeKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { - if (attributeKeyAccessServerBuilder_ == null) { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } else { - return attributeKeyAccessServerBuilder_.getMessage(); - } - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder setAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { - if (attributeKeyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attributeKeyAccessServer_ = value; - } else { - attributeKeyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder setAttributeKeyAccessServer( - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder builderForValue) { - if (attributeKeyAccessServerBuilder_ == null) { - attributeKeyAccessServer_ = builderForValue.build(); - } else { - attributeKeyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder mergeAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { - if (attributeKeyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attributeKeyAccessServer_ != null && - attributeKeyAccessServer_ != io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) { - getAttributeKeyAccessServerBuilder().mergeFrom(value); - } else { - attributeKeyAccessServer_ = value; - } - } else { - attributeKeyAccessServerBuilder_.mergeFrom(value); - } - if (attributeKeyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder clearAttributeKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - attributeKeyAccessServer_ = null; - if (attributeKeyAccessServerBuilder_ != null) { - attributeKeyAccessServerBuilder_.dispose(); - attributeKeyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder getAttributeKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { - if (attributeKeyAccessServerBuilder_ != null) { - return attributeKeyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return attributeKeyAccessServer_ == null ? - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> - getAttributeKeyAccessServerFieldBuilder() { - if (attributeKeyAccessServerBuilder_ == null) { - attributeKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder>( - getAttributeKeyAccessServer(), - getParentForChildren(), - isClean()); - attributeKeyAccessServer_ = null; - } - return attributeKeyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.AssignKeyAccessServerToAttributeResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.AssignKeyAccessServerToAttributeResponse) - private static final io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse(); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AssignKeyAccessServerToAttributeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponseOrBuilder.java deleted file mode 100644 index 9a301d8b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToAttributeResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface AssignKeyAccessServerToAttributeResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.AssignKeyAccessServerToAttributeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - boolean hasAttributeKeyAccessServer(); - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer(); - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequest.java deleted file mode 100644 index 52f2d837..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequest.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.AssignKeyAccessServerToValueRequest} - */ -public final class AssignKeyAccessServerToValueRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.AssignKeyAccessServerToValueRequest) - AssignKeyAccessServerToValueRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AssignKeyAccessServerToValueRequest.newBuilder() to construct. - private AssignKeyAccessServerToValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AssignKeyAccessServerToValueRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AssignKeyAccessServerToValueRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.Builder.class); - } - - private int bitField0_; - public static final int VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - @java.lang.Override - public boolean hasValueKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getValueKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValueKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest other = (io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest) obj; - - if (hasValueKeyAccessServer() != other.hasValueKeyAccessServer()) return false; - if (hasValueKeyAccessServer()) { - if (!getValueKeyAccessServer() - .equals(other.getValueKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValueKeyAccessServer()) { - hash = (37 * hash) + VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getValueKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.AssignKeyAccessServerToValueRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.AssignKeyAccessServerToValueRequest) - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueKeyAccessServer_ = null; - if (valueKeyAccessServerBuilder_ != null) { - valueKeyAccessServerBuilder_.dispose(); - valueKeyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest build() { - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest buildPartial() { - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest result = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.valueKeyAccessServer_ = valueKeyAccessServerBuilder_ == null - ? valueKeyAccessServer_ - : valueKeyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest other) { - if (other == io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.getDefaultInstance()) return this; - if (other.hasValueKeyAccessServer()) { - mergeValueKeyAccessServer(other.getValueKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValueKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> valueKeyAccessServerBuilder_; - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - public boolean hasValueKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { - if (valueKeyAccessServerBuilder_ == null) { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } else { - return valueKeyAccessServerBuilder_.getMessage(); - } - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder setValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { - if (valueKeyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - valueKeyAccessServer_ = value; - } else { - valueKeyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder setValueKeyAccessServer( - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder builderForValue) { - if (valueKeyAccessServerBuilder_ == null) { - valueKeyAccessServer_ = builderForValue.build(); - } else { - valueKeyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder mergeValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { - if (valueKeyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - valueKeyAccessServer_ != null && - valueKeyAccessServer_ != io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) { - getValueKeyAccessServerBuilder().mergeFrom(value); - } else { - valueKeyAccessServer_ = value; - } - } else { - valueKeyAccessServerBuilder_.mergeFrom(value); - } - if (valueKeyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder clearValueKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - valueKeyAccessServer_ = null; - if (valueKeyAccessServerBuilder_ != null) { - valueKeyAccessServerBuilder_.dispose(); - valueKeyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder getValueKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValueKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { - if (valueKeyAccessServerBuilder_ != null) { - return valueKeyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return valueKeyAccessServer_ == null ? - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> - getValueKeyAccessServerFieldBuilder() { - if (valueKeyAccessServerBuilder_ == null) { - valueKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder>( - getValueKeyAccessServer(), - getParentForChildren(), - isClean()); - valueKeyAccessServer_ = null; - } - return valueKeyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.AssignKeyAccessServerToValueRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.AssignKeyAccessServerToValueRequest) - private static final io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest(); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AssignKeyAccessServerToValueRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequestOrBuilder.java deleted file mode 100644 index 7f171798..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueRequestOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface AssignKeyAccessServerToValueRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.AssignKeyAccessServerToValueRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - boolean hasValueKeyAccessServer(); - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer(); - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponse.java deleted file mode 100644 index bacef231..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.AssignKeyAccessServerToValueResponse} - */ -public final class AssignKeyAccessServerToValueResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.AssignKeyAccessServerToValueResponse) - AssignKeyAccessServerToValueResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AssignKeyAccessServerToValueResponse.newBuilder() to construct. - private AssignKeyAccessServerToValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AssignKeyAccessServerToValueResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AssignKeyAccessServerToValueResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.Builder.class); - } - - private int bitField0_; - public static final int VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - @java.lang.Override - public boolean hasValueKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getValueKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValueKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse other = (io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse) obj; - - if (hasValueKeyAccessServer() != other.hasValueKeyAccessServer()) return false; - if (hasValueKeyAccessServer()) { - if (!getValueKeyAccessServer() - .equals(other.getValueKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValueKeyAccessServer()) { - hash = (37 * hash) + VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getValueKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.AssignKeyAccessServerToValueResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.AssignKeyAccessServerToValueResponse) - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.class, io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueKeyAccessServer_ = null; - if (valueKeyAccessServerBuilder_ != null) { - valueKeyAccessServerBuilder_.dispose(); - valueKeyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse build() { - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse buildPartial() { - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse result = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.valueKeyAccessServer_ = valueKeyAccessServerBuilder_ == null - ? valueKeyAccessServer_ - : valueKeyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse other) { - if (other == io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.getDefaultInstance()) return this; - if (other.hasValueKeyAccessServer()) { - mergeValueKeyAccessServer(other.getValueKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValueKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> valueKeyAccessServerBuilder_; - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - public boolean hasValueKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { - if (valueKeyAccessServerBuilder_ == null) { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } else { - return valueKeyAccessServerBuilder_.getMessage(); - } - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder setValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { - if (valueKeyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - valueKeyAccessServer_ = value; - } else { - valueKeyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder setValueKeyAccessServer( - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder builderForValue) { - if (valueKeyAccessServerBuilder_ == null) { - valueKeyAccessServer_ = builderForValue.build(); - } else { - valueKeyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder mergeValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { - if (valueKeyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - valueKeyAccessServer_ != null && - valueKeyAccessServer_ != io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) { - getValueKeyAccessServerBuilder().mergeFrom(value); - } else { - valueKeyAccessServer_ = value; - } - } else { - valueKeyAccessServerBuilder_.mergeFrom(value); - } - if (valueKeyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder clearValueKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - valueKeyAccessServer_ = null; - if (valueKeyAccessServerBuilder_ != null) { - valueKeyAccessServerBuilder_.dispose(); - valueKeyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder getValueKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValueKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { - if (valueKeyAccessServerBuilder_ != null) { - return valueKeyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return valueKeyAccessServer_ == null ? - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> - getValueKeyAccessServerFieldBuilder() { - if (valueKeyAccessServerBuilder_ == null) { - valueKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder>( - getValueKeyAccessServer(), - getParentForChildren(), - isClean()); - valueKeyAccessServer_ = null; - } - return valueKeyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.AssignKeyAccessServerToValueResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.AssignKeyAccessServerToValueResponse) - private static final io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse(); - } - - public static io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AssignKeyAccessServerToValueResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponseOrBuilder.java deleted file mode 100644 index 9bdfec88..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AssignKeyAccessServerToValueResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface AssignKeyAccessServerToValueResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.AssignKeyAccessServerToValueResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - boolean hasValueKeyAccessServer(); - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer(); - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServer.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServer.java deleted file mode 100644 index 16ae1bf5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServer.java +++ /dev/null @@ -1,678 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.AttributeKeyAccessServer} - */ -public final class AttributeKeyAccessServer extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.AttributeKeyAccessServer) - AttributeKeyAccessServerOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttributeKeyAccessServer.newBuilder() to construct. - private AttributeKeyAccessServer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttributeKeyAccessServer() { - attributeId_ = ""; - keyAccessServerId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttributeKeyAccessServer(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.class, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder.class); - } - - public static final int ATTRIBUTE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object attributeId_ = ""; - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @return The attributeId. - */ - @java.lang.Override - public java.lang.String getAttributeId() { - java.lang.Object ref = attributeId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeId_ = s; - return s; - } - } - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @return The bytes for attributeId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttributeIdBytes() { - java.lang.Object ref = attributeId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KEY_ACCESS_SERVER_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object keyAccessServerId_ = ""; - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The keyAccessServerId. - */ - @java.lang.Override - public java.lang.String getKeyAccessServerId() { - java.lang.Object ref = keyAccessServerId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyAccessServerId_ = s; - return s; - } - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The bytes for keyAccessServerId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKeyAccessServerIdBytes() { - java.lang.Object ref = keyAccessServerId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - keyAccessServerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyAccessServerId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyAccessServerId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyAccessServerId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyAccessServerId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.AttributeKeyAccessServer)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer other = (io.opentdf.platform.policy.attributes.AttributeKeyAccessServer) obj; - - if (!getAttributeId() - .equals(other.getAttributeId())) return false; - if (!getKeyAccessServerId() - .equals(other.getKeyAccessServerId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ATTRIBUTE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeId().hashCode(); - hash = (37 * hash) + KEY_ACCESS_SERVER_ID_FIELD_NUMBER; - hash = (53 * hash) + getKeyAccessServerId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.AttributeKeyAccessServer} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.AttributeKeyAccessServer) - io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.class, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeId_ = ""; - keyAccessServerId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_AttributeKeyAccessServer_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer build() { - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer buildPartial() { - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer result = new io.opentdf.platform.policy.attributes.AttributeKeyAccessServer(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeId_ = attributeId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.keyAccessServerId_ = keyAccessServerId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.AttributeKeyAccessServer) { - return mergeFrom((io.opentdf.platform.policy.attributes.AttributeKeyAccessServer)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer other) { - if (other == io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) return this; - if (!other.getAttributeId().isEmpty()) { - attributeId_ = other.attributeId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getKeyAccessServerId().isEmpty()) { - keyAccessServerId_ = other.keyAccessServerId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - attributeId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - keyAccessServerId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object attributeId_ = ""; - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @return The attributeId. - */ - public java.lang.String getAttributeId() { - java.lang.Object ref = attributeId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @return The bytes for attributeId. - */ - public com.google.protobuf.ByteString - getAttributeIdBytes() { - java.lang.Object ref = attributeId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @param value The attributeId to set. - * @return This builder for chaining. - */ - public Builder setAttributeId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - attributeId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @return This builder for chaining. - */ - public Builder clearAttributeId() { - attributeId_ = getDefaultInstance().getAttributeId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @param value The bytes for attributeId to set. - * @return This builder for chaining. - */ - public Builder setAttributeIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - attributeId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object keyAccessServerId_ = ""; - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The keyAccessServerId. - */ - public java.lang.String getKeyAccessServerId() { - java.lang.Object ref = keyAccessServerId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyAccessServerId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The bytes for keyAccessServerId. - */ - public com.google.protobuf.ByteString - getKeyAccessServerIdBytes() { - java.lang.Object ref = keyAccessServerId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - keyAccessServerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @param value The keyAccessServerId to set. - * @return This builder for chaining. - */ - public Builder setKeyAccessServerId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - keyAccessServerId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return This builder for chaining. - */ - public Builder clearKeyAccessServerId() { - keyAccessServerId_ = getDefaultInstance().getKeyAccessServerId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @param value The bytes for keyAccessServerId to set. - * @return This builder for chaining. - */ - public Builder setKeyAccessServerIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - keyAccessServerId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.AttributeKeyAccessServer) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.AttributeKeyAccessServer) - private static final io.opentdf.platform.policy.attributes.AttributeKeyAccessServer DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.AttributeKeyAccessServer(); - } - - public static io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttributeKeyAccessServer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServerOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServerOrBuilder.java deleted file mode 100644 index 0648f8e4..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributeKeyAccessServerOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface AttributeKeyAccessServerOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.AttributeKeyAccessServer) - com.google.protobuf.MessageOrBuilder { - - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @return The attributeId. - */ - java.lang.String getAttributeId(); - /** - * string attribute_id = 1 [json_name = "attributeId"]; - * @return The bytes for attributeId. - */ - com.google.protobuf.ByteString - getAttributeIdBytes(); - - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The keyAccessServerId. - */ - java.lang.String getKeyAccessServerId(); - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The bytes for keyAccessServerId. - */ - com.google.protobuf.ByteString - getKeyAccessServerIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesProto.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesProto.java deleted file mode 100644 index 65f533f2..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public final class AttributesProto { - private AttributesProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_AttributeKeyAccessServer_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_AttributeKeyAccessServer_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_ValueKeyAccessServer_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_ValueKeyAccessServer_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_ListAttributesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_ListAttributesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_ListAttributesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_ListAttributesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_GetAttributeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_GetAttributeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_GetAttributeResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_GetAttributeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_CreateAttributeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_CreateAttributeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_CreateAttributeResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_CreateAttributeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_UpdateAttributeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_UpdateAttributeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_UpdateAttributeResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_UpdateAttributeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_DeactivateAttributeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_DeactivateAttributeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_DeactivateAttributeResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_DeactivateAttributeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_GetAttributeValueRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_GetAttributeValueRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_GetAttributeValueResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_GetAttributeValueResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_ListAttributeValuesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_ListAttributeValuesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_ListAttributeValuesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_ListAttributeValuesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_CreateAttributeValueRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_CreateAttributeValueRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_CreateAttributeValueResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_CreateAttributeValueResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_UpdateAttributeValueRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_UpdateAttributeValueResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_DeactivateAttributeValueRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_DeactivateAttributeValueResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\"policy/attributes/attributes.proto\022\021po" + - "licy.attributes\032\033buf/validate/validate.p" + - "roto\032\023common/common.proto\032\034google/api/an" + - "notations.proto\032\024policy/objects.proto\032\026p" + - "olicy/selectors.proto\"n\n\030AttributeKeyAcc" + - "essServer\022!\n\014attribute_id\030\001 \001(\tR\013attribu" + - "teId\022/\n\024key_access_server_id\030\002 \001(\tR\021keyA" + - "ccessServerId\"b\n\024ValueKeyAccessServer\022\031\n" + - "\010value_id\030\001 \001(\tR\007valueId\022/\n\024key_access_s" + - "erver_id\030\002 \001(\tR\021keyAccessServerId\"F\n\025Lis" + - "tAttributesRequest\022-\n\005state\030\001 \001(\0162\027.comm" + - "on.ActiveStateEnumR\005state\"K\n\026ListAttribu" + - "tesResponse\0221\n\nattributes\030\001 \003(\0132\021.policy" + - ".AttributeR\nattributes\"-\n\023GetAttributeRe" + - "quest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"G\n\024GetAttr" + - "ibuteResponse\022/\n\tattribute\030\001 \001(\0132\021.polic" + - "y.AttributeR\tattribute\"\324\001\n\026CreateAttribu" + - "teRequest\022)\n\014namespace_id\030\001 \001(\tB\006\272H\003\310\001\001R" + - "\013namespaceId\022\032\n\004name\030\002 \001(\tB\006\272H\003\310\001\001R\004name" + - "\022>\n\004rule\030\003 \001(\0162\035.policy.AttributeRuleTyp" + - "eEnumB\013\272H\010\202\001\002\020\001\310\001\001R\004rule\0223\n\010metadata\030d \001" + - "(\0132\027.common.MetadataMutableR\010metadata\"J\n" + - "\027CreateAttributeResponse\022/\n\tattribute\030\001 " + - "\001(\0132\021.policy.AttributeR\tattribute\"\273\001\n\026Up" + - "dateAttributeRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001" + - "R\002id\0223\n\010metadata\030d \001(\0132\027.common.Metadata" + - "MutableR\010metadata\022T\n\030metadata_update_beh" + - "avior\030e \001(\0162\032.common.MetadataUpdateEnumR" + - "\026metadataUpdateBehavior\"J\n\027UpdateAttribu" + - "teResponse\022/\n\tattribute\030\001 \001(\0132\021.policy.A" + - "ttributeR\tattribute\"4\n\032DeactivateAttribu" + - "teRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"N\n\033Dea" + - "ctivateAttributeResponse\022/\n\tattribute\030\001 " + - "\001(\0132\021.policy.AttributeR\tattribute\"2\n\030Get" + - "AttributeValueRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001" + - "\001R\002id\"@\n\031GetAttributeValueResponse\022#\n\005va" + - "lue\030\001 \001(\0132\r.policy.ValueR\005value\"v\n\032ListA" + - "ttributeValuesRequest\022)\n\014attribute_id\030\001 " + - "\001(\tB\006\272H\003\310\001\001R\013attributeId\022-\n\005state\030\002 \001(\0162" + - "\027.common.ActiveStateEnumR\005state\"D\n\033ListA" + - "ttributeValuesResponse\022%\n\006values\030\001 \003(\0132\r" + - ".policy.ValueR\006values\"\265\001\n\033CreateAttribut" + - "eValueRequest\022)\n\014attribute_id\030\001 \001(\tB\006\272H\003" + - "\310\001\001R\013attributeId\022\034\n\005value\030\002 \001(\tB\006\272H\003\310\001\001R" + - "\005value\022\030\n\007members\030\003 \003(\tR\007members\0223\n\010meta" + - "data\030d \001(\0132\027.common.MetadataMutableR\010met" + - "adata\"C\n\034CreateAttributeValueResponse\022#\n" + - "\005value\030\001 \001(\0132\r.policy.ValueR\005value\"\332\001\n\033U" + - "pdateAttributeValueRequest\022\026\n\002id\030\001 \001(\tB\006" + - "\272H\003\310\001\001R\002id\022\030\n\007members\030\004 \003(\tR\007members\0223\n\010" + - "metadata\030d \001(\0132\027.common.MetadataMutableR" + - "\010metadata\022T\n\030metadata_update_behavior\030e " + - "\001(\0162\032.common.MetadataUpdateEnumR\026metadat" + - "aUpdateBehavior\"C\n\034UpdateAttributeValueR" + - "esponse\022#\n\005value\030\001 \001(\0132\r.policy.ValueR\005v" + - "alue\"9\n\037DeactivateAttributeValueRequest\022" + - "\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"G\n DeactivateAtt" + - "ributeValueResponse\022#\n\005value\030\001 \001(\0132\r.pol" + - "icy.ValueR\005value\"\204\001\n\037GetAttributeValuesB" + - "yFqnsRequest\022\032\n\004fqns\030\001 \003(\tB\006\272H\003\310\001\001R\004fqns" + - "\022E\n\nwith_value\030\002 \001(\0132\036.policy.AttributeV" + - "alueSelectorB\006\272H\003\310\001\001R\twithValue\"\233\003\n GetA" + - "ttributeValuesByFqnsResponse\022}\n\024fqn_attr" + - "ibute_values\030\001 \003(\0132K.policy.attributes.G" + - "etAttributeValuesByFqnsResponse.FqnAttri" + - "buteValuesEntryR\022fqnAttributeValues\032i\n\021A" + - "ttributeAndValue\022/\n\tattribute\030\001 \001(\0132\021.po" + - "licy.AttributeR\tattribute\022#\n\005value\030\002 \001(\013" + - "2\r.policy.ValueR\005value\032\214\001\n\027FqnAttributeV" + - "aluesEntry\022\020\n\003key\030\001 \001(\tR\003key\022[\n\005value\030\002 " + - "\001(\0132E.policy.attributes.GetAttributeValu" + - "esByFqnsResponse.AttributeAndValueR\005valu" + - "e:\0028\001\"\225\001\n\'AssignKeyAccessServerToAttribu" + - "teRequest\022j\n\033attribute_key_access_server" + - "\030\001 \001(\0132+.policy.attributes.AttributeKeyA" + - "ccessServerR\030attributeKeyAccessServer\"\226\001" + - "\n(AssignKeyAccessServerToAttributeRespon" + - "se\022j\n\033attribute_key_access_server\030\001 \001(\0132" + - "+.policy.attributes.AttributeKeyAccessSe" + - "rverR\030attributeKeyAccessServer\"\227\001\n)Remov" + - "eKeyAccessServerFromAttributeRequest\022j\n\033" + - "attribute_key_access_server\030\001 \001(\0132+.poli" + - "cy.attributes.AttributeKeyAccessServerR\030" + - "attributeKeyAccessServer\"\230\001\n*RemoveKeyAc" + - "cessServerFromAttributeResponse\022j\n\033attri" + - "bute_key_access_server\030\001 \001(\0132+.policy.at" + - "tributes.AttributeKeyAccessServerR\030attri" + - "buteKeyAccessServer\"\205\001\n#AssignKeyAccessS" + - "erverToValueRequest\022^\n\027value_key_access_" + - "server\030\001 \001(\0132\'.policy.attributes.ValueKe" + - "yAccessServerR\024valueKeyAccessServer\"\206\001\n$" + - "AssignKeyAccessServerToValueResponse\022^\n\027" + - "value_key_access_server\030\001 \001(\0132\'.policy.a" + - "ttributes.ValueKeyAccessServerR\024valueKey" + - "AccessServer\"\207\001\n%RemoveKeyAccessServerFr" + - "omValueRequest\022^\n\027value_key_access_serve" + - "r\030\001 \001(\0132\'.policy.attributes.ValueKeyAcce" + - "ssServerR\024valueKeyAccessServer\"\210\001\n&Remov" + - "eKeyAccessServerFromValueResponse\022^\n\027val" + - "ue_key_access_server\030\001 \001(\0132\'.policy.attr" + - "ibutes.ValueKeyAccessServerR\024valueKeyAcc" + - "essServer2\307\023\n\021AttributesService\022g\n\016ListA" + - "ttributes\022(.policy.attributes.ListAttrib" + - "utesRequest\032).policy.attributes.ListAttr" + - "ibutesResponse\"\000\022v\n\023ListAttributeValues\022" + - "-.policy.attributes.ListAttributeValuesR" + - "equest\032..policy.attributes.ListAttribute" + - "ValuesResponse\"\000\022y\n\014GetAttribute\022&.polic" + - "y.attributes.GetAttributeRequest\032\'.polic" + - "y.attributes.GetAttributeResponse\"\030\202\323\344\223\002" + - "\022\022\020/attributes/{id}\022\236\001\n\030GetAttributeValu" + - "esByFqns\0222.policy.attributes.GetAttribut" + - "eValuesByFqnsRequest\0323.policy.attributes" + - ".GetAttributeValuesByFqnsResponse\"\031\202\323\344\223\002" + - "\023\022\021/attributes/*/fqn\022\200\001\n\017CreateAttribute" + - "\022).policy.attributes.CreateAttributeRequ" + - "est\032*.policy.attributes.CreateAttributeR" + - "esponse\"\026\202\323\344\223\002\020\"\013/attributes:\001*\022\205\001\n\017Upda" + - "teAttribute\022).policy.attributes.UpdateAt" + - "tributeRequest\032*.policy.attributes.Updat" + - "eAttributeResponse\"\033\202\323\344\223\002\0252\020/attributes/" + - "{id}:\001*\022\216\001\n\023DeactivateAttribute\022-.policy" + - ".attributes.DeactivateAttributeRequest\032." + - ".policy.attributes.DeactivateAttributeRe" + - "sponse\"\030\202\323\344\223\002\022*\020/attributes/{id}\022\221\001\n\021Get" + - "AttributeValue\022+.policy.attributes.GetAt" + - "tributeValueRequest\032,.policy.attributes." + - "GetAttributeValueResponse\"!\202\323\344\223\002\033\022\031/attr" + - "ibutes/*/values/{id}\022\245\001\n\024CreateAttribute" + - "Value\022..policy.attributes.CreateAttribut" + - "eValueRequest\032/.policy.attributes.Create" + - "AttributeValueResponse\",\202\323\344\223\002&\"!/attribu" + - "tes/{attribute_id}/values:\001*\022\235\001\n\024UpdateA" + - "ttributeValue\022..policy.attributes.Update" + - "AttributeValueRequest\032/.policy.attribute" + - "s.UpdateAttributeValueResponse\"$\202\323\344\223\002\0362\031" + - "/attributes/*/values/{id}:\001*\022\246\001\n\030Deactiv" + - "ateAttributeValue\0222.policy.attributes.De" + - "activateAttributeValueRequest\0323.policy.a" + - "ttributes.DeactivateAttributeValueRespon" + - "se\"!\202\323\344\223\002\033*\031/attributes/*/values/{id}\022\344\001" + - "\n AssignKeyAccessServerToAttribute\022:.pol" + - "icy.attributes.AssignKeyAccessServerToAt" + - "tributeRequest\032;.policy.attributes.Assig" + - "nKeyAccessServerToAttributeResponse\"G\202\323\344" + - "\223\002A\"\"/attributes/keyaccessserver/assign:" + - "\033attribute_key_access_server\022\352\001\n\"RemoveK" + - "eyAccessServerFromAttribute\022<.policy.att" + - "ributes.RemoveKeyAccessServerFromAttribu" + - "teRequest\032=.policy.attributes.RemoveKeyA" + - "ccessServerFromAttributeResponse\"G\202\323\344\223\002A" + - "\"\"/attributes/keyaccessserver/remove:\033at" + - "tribute_key_access_server\022\333\001\n\034AssignKeyA" + - "ccessServerToValue\0226.policy.attributes.A" + - "ssignKeyAccessServerToValueRequest\0327.pol" + - "icy.attributes.AssignKeyAccessServerToVa" + - "lueResponse\"J\202\323\344\223\002D\")/attributes/values/" + - "keyaccessserver/assign:\027value_key_access" + - "_server\022\341\001\n\036RemoveKeyAccessServerFromVal" + - "ue\0228.policy.attributes.RemoveKeyAccessSe" + - "rverFromValueRequest\0329.policy.attributes" + - ".RemoveKeyAccessServerFromValueResponse\"" + - "J\202\323\344\223\002D\")/attributes/values/keyaccessser" + - "ver/remove:\027value_key_access_serverB\235\001\n%" + - "io.opentdf.platform.policy.attributesB\017A" + - "ttributesProtoP\001\242\002\003PAX\252\002\021Policy.Attribut" + - "es\312\002\021Policy\\Attributes\342\002\035Policy\\Attribut" + - "es\\GPBMetadata\352\002\022Policy::Attributesb\006pro" + - "to3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - io.opentdf.platform.common.CommonProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - io.opentdf.platform.policy.ObjectsProto.getDescriptor(), - io.opentdf.platform.policy.SelectorsProto.getDescriptor(), - }); - internal_static_policy_attributes_AttributeKeyAccessServer_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_attributes_AttributeKeyAccessServer_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_AttributeKeyAccessServer_descriptor, - new java.lang.String[] { "AttributeId", "KeyAccessServerId", }); - internal_static_policy_attributes_ValueKeyAccessServer_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_policy_attributes_ValueKeyAccessServer_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_ValueKeyAccessServer_descriptor, - new java.lang.String[] { "ValueId", "KeyAccessServerId", }); - internal_static_policy_attributes_ListAttributesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_policy_attributes_ListAttributesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_ListAttributesRequest_descriptor, - new java.lang.String[] { "State", }); - internal_static_policy_attributes_ListAttributesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_policy_attributes_ListAttributesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_ListAttributesResponse_descriptor, - new java.lang.String[] { "Attributes", }); - internal_static_policy_attributes_GetAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_policy_attributes_GetAttributeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_GetAttributeRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_attributes_GetAttributeResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_policy_attributes_GetAttributeResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_GetAttributeResponse_descriptor, - new java.lang.String[] { "Attribute", }); - internal_static_policy_attributes_CreateAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_policy_attributes_CreateAttributeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_CreateAttributeRequest_descriptor, - new java.lang.String[] { "NamespaceId", "Name", "Rule", "Metadata", }); - internal_static_policy_attributes_CreateAttributeResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_policy_attributes_CreateAttributeResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_CreateAttributeResponse_descriptor, - new java.lang.String[] { "Attribute", }); - internal_static_policy_attributes_UpdateAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_policy_attributes_UpdateAttributeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_UpdateAttributeRequest_descriptor, - new java.lang.String[] { "Id", "Metadata", "MetadataUpdateBehavior", }); - internal_static_policy_attributes_UpdateAttributeResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_policy_attributes_UpdateAttributeResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_UpdateAttributeResponse_descriptor, - new java.lang.String[] { "Attribute", }); - internal_static_policy_attributes_DeactivateAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_policy_attributes_DeactivateAttributeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_DeactivateAttributeRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_attributes_DeactivateAttributeResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_policy_attributes_DeactivateAttributeResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_DeactivateAttributeResponse_descriptor, - new java.lang.String[] { "Attribute", }); - internal_static_policy_attributes_GetAttributeValueRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_policy_attributes_GetAttributeValueRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_GetAttributeValueRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_attributes_GetAttributeValueResponse_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_policy_attributes_GetAttributeValueResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_GetAttributeValueResponse_descriptor, - new java.lang.String[] { "Value", }); - internal_static_policy_attributes_ListAttributeValuesRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_policy_attributes_ListAttributeValuesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_ListAttributeValuesRequest_descriptor, - new java.lang.String[] { "AttributeId", "State", }); - internal_static_policy_attributes_ListAttributeValuesResponse_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_policy_attributes_ListAttributeValuesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_ListAttributeValuesResponse_descriptor, - new java.lang.String[] { "Values", }); - internal_static_policy_attributes_CreateAttributeValueRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_policy_attributes_CreateAttributeValueRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_CreateAttributeValueRequest_descriptor, - new java.lang.String[] { "AttributeId", "Value", "Members", "Metadata", }); - internal_static_policy_attributes_CreateAttributeValueResponse_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_policy_attributes_CreateAttributeValueResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_CreateAttributeValueResponse_descriptor, - new java.lang.String[] { "Value", }); - internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_policy_attributes_UpdateAttributeValueRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor, - new java.lang.String[] { "Id", "Members", "Metadata", "MetadataUpdateBehavior", }); - internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_policy_attributes_UpdateAttributeValueResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor, - new java.lang.String[] { "Value", }); - internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_policy_attributes_DeactivateAttributeValueRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_policy_attributes_DeactivateAttributeValueResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor, - new java.lang.String[] { "Value", }); - internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor, - new java.lang.String[] { "Fqns", "WithValue", }); - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor, - new java.lang.String[] { "FqnAttributeValues", }); - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor = - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor.getNestedTypes().get(0); - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor, - new java.lang.String[] { "Attribute", "Value", }); - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_descriptor = - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor.getNestedTypes().get(1); - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_AssignKeyAccessServerToAttributeRequest_descriptor, - new java.lang.String[] { "AttributeKeyAccessServer", }); - internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_AssignKeyAccessServerToAttributeResponse_descriptor, - new java.lang.String[] { "AttributeKeyAccessServer", }); - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor, - new java.lang.String[] { "AttributeKeyAccessServer", }); - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor, - new java.lang.String[] { "AttributeKeyAccessServer", }); - internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_AssignKeyAccessServerToValueRequest_descriptor, - new java.lang.String[] { "ValueKeyAccessServer", }); - internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_AssignKeyAccessServerToValueResponse_descriptor, - new java.lang.String[] { "ValueKeyAccessServer", }); - internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor, - new java.lang.String[] { "ValueKeyAccessServer", }); - internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor, - new java.lang.String[] { "ValueKeyAccessServer", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - build.buf.validate.ValidateProto.getDescriptor(); - io.opentdf.platform.common.CommonProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - io.opentdf.platform.policy.ObjectsProto.getDescriptor(); - io.opentdf.platform.policy.SelectorsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesServiceGrpc.java deleted file mode 100644 index 5a0569ea..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/AttributesServiceGrpc.java +++ /dev/null @@ -1,1419 +0,0 @@ -package io.opentdf.platform.policy.attributes; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- */
- * / Attribute Service
- * /
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.61.1)", - comments = "Source: policy/attributes/attributes.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class AttributesServiceGrpc { - - private AttributesServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "policy.attributes.AttributesService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListAttributesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAttributes", - requestType = io.opentdf.platform.policy.attributes.ListAttributesRequest.class, - responseType = io.opentdf.platform.policy.attributes.ListAttributesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListAttributesMethod() { - io.grpc.MethodDescriptor getListAttributesMethod; - if ((getListAttributesMethod = AttributesServiceGrpc.getListAttributesMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getListAttributesMethod = AttributesServiceGrpc.getListAttributesMethod) == null) { - AttributesServiceGrpc.getListAttributesMethod = getListAttributesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAttributes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.ListAttributesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.ListAttributesResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("ListAttributes")) - .build(); - } - } - } - return getListAttributesMethod; - } - - private static volatile io.grpc.MethodDescriptor getListAttributeValuesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAttributeValues", - requestType = io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.class, - responseType = io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListAttributeValuesMethod() { - io.grpc.MethodDescriptor getListAttributeValuesMethod; - if ((getListAttributeValuesMethod = AttributesServiceGrpc.getListAttributeValuesMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getListAttributeValuesMethod = AttributesServiceGrpc.getListAttributeValuesMethod) == null) { - AttributesServiceGrpc.getListAttributeValuesMethod = getListAttributeValuesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAttributeValues")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("ListAttributeValues")) - .build(); - } - } - } - return getListAttributeValuesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAttributeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAttribute", - requestType = io.opentdf.platform.policy.attributes.GetAttributeRequest.class, - responseType = io.opentdf.platform.policy.attributes.GetAttributeResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAttributeMethod() { - io.grpc.MethodDescriptor getGetAttributeMethod; - if ((getGetAttributeMethod = AttributesServiceGrpc.getGetAttributeMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getGetAttributeMethod = AttributesServiceGrpc.getGetAttributeMethod) == null) { - AttributesServiceGrpc.getGetAttributeMethod = getGetAttributeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttribute")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.GetAttributeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.GetAttributeResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("GetAttribute")) - .build(); - } - } - } - return getGetAttributeMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAttributeValuesByFqnsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAttributeValuesByFqns", - requestType = io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.class, - responseType = io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAttributeValuesByFqnsMethod() { - io.grpc.MethodDescriptor getGetAttributeValuesByFqnsMethod; - if ((getGetAttributeValuesByFqnsMethod = AttributesServiceGrpc.getGetAttributeValuesByFqnsMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getGetAttributeValuesByFqnsMethod = AttributesServiceGrpc.getGetAttributeValuesByFqnsMethod) == null) { - AttributesServiceGrpc.getGetAttributeValuesByFqnsMethod = getGetAttributeValuesByFqnsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttributeValuesByFqns")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("GetAttributeValuesByFqns")) - .build(); - } - } - } - return getGetAttributeValuesByFqnsMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateAttributeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateAttribute", - requestType = io.opentdf.platform.policy.attributes.CreateAttributeRequest.class, - responseType = io.opentdf.platform.policy.attributes.CreateAttributeResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateAttributeMethod() { - io.grpc.MethodDescriptor getCreateAttributeMethod; - if ((getCreateAttributeMethod = AttributesServiceGrpc.getCreateAttributeMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getCreateAttributeMethod = AttributesServiceGrpc.getCreateAttributeMethod) == null) { - AttributesServiceGrpc.getCreateAttributeMethod = getCreateAttributeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAttribute")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.CreateAttributeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.CreateAttributeResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("CreateAttribute")) - .build(); - } - } - } - return getCreateAttributeMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateAttributeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateAttribute", - requestType = io.opentdf.platform.policy.attributes.UpdateAttributeRequest.class, - responseType = io.opentdf.platform.policy.attributes.UpdateAttributeResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateAttributeMethod() { - io.grpc.MethodDescriptor getUpdateAttributeMethod; - if ((getUpdateAttributeMethod = AttributesServiceGrpc.getUpdateAttributeMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getUpdateAttributeMethod = AttributesServiceGrpc.getUpdateAttributeMethod) == null) { - AttributesServiceGrpc.getUpdateAttributeMethod = getUpdateAttributeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAttribute")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.UpdateAttributeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.UpdateAttributeResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("UpdateAttribute")) - .build(); - } - } - } - return getUpdateAttributeMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeactivateAttributeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeactivateAttribute", - requestType = io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.class, - responseType = io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeactivateAttributeMethod() { - io.grpc.MethodDescriptor getDeactivateAttributeMethod; - if ((getDeactivateAttributeMethod = AttributesServiceGrpc.getDeactivateAttributeMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getDeactivateAttributeMethod = AttributesServiceGrpc.getDeactivateAttributeMethod) == null) { - AttributesServiceGrpc.getDeactivateAttributeMethod = getDeactivateAttributeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeactivateAttribute")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("DeactivateAttribute")) - .build(); - } - } - } - return getDeactivateAttributeMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAttributeValueMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAttributeValue", - requestType = io.opentdf.platform.policy.attributes.GetAttributeValueRequest.class, - responseType = io.opentdf.platform.policy.attributes.GetAttributeValueResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAttributeValueMethod() { - io.grpc.MethodDescriptor getGetAttributeValueMethod; - if ((getGetAttributeValueMethod = AttributesServiceGrpc.getGetAttributeValueMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getGetAttributeValueMethod = AttributesServiceGrpc.getGetAttributeValueMethod) == null) { - AttributesServiceGrpc.getGetAttributeValueMethod = getGetAttributeValueMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttributeValue")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.GetAttributeValueRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.GetAttributeValueResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("GetAttributeValue")) - .build(); - } - } - } - return getGetAttributeValueMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateAttributeValueMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateAttributeValue", - requestType = io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.class, - responseType = io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateAttributeValueMethod() { - io.grpc.MethodDescriptor getCreateAttributeValueMethod; - if ((getCreateAttributeValueMethod = AttributesServiceGrpc.getCreateAttributeValueMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getCreateAttributeValueMethod = AttributesServiceGrpc.getCreateAttributeValueMethod) == null) { - AttributesServiceGrpc.getCreateAttributeValueMethod = getCreateAttributeValueMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAttributeValue")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("CreateAttributeValue")) - .build(); - } - } - } - return getCreateAttributeValueMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateAttributeValueMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateAttributeValue", - requestType = io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.class, - responseType = io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateAttributeValueMethod() { - io.grpc.MethodDescriptor getUpdateAttributeValueMethod; - if ((getUpdateAttributeValueMethod = AttributesServiceGrpc.getUpdateAttributeValueMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getUpdateAttributeValueMethod = AttributesServiceGrpc.getUpdateAttributeValueMethod) == null) { - AttributesServiceGrpc.getUpdateAttributeValueMethod = getUpdateAttributeValueMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAttributeValue")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("UpdateAttributeValue")) - .build(); - } - } - } - return getUpdateAttributeValueMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeactivateAttributeValueMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeactivateAttributeValue", - requestType = io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.class, - responseType = io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeactivateAttributeValueMethod() { - io.grpc.MethodDescriptor getDeactivateAttributeValueMethod; - if ((getDeactivateAttributeValueMethod = AttributesServiceGrpc.getDeactivateAttributeValueMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getDeactivateAttributeValueMethod = AttributesServiceGrpc.getDeactivateAttributeValueMethod) == null) { - AttributesServiceGrpc.getDeactivateAttributeValueMethod = getDeactivateAttributeValueMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeactivateAttributeValue")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("DeactivateAttributeValue")) - .build(); - } - } - } - return getDeactivateAttributeValueMethod; - } - - private static volatile io.grpc.MethodDescriptor getAssignKeyAccessServerToAttributeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AssignKeyAccessServerToAttribute", - requestType = io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.class, - responseType = io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAssignKeyAccessServerToAttributeMethod() { - io.grpc.MethodDescriptor getAssignKeyAccessServerToAttributeMethod; - if ((getAssignKeyAccessServerToAttributeMethod = AttributesServiceGrpc.getAssignKeyAccessServerToAttributeMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getAssignKeyAccessServerToAttributeMethod = AttributesServiceGrpc.getAssignKeyAccessServerToAttributeMethod) == null) { - AttributesServiceGrpc.getAssignKeyAccessServerToAttributeMethod = getAssignKeyAccessServerToAttributeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AssignKeyAccessServerToAttribute")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("AssignKeyAccessServerToAttribute")) - .build(); - } - } - } - return getAssignKeyAccessServerToAttributeMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveKeyAccessServerFromAttributeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveKeyAccessServerFromAttribute", - requestType = io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.class, - responseType = io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveKeyAccessServerFromAttributeMethod() { - io.grpc.MethodDescriptor getRemoveKeyAccessServerFromAttributeMethod; - if ((getRemoveKeyAccessServerFromAttributeMethod = AttributesServiceGrpc.getRemoveKeyAccessServerFromAttributeMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getRemoveKeyAccessServerFromAttributeMethod = AttributesServiceGrpc.getRemoveKeyAccessServerFromAttributeMethod) == null) { - AttributesServiceGrpc.getRemoveKeyAccessServerFromAttributeMethod = getRemoveKeyAccessServerFromAttributeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveKeyAccessServerFromAttribute")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("RemoveKeyAccessServerFromAttribute")) - .build(); - } - } - } - return getRemoveKeyAccessServerFromAttributeMethod; - } - - private static volatile io.grpc.MethodDescriptor getAssignKeyAccessServerToValueMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AssignKeyAccessServerToValue", - requestType = io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.class, - responseType = io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAssignKeyAccessServerToValueMethod() { - io.grpc.MethodDescriptor getAssignKeyAccessServerToValueMethod; - if ((getAssignKeyAccessServerToValueMethod = AttributesServiceGrpc.getAssignKeyAccessServerToValueMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getAssignKeyAccessServerToValueMethod = AttributesServiceGrpc.getAssignKeyAccessServerToValueMethod) == null) { - AttributesServiceGrpc.getAssignKeyAccessServerToValueMethod = getAssignKeyAccessServerToValueMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AssignKeyAccessServerToValue")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("AssignKeyAccessServerToValue")) - .build(); - } - } - } - return getAssignKeyAccessServerToValueMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveKeyAccessServerFromValueMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveKeyAccessServerFromValue", - requestType = io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.class, - responseType = io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveKeyAccessServerFromValueMethod() { - io.grpc.MethodDescriptor getRemoveKeyAccessServerFromValueMethod; - if ((getRemoveKeyAccessServerFromValueMethod = AttributesServiceGrpc.getRemoveKeyAccessServerFromValueMethod) == null) { - synchronized (AttributesServiceGrpc.class) { - if ((getRemoveKeyAccessServerFromValueMethod = AttributesServiceGrpc.getRemoveKeyAccessServerFromValueMethod) == null) { - AttributesServiceGrpc.getRemoveKeyAccessServerFromValueMethod = getRemoveKeyAccessServerFromValueMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveKeyAccessServerFromValue")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.getDefaultInstance())) - .setSchemaDescriptor(new AttributesServiceMethodDescriptorSupplier("RemoveKeyAccessServerFromValue")) - .build(); - } - } - } - return getRemoveKeyAccessServerFromValueMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static AttributesServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AttributesServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AttributesServiceStub(channel, callOptions); - } - }; - return AttributesServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static AttributesServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AttributesServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AttributesServiceBlockingStub(channel, callOptions); - } - }; - return AttributesServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static AttributesServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AttributesServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AttributesServiceFutureStub(channel, callOptions); - } - }; - return AttributesServiceFutureStub.newStub(factory, channel); - } - - /** - *
-   */
-   * / Attribute Service
-   * /
-   * 
- */ - public interface AsyncService { - - /** - *
-     *--------------------------------------*
-     * Attribute RPCs
-     *---------------------------------------
-     * 
- */ - default void listAttributes(io.opentdf.platform.policy.attributes.ListAttributesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAttributesMethod(), responseObserver); - } - - /** - */ - default void listAttributeValues(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAttributeValuesMethod(), responseObserver); - } - - /** - */ - default void getAttribute(io.opentdf.platform.policy.attributes.GetAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAttributeMethod(), responseObserver); - } - - /** - */ - default void getAttributeValuesByFqns(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAttributeValuesByFqnsMethod(), responseObserver); - } - - /** - */ - default void createAttribute(io.opentdf.platform.policy.attributes.CreateAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateAttributeMethod(), responseObserver); - } - - /** - */ - default void updateAttribute(io.opentdf.platform.policy.attributes.UpdateAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateAttributeMethod(), responseObserver); - } - - /** - */ - default void deactivateAttribute(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeactivateAttributeMethod(), responseObserver); - } - - /** - *
-     *--------------------------------------*
-     * Value RPCs
-     *---------------------------------------
-     * 
- */ - default void getAttributeValue(io.opentdf.platform.policy.attributes.GetAttributeValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAttributeValueMethod(), responseObserver); - } - - /** - */ - default void createAttributeValue(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateAttributeValueMethod(), responseObserver); - } - - /** - */ - default void updateAttributeValue(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateAttributeValueMethod(), responseObserver); - } - - /** - */ - default void deactivateAttributeValue(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeactivateAttributeValueMethod(), responseObserver); - } - - /** - *
-     *--------------------------------------*
-     * Attribute <> Key Access Server RPCs
-     *---------------------------------------
-     * 
- */ - default void assignKeyAccessServerToAttribute(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAssignKeyAccessServerToAttributeMethod(), responseObserver); - } - - /** - */ - default void removeKeyAccessServerFromAttribute(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveKeyAccessServerFromAttributeMethod(), responseObserver); - } - - /** - */ - default void assignKeyAccessServerToValue(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAssignKeyAccessServerToValueMethod(), responseObserver); - } - - /** - */ - default void removeKeyAccessServerFromValue(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveKeyAccessServerFromValueMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service AttributesService. - *
-   */
-   * / Attribute Service
-   * /
-   * 
- */ - public static abstract class AttributesServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return AttributesServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service AttributesService. - *
-   */
-   * / Attribute Service
-   * /
-   * 
- */ - public static final class AttributesServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private AttributesServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AttributesServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AttributesServiceStub(channel, callOptions); - } - - /** - *
-     *--------------------------------------*
-     * Attribute RPCs
-     *---------------------------------------
-     * 
- */ - public void listAttributes(io.opentdf.platform.policy.attributes.ListAttributesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAttributesMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void listAttributeValues(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAttributeValuesMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void getAttribute(io.opentdf.platform.policy.attributes.GetAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAttributeMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void getAttributeValuesByFqns(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAttributeValuesByFqnsMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void createAttribute(io.opentdf.platform.policy.attributes.CreateAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateAttributeMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void updateAttribute(io.opentdf.platform.policy.attributes.UpdateAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateAttributeMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void deactivateAttribute(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeactivateAttributeMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     *--------------------------------------*
-     * Value RPCs
-     *---------------------------------------
-     * 
- */ - public void getAttributeValue(io.opentdf.platform.policy.attributes.GetAttributeValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAttributeValueMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void createAttributeValue(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateAttributeValueMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void updateAttributeValue(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateAttributeValueMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void deactivateAttributeValue(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeactivateAttributeValueMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     *--------------------------------------*
-     * Attribute <> Key Access Server RPCs
-     *---------------------------------------
-     * 
- */ - public void assignKeyAccessServerToAttribute(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAssignKeyAccessServerToAttributeMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void removeKeyAccessServerFromAttribute(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveKeyAccessServerFromAttributeMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void assignKeyAccessServerToValue(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAssignKeyAccessServerToValueMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void removeKeyAccessServerFromValue(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveKeyAccessServerFromValueMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service AttributesService. - *
-   */
-   * / Attribute Service
-   * /
-   * 
- */ - public static final class AttributesServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private AttributesServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AttributesServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AttributesServiceBlockingStub(channel, callOptions); - } - - /** - *
-     *--------------------------------------*
-     * Attribute RPCs
-     *---------------------------------------
-     * 
- */ - public io.opentdf.platform.policy.attributes.ListAttributesResponse listAttributes(io.opentdf.platform.policy.attributes.ListAttributesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAttributesMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse listAttributeValues(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAttributeValuesMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.GetAttributeResponse getAttribute(io.opentdf.platform.policy.attributes.GetAttributeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAttributeMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse getAttributeValuesByFqns(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAttributeValuesByFqnsMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.CreateAttributeResponse createAttribute(io.opentdf.platform.policy.attributes.CreateAttributeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateAttributeMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.UpdateAttributeResponse updateAttribute(io.opentdf.platform.policy.attributes.UpdateAttributeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateAttributeMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse deactivateAttribute(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeactivateAttributeMethod(), getCallOptions(), request); - } - - /** - *
-     *--------------------------------------*
-     * Value RPCs
-     *---------------------------------------
-     * 
- */ - public io.opentdf.platform.policy.attributes.GetAttributeValueResponse getAttributeValue(io.opentdf.platform.policy.attributes.GetAttributeValueRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAttributeValueMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse createAttributeValue(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateAttributeValueMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse updateAttributeValue(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateAttributeValueMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse deactivateAttributeValue(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeactivateAttributeValueMethod(), getCallOptions(), request); - } - - /** - *
-     *--------------------------------------*
-     * Attribute <> Key Access Server RPCs
-     *---------------------------------------
-     * 
- */ - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse assignKeyAccessServerToAttribute(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAssignKeyAccessServerToAttributeMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse removeKeyAccessServerFromAttribute(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveKeyAccessServerFromAttributeMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse assignKeyAccessServerToValue(io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAssignKeyAccessServerToValueMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse removeKeyAccessServerFromValue(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveKeyAccessServerFromValueMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service AttributesService. - *
-   */
-   * / Attribute Service
-   * /
-   * 
- */ - public static final class AttributesServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private AttributesServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AttributesServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AttributesServiceFutureStub(channel, callOptions); - } - - /** - *
-     *--------------------------------------*
-     * Attribute RPCs
-     *---------------------------------------
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listAttributes( - io.opentdf.platform.policy.attributes.ListAttributesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAttributesMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture listAttributeValues( - io.opentdf.platform.policy.attributes.ListAttributeValuesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAttributeValuesMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getAttribute( - io.opentdf.platform.policy.attributes.GetAttributeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAttributeMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getAttributeValuesByFqns( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAttributeValuesByFqnsMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture createAttribute( - io.opentdf.platform.policy.attributes.CreateAttributeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateAttributeMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture updateAttribute( - io.opentdf.platform.policy.attributes.UpdateAttributeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateAttributeMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture deactivateAttribute( - io.opentdf.platform.policy.attributes.DeactivateAttributeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeactivateAttributeMethod(), getCallOptions()), request); - } - - /** - *
-     *--------------------------------------*
-     * Value RPCs
-     *---------------------------------------
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getAttributeValue( - io.opentdf.platform.policy.attributes.GetAttributeValueRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAttributeValueMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture createAttributeValue( - io.opentdf.platform.policy.attributes.CreateAttributeValueRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateAttributeValueMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture updateAttributeValue( - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateAttributeValueMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture deactivateAttributeValue( - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeactivateAttributeValueMethod(), getCallOptions()), request); - } - - /** - *
-     *--------------------------------------*
-     * Attribute <> Key Access Server RPCs
-     *---------------------------------------
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture assignKeyAccessServerToAttribute( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAssignKeyAccessServerToAttributeMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeKeyAccessServerFromAttribute( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveKeyAccessServerFromAttributeMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture assignKeyAccessServerToValue( - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAssignKeyAccessServerToValueMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeKeyAccessServerFromValue( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveKeyAccessServerFromValueMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_ATTRIBUTES = 0; - private static final int METHODID_LIST_ATTRIBUTE_VALUES = 1; - private static final int METHODID_GET_ATTRIBUTE = 2; - private static final int METHODID_GET_ATTRIBUTE_VALUES_BY_FQNS = 3; - private static final int METHODID_CREATE_ATTRIBUTE = 4; - private static final int METHODID_UPDATE_ATTRIBUTE = 5; - private static final int METHODID_DEACTIVATE_ATTRIBUTE = 6; - private static final int METHODID_GET_ATTRIBUTE_VALUE = 7; - private static final int METHODID_CREATE_ATTRIBUTE_VALUE = 8; - private static final int METHODID_UPDATE_ATTRIBUTE_VALUE = 9; - private static final int METHODID_DEACTIVATE_ATTRIBUTE_VALUE = 10; - private static final int METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_ATTRIBUTE = 11; - private static final int METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_ATTRIBUTE = 12; - private static final int METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_VALUE = 13; - private static final int METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_VALUE = 14; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_ATTRIBUTES: - serviceImpl.listAttributes((io.opentdf.platform.policy.attributes.ListAttributesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_ATTRIBUTE_VALUES: - serviceImpl.listAttributeValues((io.opentdf.platform.policy.attributes.ListAttributeValuesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ATTRIBUTE: - serviceImpl.getAttribute((io.opentdf.platform.policy.attributes.GetAttributeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ATTRIBUTE_VALUES_BY_FQNS: - serviceImpl.getAttributeValuesByFqns((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_ATTRIBUTE: - serviceImpl.createAttribute((io.opentdf.platform.policy.attributes.CreateAttributeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_ATTRIBUTE: - serviceImpl.updateAttribute((io.opentdf.platform.policy.attributes.UpdateAttributeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DEACTIVATE_ATTRIBUTE: - serviceImpl.deactivateAttribute((io.opentdf.platform.policy.attributes.DeactivateAttributeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ATTRIBUTE_VALUE: - serviceImpl.getAttributeValue((io.opentdf.platform.policy.attributes.GetAttributeValueRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_ATTRIBUTE_VALUE: - serviceImpl.createAttributeValue((io.opentdf.platform.policy.attributes.CreateAttributeValueRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_ATTRIBUTE_VALUE: - serviceImpl.updateAttributeValue((io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DEACTIVATE_ATTRIBUTE_VALUE: - serviceImpl.deactivateAttributeValue((io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_ATTRIBUTE: - serviceImpl.assignKeyAccessServerToAttribute((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_ATTRIBUTE: - serviceImpl.removeKeyAccessServerFromAttribute((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_VALUE: - serviceImpl.assignKeyAccessServerToValue((io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_VALUE: - serviceImpl.removeKeyAccessServerFromValue((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListAttributesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.ListAttributesRequest, - io.opentdf.platform.policy.attributes.ListAttributesResponse>( - service, METHODID_LIST_ATTRIBUTES))) - .addMethod( - getListAttributeValuesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.ListAttributeValuesRequest, - io.opentdf.platform.policy.attributes.ListAttributeValuesResponse>( - service, METHODID_LIST_ATTRIBUTE_VALUES))) - .addMethod( - getGetAttributeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.GetAttributeRequest, - io.opentdf.platform.policy.attributes.GetAttributeResponse>( - service, METHODID_GET_ATTRIBUTE))) - .addMethod( - getGetAttributeValuesByFqnsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest, - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse>( - service, METHODID_GET_ATTRIBUTE_VALUES_BY_FQNS))) - .addMethod( - getCreateAttributeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.CreateAttributeRequest, - io.opentdf.platform.policy.attributes.CreateAttributeResponse>( - service, METHODID_CREATE_ATTRIBUTE))) - .addMethod( - getUpdateAttributeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.UpdateAttributeRequest, - io.opentdf.platform.policy.attributes.UpdateAttributeResponse>( - service, METHODID_UPDATE_ATTRIBUTE))) - .addMethod( - getDeactivateAttributeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.DeactivateAttributeRequest, - io.opentdf.platform.policy.attributes.DeactivateAttributeResponse>( - service, METHODID_DEACTIVATE_ATTRIBUTE))) - .addMethod( - getGetAttributeValueMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.GetAttributeValueRequest, - io.opentdf.platform.policy.attributes.GetAttributeValueResponse>( - service, METHODID_GET_ATTRIBUTE_VALUE))) - .addMethod( - getCreateAttributeValueMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.CreateAttributeValueRequest, - io.opentdf.platform.policy.attributes.CreateAttributeValueResponse>( - service, METHODID_CREATE_ATTRIBUTE_VALUE))) - .addMethod( - getUpdateAttributeValueMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest, - io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse>( - service, METHODID_UPDATE_ATTRIBUTE_VALUE))) - .addMethod( - getDeactivateAttributeValueMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest, - io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse>( - service, METHODID_DEACTIVATE_ATTRIBUTE_VALUE))) - .addMethod( - getAssignKeyAccessServerToAttributeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeRequest, - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToAttributeResponse>( - service, METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_ATTRIBUTE))) - .addMethod( - getRemoveKeyAccessServerFromAttributeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest, - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse>( - service, METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_ATTRIBUTE))) - .addMethod( - getAssignKeyAccessServerToValueMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueRequest, - io.opentdf.platform.policy.attributes.AssignKeyAccessServerToValueResponse>( - service, METHODID_ASSIGN_KEY_ACCESS_SERVER_TO_VALUE))) - .addMethod( - getRemoveKeyAccessServerFromValueMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest, - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse>( - service, METHODID_REMOVE_KEY_ACCESS_SERVER_FROM_VALUE))) - .build(); - } - - private static abstract class AttributesServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - AttributesServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("AttributesService"); - } - } - - private static final class AttributesServiceFileDescriptorSupplier - extends AttributesServiceBaseDescriptorSupplier { - AttributesServiceFileDescriptorSupplier() {} - } - - private static final class AttributesServiceMethodDescriptorSupplier - extends AttributesServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - AttributesServiceMethodDescriptorSupplier(java.lang.String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (AttributesServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AttributesServiceFileDescriptorSupplier()) - .addMethod(getListAttributesMethod()) - .addMethod(getListAttributeValuesMethod()) - .addMethod(getGetAttributeMethod()) - .addMethod(getGetAttributeValuesByFqnsMethod()) - .addMethod(getCreateAttributeMethod()) - .addMethod(getUpdateAttributeMethod()) - .addMethod(getDeactivateAttributeMethod()) - .addMethod(getGetAttributeValueMethod()) - .addMethod(getCreateAttributeValueMethod()) - .addMethod(getUpdateAttributeValueMethod()) - .addMethod(getDeactivateAttributeValueMethod()) - .addMethod(getAssignKeyAccessServerToAttributeMethod()) - .addMethod(getRemoveKeyAccessServerFromAttributeMethod()) - .addMethod(getAssignKeyAccessServerToValueMethod()) - .addMethod(getRemoveKeyAccessServerFromValueMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequest.java deleted file mode 100644 index a198cf41..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequest.java +++ /dev/null @@ -1,1041 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.CreateAttributeRequest} - */ -public final class CreateAttributeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.CreateAttributeRequest) - CreateAttributeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateAttributeRequest.newBuilder() to construct. - private CreateAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateAttributeRequest() { - namespaceId_ = ""; - name_ = ""; - rule_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateAttributeRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.CreateAttributeRequest.class, io.opentdf.platform.policy.attributes.CreateAttributeRequest.Builder.class); - } - - private int bitField0_; - public static final int NAMESPACE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object namespaceId_ = ""; - /** - *
-   * Required
-   * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @return The namespaceId. - */ - @java.lang.Override - public java.lang.String getNamespaceId() { - java.lang.Object ref = namespaceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namespaceId_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @return The bytes for namespaceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNamespaceIdBytes() { - java.lang.Object ref = namespaceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - namespaceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RULE_FIELD_NUMBER = 3; - private int rule_ = 0; - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for rule. - */ - @java.lang.Override public int getRuleValue() { - return rule_; - } - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The rule. - */ - @java.lang.Override public io.opentdf.platform.policy.AttributeRuleTypeEnum getRule() { - io.opentdf.platform.policy.AttributeRuleTypeEnum result = io.opentdf.platform.policy.AttributeRuleTypeEnum.forNumber(rule_); - return result == null ? io.opentdf.platform.policy.AttributeRuleTypeEnum.UNRECOGNIZED : result; - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespaceId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (rule_ != io.opentdf.platform.policy.AttributeRuleTypeEnum.ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(3, rule_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespaceId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (rule_ != io.opentdf.platform.policy.AttributeRuleTypeEnum.ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, rule_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.CreateAttributeRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.CreateAttributeRequest other = (io.opentdf.platform.policy.attributes.CreateAttributeRequest) obj; - - if (!getNamespaceId() - .equals(other.getNamespaceId())) return false; - if (!getName() - .equals(other.getName())) return false; - if (rule_ != other.rule_) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAMESPACE_ID_FIELD_NUMBER; - hash = (53 * hash) + getNamespaceId().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + RULE_FIELD_NUMBER; - hash = (53 * hash) + rule_; - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.CreateAttributeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.CreateAttributeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.CreateAttributeRequest) - io.opentdf.platform.policy.attributes.CreateAttributeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.CreateAttributeRequest.class, io.opentdf.platform.policy.attributes.CreateAttributeRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.CreateAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - namespaceId_ = ""; - name_ = ""; - rule_ = 0; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.CreateAttributeRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeRequest build() { - io.opentdf.platform.policy.attributes.CreateAttributeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeRequest buildPartial() { - io.opentdf.platform.policy.attributes.CreateAttributeRequest result = new io.opentdf.platform.policy.attributes.CreateAttributeRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.CreateAttributeRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.namespaceId_ = namespaceId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.rule_ = rule_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.CreateAttributeRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.CreateAttributeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.CreateAttributeRequest other) { - if (other == io.opentdf.platform.policy.attributes.CreateAttributeRequest.getDefaultInstance()) return this; - if (!other.getNamespaceId().isEmpty()) { - namespaceId_ = other.namespaceId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.rule_ != 0) { - setRuleValue(other.getRuleValue()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - namespaceId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - rule_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object namespaceId_ = ""; - /** - *
-     * Required
-     * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @return The namespaceId. - */ - public java.lang.String getNamespaceId() { - java.lang.Object ref = namespaceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namespaceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @return The bytes for namespaceId. - */ - public com.google.protobuf.ByteString - getNamespaceIdBytes() { - java.lang.Object ref = namespaceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - namespaceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @param value The namespaceId to set. - * @return This builder for chaining. - */ - public Builder setNamespaceId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - namespaceId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearNamespaceId() { - namespaceId_ = getDefaultInstance().getNamespaceId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @param value The bytes for namespaceId to set. - * @return This builder for chaining. - */ - public Builder setNamespaceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - namespaceId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int rule_ = 0; - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for rule. - */ - @java.lang.Override public int getRuleValue() { - return rule_; - } - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for rule to set. - * @return This builder for chaining. - */ - public Builder setRuleValue(int value) { - rule_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The rule. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeRuleTypeEnum getRule() { - io.opentdf.platform.policy.AttributeRuleTypeEnum result = io.opentdf.platform.policy.AttributeRuleTypeEnum.forNumber(rule_); - return result == null ? io.opentdf.platform.policy.AttributeRuleTypeEnum.UNRECOGNIZED : result; - } - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @param value The rule to set. - * @return This builder for chaining. - */ - public Builder setRule(io.opentdf.platform.policy.AttributeRuleTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - rule_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearRule() { - bitField0_ = (bitField0_ & ~0x00000004); - rule_ = 0; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.CreateAttributeRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.CreateAttributeRequest) - private static final io.opentdf.platform.policy.attributes.CreateAttributeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.CreateAttributeRequest(); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateAttributeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequestOrBuilder.java deleted file mode 100644 index e880ffe5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeRequestOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface CreateAttributeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.CreateAttributeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @return The namespaceId. - */ - java.lang.String getNamespaceId(); - /** - *
-   * Required
-   * 
- * - * string namespace_id = 1 [json_name = "namespaceId", (.buf.validate.field) = { ... } - * @return The bytes for namespaceId. - */ - com.google.protobuf.ByteString - getNamespaceIdBytes(); - - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2 [json_name = "name", (.buf.validate.field) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for rule. - */ - int getRuleValue(); - /** - * .policy.AttributeRuleTypeEnum rule = 3 [json_name = "rule", (.buf.validate.field) = { ... } - * @return The rule. - */ - io.opentdf.platform.policy.AttributeRuleTypeEnum getRule(); - - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponse.java deleted file mode 100644 index 64726edc..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.CreateAttributeResponse} - */ -public final class CreateAttributeResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.CreateAttributeResponse) - CreateAttributeResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateAttributeResponse.newBuilder() to construct. - private CreateAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateAttributeResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateAttributeResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.CreateAttributeResponse.class, io.opentdf.platform.policy.attributes.CreateAttributeResponse.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Attribute attribute_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - @java.lang.Override - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - @java.lang.Override - public io.opentdf.platform.policy.Attribute getAttribute() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttribute()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttribute()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.CreateAttributeResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.CreateAttributeResponse other = (io.opentdf.platform.policy.attributes.CreateAttributeResponse) obj; - - if (hasAttribute() != other.hasAttribute()) return false; - if (hasAttribute()) { - if (!getAttribute() - .equals(other.getAttribute())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttribute()) { - hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getAttribute().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.CreateAttributeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.CreateAttributeResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.CreateAttributeResponse) - io.opentdf.platform.policy.attributes.CreateAttributeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.CreateAttributeResponse.class, io.opentdf.platform.policy.attributes.CreateAttributeResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.CreateAttributeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.CreateAttributeResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeResponse build() { - io.opentdf.platform.policy.attributes.CreateAttributeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeResponse buildPartial() { - io.opentdf.platform.policy.attributes.CreateAttributeResponse result = new io.opentdf.platform.policy.attributes.CreateAttributeResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.CreateAttributeResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attribute_ = attributeBuilder_ == null - ? attribute_ - : attributeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.CreateAttributeResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.CreateAttributeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.CreateAttributeResponse other) { - if (other == io.opentdf.platform.policy.attributes.CreateAttributeResponse.getDefaultInstance()) return this; - if (other.hasAttribute()) { - mergeAttribute(other.getAttribute()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Attribute attribute_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - public io.opentdf.platform.policy.Attribute getAttribute() { - if (attributeBuilder_ == null) { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } else { - return attributeBuilder_.getMessage(); - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attribute_ = value; - } else { - attributeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute( - io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributeBuilder_ == null) { - attribute_ = builderForValue.build(); - } else { - attributeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attribute_ != null && - attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { - getAttributeBuilder().mergeFrom(value); - } else { - attribute_ = value; - } - } else { - attributeBuilder_.mergeFrom(value); - } - if (attribute_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder clearAttribute() { - bitField0_ = (bitField0_ & ~0x00000001); - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeFieldBuilder().getBuilder(); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - if (attributeBuilder_ != null) { - return attributeBuilder_.getMessageOrBuilder(); - } else { - return attribute_ == null ? - io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> - getAttributeFieldBuilder() { - if (attributeBuilder_ == null) { - attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( - getAttribute(), - getParentForChildren(), - isClean()); - attribute_ = null; - } - return attributeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.CreateAttributeResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.CreateAttributeResponse) - private static final io.opentdf.platform.policy.attributes.CreateAttributeResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.CreateAttributeResponse(); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateAttributeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponseOrBuilder.java deleted file mode 100644 index c43c8d97..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface CreateAttributeResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.CreateAttributeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - boolean hasAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - io.opentdf.platform.policy.Attribute getAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequest.java deleted file mode 100644 index e9b4b8d3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequest.java +++ /dev/null @@ -1,1188 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.CreateAttributeValueRequest} - */ -public final class CreateAttributeValueRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.CreateAttributeValueRequest) - CreateAttributeValueRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateAttributeValueRequest.newBuilder() to construct. - private CreateAttributeValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateAttributeValueRequest() { - attributeId_ = ""; - value_ = ""; - members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateAttributeValueRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object attributeId_ = ""; - /** - *
-   * Required
-   * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The attributeId. - */ - @java.lang.Override - public java.lang.String getAttributeId() { - java.lang.Object ref = attributeId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeId_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The bytes for attributeId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttributeIdBytes() { - java.lang.Object ref = attributeId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object value_ = ""; - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEMBERS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * Optional
-   * 
- * - * repeated string members = 3 [json_name = "members"]; - * @return A list containing the members. - */ - public com.google.protobuf.ProtocolStringList - getMembersList() { - return members_; - } - /** - *
-   * Optional
-   * 
- * - * repeated string members = 3 [json_name = "members"]; - * @return The count of members. - */ - public int getMembersCount() { - return members_.size(); - } - /** - *
-   * Optional
-   * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param index The index of the element to return. - * @return The members at the given index. - */ - public java.lang.String getMembers(int index) { - return members_.get(index); - } - /** - *
-   * Optional
-   * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - public com.google.protobuf.ByteString - getMembersBytes(int index) { - return members_.getByteString(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - for (int i = 0; i < members_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, members_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - { - int dataSize = 0; - for (int i = 0; i < members_.size(); i++) { - dataSize += computeStringSizeNoTag(members_.getRaw(i)); - } - size += dataSize; - size += 1 * getMembersList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.CreateAttributeValueRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.CreateAttributeValueRequest other = (io.opentdf.platform.policy.attributes.CreateAttributeValueRequest) obj; - - if (!getAttributeId() - .equals(other.getAttributeId())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (!getMembersList() - .equals(other.getMembersList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ATTRIBUTE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeId().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - if (getMembersCount() > 0) { - hash = (37 * hash) + MEMBERS_FIELD_NUMBER; - hash = (53 * hash) + getMembersList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.CreateAttributeValueRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.CreateAttributeValueRequest) - io.opentdf.platform.policy.attributes.CreateAttributeValueRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeId_ = ""; - value_ = ""; - members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeValueRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeValueRequest build() { - io.opentdf.platform.policy.attributes.CreateAttributeValueRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeValueRequest buildPartial() { - io.opentdf.platform.policy.attributes.CreateAttributeValueRequest result = new io.opentdf.platform.policy.attributes.CreateAttributeValueRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeId_ = attributeId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.value_ = value_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - members_.makeImmutable(); - result.members_ = members_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.CreateAttributeValueRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.CreateAttributeValueRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.CreateAttributeValueRequest other) { - if (other == io.opentdf.platform.policy.attributes.CreateAttributeValueRequest.getDefaultInstance()) return this; - if (!other.getAttributeId().isEmpty()) { - attributeId_ = other.attributeId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.members_.isEmpty()) { - if (members_.isEmpty()) { - members_ = other.members_; - bitField0_ |= 0x00000004; - } else { - ensureMembersIsMutable(); - members_.addAll(other.members_); - } - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - attributeId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - value_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureMembersIsMutable(); - members_.add(s); - break; - } // case 26 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object attributeId_ = ""; - /** - *
-     * Required
-     * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The attributeId. - */ - public java.lang.String getAttributeId() { - java.lang.Object ref = attributeId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The bytes for attributeId. - */ - public com.google.protobuf.ByteString - getAttributeIdBytes() { - java.lang.Object ref = attributeId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @param value The attributeId to set. - * @return This builder for chaining. - */ - public Builder setAttributeId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - attributeId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearAttributeId() { - attributeId_ = getDefaultInstance().getAttributeId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @param value The bytes for attributeId to set. - * @return This builder for chaining. - */ - public Builder setAttributeIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - attributeId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - value_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearValue() { - value_ = getDefaultInstance().getValue(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - value_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureMembersIsMutable() { - if (!members_.isModifiable()) { - members_ = new com.google.protobuf.LazyStringArrayList(members_); - } - bitField0_ |= 0x00000004; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @return A list containing the members. - */ - public com.google.protobuf.ProtocolStringList - getMembersList() { - members_.makeImmutable(); - return members_; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @return The count of members. - */ - public int getMembersCount() { - return members_.size(); - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param index The index of the element to return. - * @return The members at the given index. - */ - public java.lang.String getMembers(int index) { - return members_.get(index); - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - public com.google.protobuf.ByteString - getMembersBytes(int index) { - return members_.getByteString(index); - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param index The index to set the value at. - * @param value The members to set. - * @return This builder for chaining. - */ - public Builder setMembers( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureMembersIsMutable(); - members_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param value The members to add. - * @return This builder for chaining. - */ - public Builder addMembers( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureMembersIsMutable(); - members_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param values The members to add. - * @return This builder for chaining. - */ - public Builder addAllMembers( - java.lang.Iterable values) { - ensureMembersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, members_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @return This builder for chaining. - */ - public Builder clearMembers() { - members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004);; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param value The bytes of the members to add. - * @return This builder for chaining. - */ - public Builder addMembersBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureMembersIsMutable(); - members_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.CreateAttributeValueRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.CreateAttributeValueRequest) - private static final io.opentdf.platform.policy.attributes.CreateAttributeValueRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.CreateAttributeValueRequest(); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeValueRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateAttributeValueRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeValueRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequestOrBuilder.java deleted file mode 100644 index 15136a2d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueRequestOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface CreateAttributeValueRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.CreateAttributeValueRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The attributeId. - */ - java.lang.String getAttributeId(); - /** - *
-   * Required
-   * 
- * - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The bytes for attributeId. - */ - com.google.protobuf.ByteString - getAttributeIdBytes(); - - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @return The value. - */ - java.lang.String getValue(); - /** - * string value = 2 [json_name = "value", (.buf.validate.field) = { ... } - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - - /** - *
-   * Optional
-   * 
- * - * repeated string members = 3 [json_name = "members"]; - * @return A list containing the members. - */ - java.util.List - getMembersList(); - /** - *
-   * Optional
-   * 
- * - * repeated string members = 3 [json_name = "members"]; - * @return The count of members. - */ - int getMembersCount(); - /** - *
-   * Optional
-   * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param index The index of the element to return. - * @return The members at the given index. - */ - java.lang.String getMembers(int index); - /** - *
-   * Optional
-   * 
- * - * repeated string members = 3 [json_name = "members"]; - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - com.google.protobuf.ByteString - getMembersBytes(int index); - - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponse.java deleted file mode 100644 index 1e4b388f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.CreateAttributeValueResponse} - */ -public final class CreateAttributeValueResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.CreateAttributeValueResponse) - CreateAttributeValueResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateAttributeValueResponse.newBuilder() to construct. - private CreateAttributeValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateAttributeValueResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateAttributeValueResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.Builder.class); - } - - private int bitField0_; - public static final int VALUE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Value value_; - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getValue() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getValue()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValue()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.CreateAttributeValueResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.CreateAttributeValueResponse other = (io.opentdf.platform.policy.attributes.CreateAttributeValueResponse) obj; - - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue() - .equals(other.getValue())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.CreateAttributeValueResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.CreateAttributeValueResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.CreateAttributeValueResponse) - io.opentdf.platform.policy.attributes.CreateAttributeValueResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_CreateAttributeValueResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse build() { - io.opentdf.platform.policy.attributes.CreateAttributeValueResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse buildPartial() { - io.opentdf.platform.policy.attributes.CreateAttributeValueResponse result = new io.opentdf.platform.policy.attributes.CreateAttributeValueResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.CreateAttributeValueResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.value_ = valueBuilder_ == null - ? value_ - : valueBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.CreateAttributeValueResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.CreateAttributeValueResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.CreateAttributeValueResponse other) { - if (other == io.opentdf.platform.policy.attributes.CreateAttributeValueResponse.getDefaultInstance()) return this; - if (other.hasValue()) { - mergeValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValueFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - public io.opentdf.platform.policy.Value getValue() { - if (valueBuilder_ == null) { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder setValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - } else { - valueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder setValue( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder mergeValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - value_ != null && - value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { - getValueBuilder().mergeFrom(value); - } else { - value_ = value; - } - } else { - valueBuilder_.mergeFrom(value); - } - if (value_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000001); - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public io.opentdf.platform.policy.Value.Builder getValueBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? - io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - getValue(), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.CreateAttributeValueResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.CreateAttributeValueResponse) - private static final io.opentdf.platform.policy.attributes.CreateAttributeValueResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.CreateAttributeValueResponse(); - } - - public static io.opentdf.platform.policy.attributes.CreateAttributeValueResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateAttributeValueResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.CreateAttributeValueResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponseOrBuilder.java deleted file mode 100644 index ea8d358a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/CreateAttributeValueResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface CreateAttributeValueResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.CreateAttributeValueResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - io.opentdf.platform.policy.Value getValue(); - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequest.java deleted file mode 100644 index bbd2b386..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.DeactivateAttributeRequest} - */ -public final class DeactivateAttributeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.DeactivateAttributeRequest) - DeactivateAttributeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeactivateAttributeRequest.newBuilder() to construct. - private DeactivateAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeactivateAttributeRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeactivateAttributeRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.class, io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.DeactivateAttributeRequest other = (io.opentdf.platform.policy.attributes.DeactivateAttributeRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.DeactivateAttributeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.DeactivateAttributeRequest) - io.opentdf.platform.policy.attributes.DeactivateAttributeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.class, io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeRequest build() { - io.opentdf.platform.policy.attributes.DeactivateAttributeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeRequest buildPartial() { - io.opentdf.platform.policy.attributes.DeactivateAttributeRequest result = new io.opentdf.platform.policy.attributes.DeactivateAttributeRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.DeactivateAttributeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.DeactivateAttributeRequest other) { - if (other == io.opentdf.platform.policy.attributes.DeactivateAttributeRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.DeactivateAttributeRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.DeactivateAttributeRequest) - private static final io.opentdf.platform.policy.attributes.DeactivateAttributeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.DeactivateAttributeRequest(); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeactivateAttributeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequestOrBuilder.java deleted file mode 100644 index 74e2a311..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface DeactivateAttributeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.DeactivateAttributeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponse.java deleted file mode 100644 index 43a64cce..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.DeactivateAttributeResponse} - */ -public final class DeactivateAttributeResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.DeactivateAttributeResponse) - DeactivateAttributeResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeactivateAttributeResponse.newBuilder() to construct. - private DeactivateAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeactivateAttributeResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeactivateAttributeResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.class, io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Attribute attribute_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - @java.lang.Override - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - @java.lang.Override - public io.opentdf.platform.policy.Attribute getAttribute() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttribute()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttribute()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.DeactivateAttributeResponse other = (io.opentdf.platform.policy.attributes.DeactivateAttributeResponse) obj; - - if (hasAttribute() != other.hasAttribute()) return false; - if (hasAttribute()) { - if (!getAttribute() - .equals(other.getAttribute())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttribute()) { - hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getAttribute().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.DeactivateAttributeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.DeactivateAttributeResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.DeactivateAttributeResponse) - io.opentdf.platform.policy.attributes.DeactivateAttributeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.class, io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse build() { - io.opentdf.platform.policy.attributes.DeactivateAttributeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse buildPartial() { - io.opentdf.platform.policy.attributes.DeactivateAttributeResponse result = new io.opentdf.platform.policy.attributes.DeactivateAttributeResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.DeactivateAttributeResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attribute_ = attributeBuilder_ == null - ? attribute_ - : attributeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.DeactivateAttributeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.DeactivateAttributeResponse other) { - if (other == io.opentdf.platform.policy.attributes.DeactivateAttributeResponse.getDefaultInstance()) return this; - if (other.hasAttribute()) { - mergeAttribute(other.getAttribute()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Attribute attribute_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - public io.opentdf.platform.policy.Attribute getAttribute() { - if (attributeBuilder_ == null) { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } else { - return attributeBuilder_.getMessage(); - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attribute_ = value; - } else { - attributeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute( - io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributeBuilder_ == null) { - attribute_ = builderForValue.build(); - } else { - attributeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attribute_ != null && - attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { - getAttributeBuilder().mergeFrom(value); - } else { - attribute_ = value; - } - } else { - attributeBuilder_.mergeFrom(value); - } - if (attribute_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder clearAttribute() { - bitField0_ = (bitField0_ & ~0x00000001); - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeFieldBuilder().getBuilder(); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - if (attributeBuilder_ != null) { - return attributeBuilder_.getMessageOrBuilder(); - } else { - return attribute_ == null ? - io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> - getAttributeFieldBuilder() { - if (attributeBuilder_ == null) { - attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( - getAttribute(), - getParentForChildren(), - isClean()); - attribute_ = null; - } - return attributeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.DeactivateAttributeResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.DeactivateAttributeResponse) - private static final io.opentdf.platform.policy.attributes.DeactivateAttributeResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.DeactivateAttributeResponse(); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeactivateAttributeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponseOrBuilder.java deleted file mode 100644 index a2e020f3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface DeactivateAttributeResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.DeactivateAttributeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - boolean hasAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - io.opentdf.platform.policy.Attribute getAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequest.java deleted file mode 100644 index 783b0856..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.DeactivateAttributeValueRequest} - */ -public final class DeactivateAttributeValueRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.DeactivateAttributeValueRequest) - DeactivateAttributeValueRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeactivateAttributeValueRequest.newBuilder() to construct. - private DeactivateAttributeValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeactivateAttributeValueRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeactivateAttributeValueRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest other = (io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.DeactivateAttributeValueRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.DeactivateAttributeValueRequest) - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest build() { - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest buildPartial() { - io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest result = new io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest other) { - if (other == io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.DeactivateAttributeValueRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.DeactivateAttributeValueRequest) - private static final io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest(); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeactivateAttributeValueRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequestOrBuilder.java deleted file mode 100644 index 600ead67..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface DeactivateAttributeValueRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.DeactivateAttributeValueRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponse.java deleted file mode 100644 index 300c9777..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.DeactivateAttributeValueResponse} - */ -public final class DeactivateAttributeValueResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.DeactivateAttributeValueResponse) - DeactivateAttributeValueResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeactivateAttributeValueResponse.newBuilder() to construct. - private DeactivateAttributeValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeactivateAttributeValueResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeactivateAttributeValueResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.Builder.class); - } - - private int bitField0_; - public static final int VALUE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Value value_; - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getValue() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getValue()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValue()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse other = (io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse) obj; - - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue() - .equals(other.getValue())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.DeactivateAttributeValueResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.DeactivateAttributeValueResponse) - io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_DeactivateAttributeValueResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse build() { - io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse buildPartial() { - io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse result = new io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.value_ = valueBuilder_ == null - ? value_ - : valueBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse other) { - if (other == io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse.getDefaultInstance()) return this; - if (other.hasValue()) { - mergeValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValueFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - public io.opentdf.platform.policy.Value getValue() { - if (valueBuilder_ == null) { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder setValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - } else { - valueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder setValue( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder mergeValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - value_ != null && - value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { - getValueBuilder().mergeFrom(value); - } else { - value_ = value; - } - } else { - valueBuilder_.mergeFrom(value); - } - if (value_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000001); - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public io.opentdf.platform.policy.Value.Builder getValueBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? - io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - getValue(), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.DeactivateAttributeValueResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.DeactivateAttributeValueResponse) - private static final io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse(); - } - - public static io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeactivateAttributeValueResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.DeactivateAttributeValueResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponseOrBuilder.java deleted file mode 100644 index bfd44f06..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/DeactivateAttributeValueResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface DeactivateAttributeValueResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.DeactivateAttributeValueResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - io.opentdf.platform.policy.Value getValue(); - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequest.java deleted file mode 100644 index c7572c94..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.GetAttributeRequest} - */ -public final class GetAttributeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeRequest) - GetAttributeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetAttributeRequest.newBuilder() to construct. - private GetAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAttributeRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAttributeRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeRequest.class, io.opentdf.platform.policy.attributes.GetAttributeRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.GetAttributeRequest other = (io.opentdf.platform.policy.attributes.GetAttributeRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.GetAttributeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeRequest) - io.opentdf.platform.policy.attributes.GetAttributeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeRequest.class, io.opentdf.platform.policy.attributes.GetAttributeRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.GetAttributeRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.GetAttributeRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeRequest build() { - io.opentdf.platform.policy.attributes.GetAttributeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeRequest buildPartial() { - io.opentdf.platform.policy.attributes.GetAttributeRequest result = new io.opentdf.platform.policy.attributes.GetAttributeRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeRequest other) { - if (other == io.opentdf.platform.policy.attributes.GetAttributeRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeRequest) - private static final io.opentdf.platform.policy.attributes.GetAttributeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeRequest(); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAttributeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequestOrBuilder.java deleted file mode 100644 index f9d968a3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface GetAttributeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponse.java deleted file mode 100644 index 00e665e5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.GetAttributeResponse} - */ -public final class GetAttributeResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeResponse) - GetAttributeResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetAttributeResponse.newBuilder() to construct. - private GetAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAttributeResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAttributeResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeResponse.class, io.opentdf.platform.policy.attributes.GetAttributeResponse.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Attribute attribute_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - @java.lang.Override - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - @java.lang.Override - public io.opentdf.platform.policy.Attribute getAttribute() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttribute()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttribute()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.GetAttributeResponse other = (io.opentdf.platform.policy.attributes.GetAttributeResponse) obj; - - if (hasAttribute() != other.hasAttribute()) return false; - if (hasAttribute()) { - if (!getAttribute() - .equals(other.getAttribute())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttribute()) { - hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getAttribute().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.GetAttributeResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeResponse) - io.opentdf.platform.policy.attributes.GetAttributeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeResponse.class, io.opentdf.platform.policy.attributes.GetAttributeResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.GetAttributeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.GetAttributeResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeResponse build() { - io.opentdf.platform.policy.attributes.GetAttributeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeResponse buildPartial() { - io.opentdf.platform.policy.attributes.GetAttributeResponse result = new io.opentdf.platform.policy.attributes.GetAttributeResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attribute_ = attributeBuilder_ == null - ? attribute_ - : attributeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeResponse other) { - if (other == io.opentdf.platform.policy.attributes.GetAttributeResponse.getDefaultInstance()) return this; - if (other.hasAttribute()) { - mergeAttribute(other.getAttribute()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Attribute attribute_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - public io.opentdf.platform.policy.Attribute getAttribute() { - if (attributeBuilder_ == null) { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } else { - return attributeBuilder_.getMessage(); - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attribute_ = value; - } else { - attributeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute( - io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributeBuilder_ == null) { - attribute_ = builderForValue.build(); - } else { - attributeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attribute_ != null && - attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { - getAttributeBuilder().mergeFrom(value); - } else { - attribute_ = value; - } - } else { - attributeBuilder_.mergeFrom(value); - } - if (attribute_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder clearAttribute() { - bitField0_ = (bitField0_ & ~0x00000001); - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeFieldBuilder().getBuilder(); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - if (attributeBuilder_ != null) { - return attributeBuilder_.getMessageOrBuilder(); - } else { - return attribute_ == null ? - io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> - getAttributeFieldBuilder() { - if (attributeBuilder_ == null) { - attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( - getAttribute(), - getParentForChildren(), - isClean()); - attribute_ = null; - } - return attributeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeResponse) - private static final io.opentdf.platform.policy.attributes.GetAttributeResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeResponse(); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAttributeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponseOrBuilder.java deleted file mode 100644 index 2814e218..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface GetAttributeResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - boolean hasAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - io.opentdf.platform.policy.Attribute getAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequest.java deleted file mode 100644 index eb0a4578..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequest.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - *
- */
- * / Value RPC messages
- * /
- * 
- * - * Protobuf type {@code policy.attributes.GetAttributeValueRequest} - */ -public final class GetAttributeValueRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValueRequest) - GetAttributeValueRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetAttributeValueRequest.newBuilder() to construct. - private GetAttributeValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAttributeValueRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAttributeValueRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValueRequest.class, io.opentdf.platform.policy.attributes.GetAttributeValueRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValueRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.GetAttributeValueRequest other = (io.opentdf.platform.policy.attributes.GetAttributeValueRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValueRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   */
-   * / Value RPC messages
-   * /
-   * 
- * - * Protobuf type {@code policy.attributes.GetAttributeValueRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValueRequest) - io.opentdf.platform.policy.attributes.GetAttributeValueRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValueRequest.class, io.opentdf.platform.policy.attributes.GetAttributeValueRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.GetAttributeValueRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValueRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.GetAttributeValueRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValueRequest build() { - io.opentdf.platform.policy.attributes.GetAttributeValueRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValueRequest buildPartial() { - io.opentdf.platform.policy.attributes.GetAttributeValueRequest result = new io.opentdf.platform.policy.attributes.GetAttributeValueRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValueRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValueRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValueRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValueRequest other) { - if (other == io.opentdf.platform.policy.attributes.GetAttributeValueRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValueRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValueRequest) - private static final io.opentdf.platform.policy.attributes.GetAttributeValueRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValueRequest(); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValueRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAttributeValueRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValueRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequestOrBuilder.java deleted file mode 100644 index 2250ba3a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface GetAttributeValueRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValueRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponse.java deleted file mode 100644 index 0c117a01..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.GetAttributeValueResponse} - */ -public final class GetAttributeValueResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValueResponse) - GetAttributeValueResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetAttributeValueResponse.newBuilder() to construct. - private GetAttributeValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAttributeValueResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAttributeValueResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValueResponse.class, io.opentdf.platform.policy.attributes.GetAttributeValueResponse.Builder.class); - } - - private int bitField0_; - public static final int VALUE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Value value_; - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getValue() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getValue()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValue()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValueResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.GetAttributeValueResponse other = (io.opentdf.platform.policy.attributes.GetAttributeValueResponse) obj; - - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue() - .equals(other.getValue())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValueResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.GetAttributeValueResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValueResponse) - io.opentdf.platform.policy.attributes.GetAttributeValueResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValueResponse.class, io.opentdf.platform.policy.attributes.GetAttributeValueResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.GetAttributeValueResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValueResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValueResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.GetAttributeValueResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValueResponse build() { - io.opentdf.platform.policy.attributes.GetAttributeValueResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValueResponse buildPartial() { - io.opentdf.platform.policy.attributes.GetAttributeValueResponse result = new io.opentdf.platform.policy.attributes.GetAttributeValueResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValueResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.value_ = valueBuilder_ == null - ? value_ - : valueBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValueResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValueResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValueResponse other) { - if (other == io.opentdf.platform.policy.attributes.GetAttributeValueResponse.getDefaultInstance()) return this; - if (other.hasValue()) { - mergeValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValueFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - public io.opentdf.platform.policy.Value getValue() { - if (valueBuilder_ == null) { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder setValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - } else { - valueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder setValue( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder mergeValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - value_ != null && - value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { - getValueBuilder().mergeFrom(value); - } else { - value_ = value; - } - } else { - valueBuilder_.mergeFrom(value); - } - if (value_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000001); - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public io.opentdf.platform.policy.Value.Builder getValueBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? - io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - getValue(), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValueResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValueResponse) - private static final io.opentdf.platform.policy.attributes.GetAttributeValueResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValueResponse(); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValueResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAttributeValueResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValueResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponseOrBuilder.java deleted file mode 100644 index 1dca509b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValueResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface GetAttributeValueResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValueResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - io.opentdf.platform.policy.Value getValue(); - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequest.java deleted file mode 100644 index fadb332d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequest.java +++ /dev/null @@ -1,840 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsRequest} - */ -public final class GetAttributeValuesByFqnsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValuesByFqnsRequest) - GetAttributeValuesByFqnsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetAttributeValuesByFqnsRequest.newBuilder() to construct. - private GetAttributeValuesByFqnsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAttributeValuesByFqnsRequest() { - fqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAttributeValuesByFqnsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.Builder.class); - } - - private int bitField0_; - public static final int FQNS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList fqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * Required
-   * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @return A list containing the fqns. - */ - public com.google.protobuf.ProtocolStringList - getFqnsList() { - return fqns_; - } - /** - *
-   * Required
-   * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @return The count of fqns. - */ - public int getFqnsCount() { - return fqns_.size(); - } - /** - *
-   * Required
-   * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The fqns at the given index. - */ - public java.lang.String getFqns(int index) { - return fqns_.get(index); - } - /** - *
-   * Required
-   * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the fqns at the given index. - */ - public com.google.protobuf.ByteString - getFqnsBytes(int index) { - return fqns_.getByteString(index); - } - - public static final int WITH_VALUE_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.AttributeValueSelector withValue_; - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - * @return Whether the withValue field is set. - */ - @java.lang.Override - public boolean hasWithValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - * @return The withValue. - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelector getWithValue() { - return withValue_ == null ? io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance() : withValue_; - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeValueSelectorOrBuilder getWithValueOrBuilder() { - return withValue_ == null ? io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance() : withValue_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < fqns_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fqns_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getWithValue()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < fqns_.size(); i++) { - dataSize += computeStringSizeNoTag(fqns_.getRaw(i)); - } - size += dataSize; - size += 1 * getFqnsList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getWithValue()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest other = (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest) obj; - - if (!getFqnsList() - .equals(other.getFqnsList())) return false; - if (hasWithValue() != other.hasWithValue()) return false; - if (hasWithValue()) { - if (!getWithValue() - .equals(other.getWithValue())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFqnsCount() > 0) { - hash = (37 * hash) + FQNS_FIELD_NUMBER; - hash = (53 * hash) + getFqnsList().hashCode(); - } - if (hasWithValue()) { - hash = (37 * hash) + WITH_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getWithValue().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValuesByFqnsRequest) - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWithValueFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - withValue_ = null; - if (withValueBuilder_ != null) { - withValueBuilder_.dispose(); - withValueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest build() { - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest buildPartial() { - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest result = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - fqns_.makeImmutable(); - result.fqns_ = fqns_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.withValue_ = withValueBuilder_ == null - ? withValue_ - : withValueBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest other) { - if (other == io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest.getDefaultInstance()) return this; - if (!other.fqns_.isEmpty()) { - if (fqns_.isEmpty()) { - fqns_ = other.fqns_; - bitField0_ |= 0x00000001; - } else { - ensureFqnsIsMutable(); - fqns_.addAll(other.fqns_); - } - onChanged(); - } - if (other.hasWithValue()) { - mergeWithValue(other.getWithValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureFqnsIsMutable(); - fqns_.add(s); - break; - } // case 10 - case 18: { - input.readMessage( - getWithValueFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringArrayList fqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureFqnsIsMutable() { - if (!fqns_.isModifiable()) { - fqns_ = new com.google.protobuf.LazyStringArrayList(fqns_); - } - bitField0_ |= 0x00000001; - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @return A list containing the fqns. - */ - public com.google.protobuf.ProtocolStringList - getFqnsList() { - fqns_.makeImmutable(); - return fqns_; - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @return The count of fqns. - */ - public int getFqnsCount() { - return fqns_.size(); - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The fqns at the given index. - */ - public java.lang.String getFqns(int index) { - return fqns_.get(index); - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the fqns at the given index. - */ - public com.google.protobuf.ByteString - getFqnsBytes(int index) { - return fqns_.getByteString(index); - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The fqns to set. - * @return This builder for chaining. - */ - public Builder setFqns( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureFqnsIsMutable(); - fqns_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param value The fqns to add. - * @return This builder for chaining. - */ - public Builder addFqns( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureFqnsIsMutable(); - fqns_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param values The fqns to add. - * @return This builder for chaining. - */ - public Builder addAllFqns( - java.lang.Iterable values) { - ensureFqnsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fqns_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearFqns() { - fqns_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param value The bytes of the fqns to add. - * @return This builder for chaining. - */ - public Builder addFqnsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureFqnsIsMutable(); - fqns_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.AttributeValueSelector withValue_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector, io.opentdf.platform.policy.AttributeValueSelector.Builder, io.opentdf.platform.policy.AttributeValueSelectorOrBuilder> withValueBuilder_; - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - * @return Whether the withValue field is set. - */ - public boolean hasWithValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - * @return The withValue. - */ - public io.opentdf.platform.policy.AttributeValueSelector getWithValue() { - if (withValueBuilder_ == null) { - return withValue_ == null ? io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance() : withValue_; - } else { - return withValueBuilder_.getMessage(); - } - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - public Builder setWithValue(io.opentdf.platform.policy.AttributeValueSelector value) { - if (withValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - withValue_ = value; - } else { - withValueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - public Builder setWithValue( - io.opentdf.platform.policy.AttributeValueSelector.Builder builderForValue) { - if (withValueBuilder_ == null) { - withValue_ = builderForValue.build(); - } else { - withValueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - public Builder mergeWithValue(io.opentdf.platform.policy.AttributeValueSelector value) { - if (withValueBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - withValue_ != null && - withValue_ != io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance()) { - getWithValueBuilder().mergeFrom(value); - } else { - withValue_ = value; - } - } else { - withValueBuilder_.mergeFrom(value); - } - if (withValue_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - public Builder clearWithValue() { - bitField0_ = (bitField0_ & ~0x00000002); - withValue_ = null; - if (withValueBuilder_ != null) { - withValueBuilder_.dispose(); - withValueBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.AttributeValueSelector.Builder getWithValueBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getWithValueFieldBuilder().getBuilder(); - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.AttributeValueSelectorOrBuilder getWithValueOrBuilder() { - if (withValueBuilder_ != null) { - return withValueBuilder_.getMessageOrBuilder(); - } else { - return withValue_ == null ? - io.opentdf.platform.policy.AttributeValueSelector.getDefaultInstance() : withValue_; - } - } - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector, io.opentdf.platform.policy.AttributeValueSelector.Builder, io.opentdf.platform.policy.AttributeValueSelectorOrBuilder> - getWithValueFieldBuilder() { - if (withValueBuilder_ == null) { - withValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.AttributeValueSelector, io.opentdf.platform.policy.AttributeValueSelector.Builder, io.opentdf.platform.policy.AttributeValueSelectorOrBuilder>( - getWithValue(), - getParentForChildren(), - isClean()); - withValue_ = null; - } - return withValueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValuesByFqnsRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValuesByFqnsRequest) - private static final io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest(); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAttributeValuesByFqnsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequestOrBuilder.java deleted file mode 100644 index 78b5f3f8..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsRequestOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface GetAttributeValuesByFqnsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValuesByFqnsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @return A list containing the fqns. - */ - java.util.List - getFqnsList(); - /** - *
-   * Required
-   * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @return The count of fqns. - */ - int getFqnsCount(); - /** - *
-   * Required
-   * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The fqns at the given index. - */ - java.lang.String getFqns(int index); - /** - *
-   * Required
-   * 
- * - * repeated string fqns = 1 [json_name = "fqns", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the fqns at the given index. - */ - com.google.protobuf.ByteString - getFqnsBytes(int index); - - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - * @return Whether the withValue field is set. - */ - boolean hasWithValue(); - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - * @return The withValue. - */ - io.opentdf.platform.policy.AttributeValueSelector getWithValue(); - /** - * .policy.AttributeValueSelector with_value = 2 [json_name = "withValue", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.AttributeValueSelectorOrBuilder getWithValueOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponse.java deleted file mode 100644 index e35c1268..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponse.java +++ /dev/null @@ -1,1572 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsResponse} - */ -public final class GetAttributeValuesByFqnsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValuesByFqnsResponse) - GetAttributeValuesByFqnsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetAttributeValuesByFqnsResponse.newBuilder() to construct. - private GetAttributeValuesByFqnsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAttributeValuesByFqnsResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAttributeValuesByFqnsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetFqnAttributeValues(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.Builder.class); - } - - public interface AttributeAndValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - boolean hasAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - io.opentdf.platform.policy.Attribute getAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); - - /** - * .policy.Value value = 2 [json_name = "value"]; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - * .policy.Value value = 2 [json_name = "value"]; - * @return The value. - */ - io.opentdf.platform.policy.Value getValue(); - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); - } - /** - * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue} - */ - public static final class AttributeAndValue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) - AttributeAndValueOrBuilder { - private static final long serialVersionUID = 0L; - // Use AttributeAndValue.newBuilder() to construct. - private AttributeAndValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttributeAndValue() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttributeAndValue(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Attribute attribute_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - @java.lang.Override - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - @java.lang.Override - public io.opentdf.platform.policy.Attribute getAttribute() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - - public static final int VALUE_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.Value value_; - /** - * .policy.Value value = 2 [json_name = "value"]; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.Value value = 2 [json_name = "value"]; - * @return The value. - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getValue() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttribute()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getValue()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttribute()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getValue()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue other = (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) obj; - - if (hasAttribute() != other.hasAttribute()) return false; - if (hasAttribute()) { - if (!getAttribute() - .equals(other.getAttribute())) return false; - } - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue() - .equals(other.getValue())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttribute()) { - hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getAttribute().hashCode(); - } - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeFieldBuilder(); - getValueFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_AttributeAndValue_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue build() { - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue buildPartial() { - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue result = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attribute_ = attributeBuilder_ == null - ? attribute_ - : attributeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.value_ = valueBuilder_ == null - ? value_ - : valueBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) { - return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue other) { - if (other == io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.getDefaultInstance()) return this; - if (other.hasAttribute()) { - mergeAttribute(other.getAttribute()); - } - if (other.hasValue()) { - mergeValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getValueFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Attribute attribute_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - public io.opentdf.platform.policy.Attribute getAttribute() { - if (attributeBuilder_ == null) { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } else { - return attributeBuilder_.getMessage(); - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attribute_ = value; - } else { - attributeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute( - io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributeBuilder_ == null) { - attribute_ = builderForValue.build(); - } else { - attributeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attribute_ != null && - attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { - getAttributeBuilder().mergeFrom(value); - } else { - attribute_ = value; - } - } else { - attributeBuilder_.mergeFrom(value); - } - if (attribute_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder clearAttribute() { - bitField0_ = (bitField0_ & ~0x00000001); - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeFieldBuilder().getBuilder(); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - if (attributeBuilder_ != null) { - return attributeBuilder_.getMessageOrBuilder(); - } else { - return attribute_ == null ? - io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> - getAttributeFieldBuilder() { - if (attributeBuilder_ == null) { - attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( - getAttribute(), - getParentForChildren(), - isClean()); - attribute_ = null; - } - return attributeBuilder_; - } - - private io.opentdf.platform.policy.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; - /** - * .policy.Value value = 2 [json_name = "value"]; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.Value value = 2 [json_name = "value"]; - * @return The value. - */ - public io.opentdf.platform.policy.Value getValue() { - if (valueBuilder_ == null) { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - public Builder setValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - } else { - valueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - public Builder setValue( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - public Builder mergeValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - value_ != null && - value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { - getValueBuilder().mergeFrom(value); - } else { - value_ = value; - } - } else { - valueBuilder_.mergeFrom(value); - } - if (value_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - public io.opentdf.platform.policy.Value.Builder getValueBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? - io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - } - /** - * .policy.Value value = 2 [json_name = "value"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - getValue(), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) - private static final io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue(); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttributeAndValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int FQN_ATTRIBUTE_VALUES_FIELD_NUMBER = 1; - private static final class FqnAttributeValuesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_FqnAttributeValuesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqnAttributeValues_; - private com.google.protobuf.MapField - internalGetFqnAttributeValues() { - if (fqnAttributeValues_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FqnAttributeValuesDefaultEntryHolder.defaultEntry); - } - return fqnAttributeValues_; - } - public int getFqnAttributeValuesCount() { - return internalGetFqnAttributeValues().getMap().size(); - } - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - @java.lang.Override - public boolean containsFqnAttributeValues( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetFqnAttributeValues().getMap().containsKey(key); - } - /** - * Use {@link #getFqnAttributeValuesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getFqnAttributeValues() { - return getFqnAttributeValuesMap(); - } - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - @java.lang.Override - public java.util.Map getFqnAttributeValuesMap() { - return internalGetFqnAttributeValues().getMap(); - } - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - @java.lang.Override - public /* nullable */ -io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrDefault( - java.lang.String key, - /* nullable */ -io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFqnAttributeValues().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetFqnAttributeValues().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetFqnAttributeValues(), - FqnAttributeValuesDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetFqnAttributeValues().getMap().entrySet()) { - com.google.protobuf.MapEntry - fqnAttributeValues__ = FqnAttributeValuesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fqnAttributeValues__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse other = (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse) obj; - - if (!internalGetFqnAttributeValues().equals( - other.internalGetFqnAttributeValues())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetFqnAttributeValues().getMap().isEmpty()) { - hash = (37 * hash) + FQN_ATTRIBUTE_VALUES_FIELD_NUMBER; - hash = (53 * hash) + internalGetFqnAttributeValues().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.GetAttributeValuesByFqnsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.GetAttributeValuesByFqnsResponse) - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetFqnAttributeValues(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableFqnAttributeValues(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.class, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableFqnAttributeValues().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_GetAttributeValuesByFqnsResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse build() { - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse buildPartial() { - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse result = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fqnAttributeValues_ = internalGetFqnAttributeValues().build(FqnAttributeValuesDefaultEntryHolder.defaultEntry); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse other) { - if (other == io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.getDefaultInstance()) return this; - internalGetMutableFqnAttributeValues().mergeFrom( - other.internalGetFqnAttributeValues()); - bitField0_ |= 0x00000001; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.MapEntry - fqnAttributeValues__ = input.readMessage( - FqnAttributeValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableFqnAttributeValues().ensureBuilderMap().put( - fqnAttributeValues__.getKey(), fqnAttributeValues__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private static final class FqnAttributeValuesConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue build(io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValueOrBuilder val) { - if (val instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) { return (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) val; } - return ((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return FqnAttributeValuesDefaultEntryHolder.defaultEntry; - } - }; - private static final FqnAttributeValuesConverter fqnAttributeValuesConverter = new FqnAttributeValuesConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValueOrBuilder, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue, io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder> fqnAttributeValues_; - private com.google.protobuf.MapFieldBuilder - internalGetFqnAttributeValues() { - if (fqnAttributeValues_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(fqnAttributeValuesConverter); - } - return fqnAttributeValues_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableFqnAttributeValues() { - if (fqnAttributeValues_ == null) { - fqnAttributeValues_ = new com.google.protobuf.MapFieldBuilder<>(fqnAttributeValuesConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return fqnAttributeValues_; - } - public int getFqnAttributeValuesCount() { - return internalGetFqnAttributeValues().ensureBuilderMap().size(); - } - /** - *
-     * map of fqns to complete attributes and the one selected value
-     * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - @java.lang.Override - public boolean containsFqnAttributeValues( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetFqnAttributeValues().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getFqnAttributeValuesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getFqnAttributeValues() { - return getFqnAttributeValuesMap(); - } - /** - *
-     * map of fqns to complete attributes and the one selected value
-     * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - @java.lang.Override - public java.util.Map getFqnAttributeValuesMap() { - return internalGetFqnAttributeValues().getImmutableMap(); - } - /** - *
-     * map of fqns to complete attributes and the one selected value
-     * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - @java.lang.Override - public /* nullable */ -io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrDefault( - java.lang.String key, - /* nullable */ -io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableFqnAttributeValues().ensureBuilderMap(); - return map.containsKey(key) ? fqnAttributeValuesConverter.build(map.get(key)) : defaultValue; - } - /** - *
-     * map of fqns to complete attributes and the one selected value
-     * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableFqnAttributeValues().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return fqnAttributeValuesConverter.build(map.get(key)); - } - public Builder clearFqnAttributeValues() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableFqnAttributeValues().clear(); - return this; - } - /** - *
-     * map of fqns to complete attributes and the one selected value
-     * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - public Builder removeFqnAttributeValues( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableFqnAttributeValues().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableFqnAttributeValues() { - bitField0_ |= 0x00000001; - return internalGetMutableFqnAttributeValues().ensureMessageMap(); - } - /** - *
-     * map of fqns to complete attributes and the one selected value
-     * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - public Builder putFqnAttributeValues( - java.lang.String key, - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableFqnAttributeValues().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - *
-     * map of fqns to complete attributes and the one selected value
-     * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - public Builder putAllFqnAttributeValues( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableFqnAttributeValues().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - *
-     * map of fqns to complete attributes and the one selected value
-     * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder putFqnAttributeValuesBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableFqnAttributeValues().ensureBuilderMap(); - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) { - entry = ((io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue) entry).toBuilder(); - builderMap.put(key, entry); - } - return (io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.GetAttributeValuesByFqnsResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.GetAttributeValuesByFqnsResponse) - private static final io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse(); - } - - public static io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAttributeValuesByFqnsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponseOrBuilder.java deleted file mode 100644 index be750030..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/GetAttributeValuesByFqnsResponseOrBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface GetAttributeValuesByFqnsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.GetAttributeValuesByFqnsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - int getFqnAttributeValuesCount(); - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - boolean containsFqnAttributeValues( - java.lang.String key); - /** - * Use {@link #getFqnAttributeValuesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getFqnAttributeValues(); - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - java.util.Map - getFqnAttributeValuesMap(); - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - /* nullable */ -io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrDefault( - java.lang.String key, - /* nullable */ -io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue defaultValue); - /** - *
-   * map of fqns to complete attributes and the one selected value
-   * 
- * - * map<string, .policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue> fqn_attribute_values = 1 [json_name = "fqnAttributeValues"]; - */ - io.opentdf.platform.policy.attributes.GetAttributeValuesByFqnsResponse.AttributeAndValue getFqnAttributeValuesOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequest.java deleted file mode 100644 index ab0f125c..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequest.java +++ /dev/null @@ -1,664 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.ListAttributeValuesRequest} - */ -public final class ListAttributeValuesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.ListAttributeValuesRequest) - ListAttributeValuesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListAttributeValuesRequest.newBuilder() to construct. - private ListAttributeValuesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListAttributeValuesRequest() { - attributeId_ = ""; - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListAttributeValuesRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.class, io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.Builder.class); - } - - public static final int ATTRIBUTE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object attributeId_ = ""; - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The attributeId. - */ - @java.lang.Override - public java.lang.String getAttributeId() { - java.lang.Object ref = attributeId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeId_ = s; - return s; - } - } - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The bytes for attributeId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttributeIdBytes() { - java.lang.Object ref = attributeId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 2; - private int state_ = 0; - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @return The state. - */ - @java.lang.Override public io.opentdf.platform.common.ActiveStateEnum getState() { - io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); - return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeId_); - } - if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(2, state_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeId_); - } - if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, state_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.ListAttributeValuesRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.ListAttributeValuesRequest other = (io.opentdf.platform.policy.attributes.ListAttributeValuesRequest) obj; - - if (!getAttributeId() - .equals(other.getAttributeId())) return false; - if (state_ != other.state_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ATTRIBUTE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeId().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.ListAttributeValuesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.ListAttributeValuesRequest) - io.opentdf.platform.policy.attributes.ListAttributeValuesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.class, io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeId_ = ""; - state_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributeValuesRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributeValuesRequest build() { - io.opentdf.platform.policy.attributes.ListAttributeValuesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributeValuesRequest buildPartial() { - io.opentdf.platform.policy.attributes.ListAttributeValuesRequest result = new io.opentdf.platform.policy.attributes.ListAttributeValuesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeId_ = attributeId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.state_ = state_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.ListAttributeValuesRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.ListAttributeValuesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.ListAttributeValuesRequest other) { - if (other == io.opentdf.platform.policy.attributes.ListAttributeValuesRequest.getDefaultInstance()) return this; - if (!other.getAttributeId().isEmpty()) { - attributeId_ = other.attributeId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - attributeId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - state_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object attributeId_ = ""; - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The attributeId. - */ - public java.lang.String getAttributeId() { - java.lang.Object ref = attributeId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The bytes for attributeId. - */ - public com.google.protobuf.ByteString - getAttributeIdBytes() { - java.lang.Object ref = attributeId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @param value The attributeId to set. - * @return This builder for chaining. - */ - public Builder setAttributeId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - attributeId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearAttributeId() { - attributeId_ = getDefaultInstance().getAttributeId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @param value The bytes for attributeId to set. - * @return This builder for chaining. - */ - public Builder setAttributeIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - attributeId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int state_ = 0; - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @return The state. - */ - @java.lang.Override - public io.opentdf.platform.common.ActiveStateEnum getState() { - io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); - return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(io.opentdf.platform.common.ActiveStateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000002); - state_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.ListAttributeValuesRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.ListAttributeValuesRequest) - private static final io.opentdf.platform.policy.attributes.ListAttributeValuesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ListAttributeValuesRequest(); - } - - public static io.opentdf.platform.policy.attributes.ListAttributeValuesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAttributeValuesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributeValuesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequestOrBuilder.java deleted file mode 100644 index e413f301..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesRequestOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface ListAttributeValuesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.ListAttributeValuesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The attributeId. - */ - java.lang.String getAttributeId(); - /** - * string attribute_id = 1 [json_name = "attributeId", (.buf.validate.field) = { ... } - * @return The bytes for attributeId. - */ - com.google.protobuf.ByteString - getAttributeIdBytes(); - - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 2 [json_name = "state"]; - * @return The state. - */ - io.opentdf.platform.common.ActiveStateEnum getState(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponse.java deleted file mode 100644 index d1501f2b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.ListAttributeValuesResponse} - */ -public final class ListAttributeValuesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.ListAttributeValuesResponse) - ListAttributeValuesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListAttributeValuesResponse.newBuilder() to construct. - private ListAttributeValuesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListAttributeValuesResponse() { - values_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListAttributeValuesResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.class, io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List values_; - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - @java.lang.Override - public java.util.List getValuesList() { - return values_; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - @java.lang.Override - public java.util.List - getValuesOrBuilderList() { - return values_; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - @java.lang.Override - public int getValuesCount() { - return values_.size(); - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getValues(int index) { - return values_.get(index); - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( - int index) { - return values_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < values_.size(); i++) { - output.writeMessage(1, values_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < values_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, values_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.ListAttributeValuesResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.ListAttributeValuesResponse other = (io.opentdf.platform.policy.attributes.ListAttributeValuesResponse) obj; - - if (!getValuesList() - .equals(other.getValuesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getValuesCount() > 0) { - hash = (37 * hash) + VALUES_FIELD_NUMBER; - hash = (53 * hash) + getValuesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.ListAttributeValuesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.ListAttributeValuesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.ListAttributeValuesResponse) - io.opentdf.platform.policy.attributes.ListAttributeValuesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.class, io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - } else { - values_ = null; - valuesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributeValuesResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse build() { - io.opentdf.platform.policy.attributes.ListAttributeValuesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse buildPartial() { - io.opentdf.platform.policy.attributes.ListAttributeValuesResponse result = new io.opentdf.platform.policy.attributes.ListAttributeValuesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.attributes.ListAttributeValuesResponse result) { - if (valuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.values_ = values_; - } else { - result.values_ = valuesBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.ListAttributeValuesResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.ListAttributeValuesResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.ListAttributeValuesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.ListAttributeValuesResponse other) { - if (other == io.opentdf.platform.policy.attributes.ListAttributeValuesResponse.getDefaultInstance()) return this; - if (valuesBuilder_ == null) { - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValuesIsMutable(); - values_.addAll(other.values_); - } - onChanged(); - } - } else { - if (!other.values_.isEmpty()) { - if (valuesBuilder_.isEmpty()) { - valuesBuilder_.dispose(); - valuesBuilder_ = null; - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); - valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getValuesFieldBuilder() : null; - } else { - valuesBuilder_.addAllMessages(other.values_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.Value m = - input.readMessage( - io.opentdf.platform.policy.Value.parser(), - extensionRegistry); - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(m); - } else { - valuesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List values_ = - java.util.Collections.emptyList(); - private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - values_ = new java.util.ArrayList(values_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valuesBuilder_; - - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public java.util.List getValuesList() { - if (valuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(values_); - } else { - return valuesBuilder_.getMessageList(); - } - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public int getValuesCount() { - if (valuesBuilder_ == null) { - return values_.size(); - } else { - return valuesBuilder_.getCount(); - } - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public io.opentdf.platform.policy.Value getValues(int index) { - if (valuesBuilder_ == null) { - return values_.get(index); - } else { - return valuesBuilder_.getMessage(index); - } - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder setValues( - int index, io.opentdf.platform.policy.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - onChanged(); - } else { - valuesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder setValues( - int index, io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.set(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder addValues(io.opentdf.platform.policy.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - onChanged(); - } else { - valuesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder addValues( - int index, io.opentdf.platform.policy.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(index, value); - onChanged(); - } else { - valuesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder addValues( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder addValues( - int index, io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder addAllValues( - java.lang.Iterable values) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, values_); - onChanged(); - } else { - valuesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder clearValues() { - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - valuesBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public Builder removeValues(int index) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.remove(index); - onChanged(); - } else { - valuesBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public io.opentdf.platform.policy.Value.Builder getValuesBuilder( - int index) { - return getValuesFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( - int index) { - if (valuesBuilder_ == null) { - return values_.get(index); } else { - return valuesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public java.util.List - getValuesOrBuilderList() { - if (valuesBuilder_ != null) { - return valuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(values_); - } - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public io.opentdf.platform.policy.Value.Builder addValuesBuilder() { - return getValuesFieldBuilder().addBuilder( - io.opentdf.platform.policy.Value.getDefaultInstance()); - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public io.opentdf.platform.policy.Value.Builder addValuesBuilder( - int index) { - return getValuesFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Value.getDefaultInstance()); - } - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - public java.util.List - getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getValuesFieldBuilder() { - if (valuesBuilder_ == null) { - valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - values_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - values_ = null; - } - return valuesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.ListAttributeValuesResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.ListAttributeValuesResponse) - private static final io.opentdf.platform.policy.attributes.ListAttributeValuesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ListAttributeValuesResponse(); - } - - public static io.opentdf.platform.policy.attributes.ListAttributeValuesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAttributeValuesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributeValuesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponseOrBuilder.java deleted file mode 100644 index 7591947b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributeValuesResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface ListAttributeValuesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.ListAttributeValuesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - java.util.List - getValuesList(); - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - io.opentdf.platform.policy.Value getValues(int index); - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - int getValuesCount(); - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - java.util.List - getValuesOrBuilderList(); - /** - * repeated .policy.Value values = 1 [json_name = "values"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getValuesOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequest.java deleted file mode 100644 index 4654e21a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequest.java +++ /dev/null @@ -1,528 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.ListAttributesRequest} - */ -public final class ListAttributesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.ListAttributesRequest) - ListAttributesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListAttributesRequest.newBuilder() to construct. - private ListAttributesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListAttributesRequest() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListAttributesRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ListAttributesRequest.class, io.opentdf.platform.policy.attributes.ListAttributesRequest.Builder.class); - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_ = 0; - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The state. - */ - @java.lang.Override public io.opentdf.platform.common.ActiveStateEnum getState() { - io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); - return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.ListAttributesRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.ListAttributesRequest other = (io.opentdf.platform.policy.attributes.ListAttributesRequest) obj; - - if (state_ != other.state_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ListAttributesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.ListAttributesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.ListAttributesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.ListAttributesRequest) - io.opentdf.platform.policy.attributes.ListAttributesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ListAttributesRequest.class, io.opentdf.platform.policy.attributes.ListAttributesRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.ListAttributesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - state_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributesRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.ListAttributesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributesRequest build() { - io.opentdf.platform.policy.attributes.ListAttributesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributesRequest buildPartial() { - io.opentdf.platform.policy.attributes.ListAttributesRequest result = new io.opentdf.platform.policy.attributes.ListAttributesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.ListAttributesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.state_ = state_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.ListAttributesRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.ListAttributesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.ListAttributesRequest other) { - if (other == io.opentdf.platform.policy.attributes.ListAttributesRequest.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - state_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int state_ = 0; - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The state. - */ - @java.lang.Override - public io.opentdf.platform.common.ActiveStateEnum getState() { - io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); - return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(io.opentdf.platform.common.ActiveStateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000001); - state_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.ListAttributesRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.ListAttributesRequest) - private static final io.opentdf.platform.policy.attributes.ListAttributesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ListAttributesRequest(); - } - - public static io.opentdf.platform.policy.attributes.ListAttributesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAttributesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequestOrBuilder.java deleted file mode 100644 index c8085d74..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesRequestOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface ListAttributesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.ListAttributesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The state. - */ - io.opentdf.platform.common.ActiveStateEnum getState(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponse.java deleted file mode 100644 index d4754fc1..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.ListAttributesResponse} - */ -public final class ListAttributesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.ListAttributesResponse) - ListAttributesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListAttributesResponse.newBuilder() to construct. - private ListAttributesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListAttributesResponse() { - attributes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListAttributesResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ListAttributesResponse.class, io.opentdf.platform.policy.attributes.ListAttributesResponse.Builder.class); - } - - public static final int ATTRIBUTES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List attributes_; - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - @java.lang.Override - public java.util.List getAttributesList() { - return attributes_; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - @java.lang.Override - public java.util.List - getAttributesOrBuilderList() { - return attributes_; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - @java.lang.Override - public int getAttributesCount() { - return attributes_.size(); - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.Attribute getAttributes(int index) { - return attributes_.get(index); - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeOrBuilder getAttributesOrBuilder( - int index) { - return attributes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < attributes_.size(); i++) { - output.writeMessage(1, attributes_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < attributes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, attributes_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.ListAttributesResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.ListAttributesResponse other = (io.opentdf.platform.policy.attributes.ListAttributesResponse) obj; - - if (!getAttributesList() - .equals(other.getAttributesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAttributesCount() > 0) { - hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getAttributesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ListAttributesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.ListAttributesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.ListAttributesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.ListAttributesResponse) - io.opentdf.platform.policy.attributes.ListAttributesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ListAttributesResponse.class, io.opentdf.platform.policy.attributes.ListAttributesResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.ListAttributesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (attributesBuilder_ == null) { - attributes_ = java.util.Collections.emptyList(); - } else { - attributes_ = null; - attributesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ListAttributesResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributesResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.ListAttributesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributesResponse build() { - io.opentdf.platform.policy.attributes.ListAttributesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributesResponse buildPartial() { - io.opentdf.platform.policy.attributes.ListAttributesResponse result = new io.opentdf.platform.policy.attributes.ListAttributesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.attributes.ListAttributesResponse result) { - if (attributesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - attributes_ = java.util.Collections.unmodifiableList(attributes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.attributes_ = attributes_; - } else { - result.attributes_ = attributesBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.ListAttributesResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.ListAttributesResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.ListAttributesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.ListAttributesResponse other) { - if (other == io.opentdf.platform.policy.attributes.ListAttributesResponse.getDefaultInstance()) return this; - if (attributesBuilder_ == null) { - if (!other.attributes_.isEmpty()) { - if (attributes_.isEmpty()) { - attributes_ = other.attributes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAttributesIsMutable(); - attributes_.addAll(other.attributes_); - } - onChanged(); - } - } else { - if (!other.attributes_.isEmpty()) { - if (attributesBuilder_.isEmpty()) { - attributesBuilder_.dispose(); - attributesBuilder_ = null; - attributes_ = other.attributes_; - bitField0_ = (bitField0_ & ~0x00000001); - attributesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAttributesFieldBuilder() : null; - } else { - attributesBuilder_.addAllMessages(other.attributes_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.Attribute m = - input.readMessage( - io.opentdf.platform.policy.Attribute.parser(), - extensionRegistry); - if (attributesBuilder_ == null) { - ensureAttributesIsMutable(); - attributes_.add(m); - } else { - attributesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List attributes_ = - java.util.Collections.emptyList(); - private void ensureAttributesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - attributes_ = new java.util.ArrayList(attributes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributesBuilder_; - - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public java.util.List getAttributesList() { - if (attributesBuilder_ == null) { - return java.util.Collections.unmodifiableList(attributes_); - } else { - return attributesBuilder_.getMessageList(); - } - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public int getAttributesCount() { - if (attributesBuilder_ == null) { - return attributes_.size(); - } else { - return attributesBuilder_.getCount(); - } - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public io.opentdf.platform.policy.Attribute getAttributes(int index) { - if (attributesBuilder_ == null) { - return attributes_.get(index); - } else { - return attributesBuilder_.getMessage(index); - } - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder setAttributes( - int index, io.opentdf.platform.policy.Attribute value) { - if (attributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttributesIsMutable(); - attributes_.set(index, value); - onChanged(); - } else { - attributesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder setAttributes( - int index, io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributesBuilder_ == null) { - ensureAttributesIsMutable(); - attributes_.set(index, builderForValue.build()); - onChanged(); - } else { - attributesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder addAttributes(io.opentdf.platform.policy.Attribute value) { - if (attributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttributesIsMutable(); - attributes_.add(value); - onChanged(); - } else { - attributesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder addAttributes( - int index, io.opentdf.platform.policy.Attribute value) { - if (attributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttributesIsMutable(); - attributes_.add(index, value); - onChanged(); - } else { - attributesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder addAttributes( - io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributesBuilder_ == null) { - ensureAttributesIsMutable(); - attributes_.add(builderForValue.build()); - onChanged(); - } else { - attributesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder addAttributes( - int index, io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributesBuilder_ == null) { - ensureAttributesIsMutable(); - attributes_.add(index, builderForValue.build()); - onChanged(); - } else { - attributesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder addAllAttributes( - java.lang.Iterable values) { - if (attributesBuilder_ == null) { - ensureAttributesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, attributes_); - onChanged(); - } else { - attributesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder clearAttributes() { - if (attributesBuilder_ == null) { - attributes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - attributesBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public Builder removeAttributes(int index) { - if (attributesBuilder_ == null) { - ensureAttributesIsMutable(); - attributes_.remove(index); - onChanged(); - } else { - attributesBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public io.opentdf.platform.policy.Attribute.Builder getAttributesBuilder( - int index) { - return getAttributesFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public io.opentdf.platform.policy.AttributeOrBuilder getAttributesOrBuilder( - int index) { - if (attributesBuilder_ == null) { - return attributes_.get(index); } else { - return attributesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public java.util.List - getAttributesOrBuilderList() { - if (attributesBuilder_ != null) { - return attributesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(attributes_); - } - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public io.opentdf.platform.policy.Attribute.Builder addAttributesBuilder() { - return getAttributesFieldBuilder().addBuilder( - io.opentdf.platform.policy.Attribute.getDefaultInstance()); - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public io.opentdf.platform.policy.Attribute.Builder addAttributesBuilder( - int index) { - return getAttributesFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Attribute.getDefaultInstance()); - } - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - public java.util.List - getAttributesBuilderList() { - return getAttributesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> - getAttributesFieldBuilder() { - if (attributesBuilder_ == null) { - attributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( - attributes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - attributes_ = null; - } - return attributesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.ListAttributesResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.ListAttributesResponse) - private static final io.opentdf.platform.policy.attributes.ListAttributesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ListAttributesResponse(); - } - - public static io.opentdf.platform.policy.attributes.ListAttributesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAttributesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ListAttributesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponseOrBuilder.java deleted file mode 100644 index d311b597..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ListAttributesResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface ListAttributesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.ListAttributesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - java.util.List - getAttributesList(); - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - io.opentdf.platform.policy.Attribute getAttributes(int index); - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - int getAttributesCount(); - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - java.util.List - getAttributesOrBuilderList(); - /** - * repeated .policy.Attribute attributes = 1 [json_name = "attributes"]; - */ - io.opentdf.platform.policy.AttributeOrBuilder getAttributesOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequest.java deleted file mode 100644 index 3caa6593..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequest.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromAttributeRequest} - */ -public final class RemoveKeyAccessServerFromAttributeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) - RemoveKeyAccessServerFromAttributeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RemoveKeyAccessServerFromAttributeRequest.newBuilder() to construct. - private RemoveKeyAccessServerFromAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RemoveKeyAccessServerFromAttributeRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoveKeyAccessServerFromAttributeRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - @java.lang.Override - public boolean hasAttributeKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttributeKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttributeKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest other = (io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest) obj; - - if (hasAttributeKeyAccessServer() != other.hasAttributeKeyAccessServer()) return false; - if (hasAttributeKeyAccessServer()) { - if (!getAttributeKeyAccessServer() - .equals(other.getAttributeKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttributeKeyAccessServer()) { - hash = (37 * hash) + ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getAttributeKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromAttributeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeKeyAccessServer_ = null; - if (attributeKeyAccessServerBuilder_ != null) { - attributeKeyAccessServerBuilder_.dispose(); - attributeKeyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest build() { - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest buildPartial() { - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest result = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeKeyAccessServer_ = attributeKeyAccessServerBuilder_ == null - ? attributeKeyAccessServer_ - : attributeKeyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest other) { - if (other == io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest.getDefaultInstance()) return this; - if (other.hasAttributeKeyAccessServer()) { - mergeAttributeKeyAccessServer(other.getAttributeKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> attributeKeyAccessServerBuilder_; - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - public boolean hasAttributeKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { - if (attributeKeyAccessServerBuilder_ == null) { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } else { - return attributeKeyAccessServerBuilder_.getMessage(); - } - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder setAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { - if (attributeKeyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attributeKeyAccessServer_ = value; - } else { - attributeKeyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder setAttributeKeyAccessServer( - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder builderForValue) { - if (attributeKeyAccessServerBuilder_ == null) { - attributeKeyAccessServer_ = builderForValue.build(); - } else { - attributeKeyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder mergeAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { - if (attributeKeyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attributeKeyAccessServer_ != null && - attributeKeyAccessServer_ != io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) { - getAttributeKeyAccessServerBuilder().mergeFrom(value); - } else { - attributeKeyAccessServer_ = value; - } - } else { - attributeKeyAccessServerBuilder_.mergeFrom(value); - } - if (attributeKeyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder clearAttributeKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - attributeKeyAccessServer_ = null; - if (attributeKeyAccessServerBuilder_ != null) { - attributeKeyAccessServerBuilder_.dispose(); - attributeKeyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder getAttributeKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { - if (attributeKeyAccessServerBuilder_ != null) { - return attributeKeyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return attributeKeyAccessServer_ == null ? - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> - getAttributeKeyAccessServerFieldBuilder() { - if (attributeKeyAccessServerBuilder_ == null) { - attributeKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder>( - getAttributeKeyAccessServer(), - getParentForChildren(), - isClean()); - attributeKeyAccessServer_ = null; - } - return attributeKeyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) - private static final io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest(); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveKeyAccessServerFromAttributeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequestOrBuilder.java deleted file mode 100644 index 2fb81c3c..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeRequestOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface RemoveKeyAccessServerFromAttributeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.RemoveKeyAccessServerFromAttributeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - boolean hasAttributeKeyAccessServer(); - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer(); - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponse.java deleted file mode 100644 index d0d60a65..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromAttributeResponse} - */ -public final class RemoveKeyAccessServerFromAttributeResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) - RemoveKeyAccessServerFromAttributeResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use RemoveKeyAccessServerFromAttributeResponse.newBuilder() to construct. - private RemoveKeyAccessServerFromAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RemoveKeyAccessServerFromAttributeResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoveKeyAccessServerFromAttributeResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - @java.lang.Override - public boolean hasAttributeKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttributeKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttributeKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse other = (io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse) obj; - - if (hasAttributeKeyAccessServer() != other.hasAttributeKeyAccessServer()) return false; - if (hasAttributeKeyAccessServer()) { - if (!getAttributeKeyAccessServer() - .equals(other.getAttributeKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttributeKeyAccessServer()) { - hash = (37 * hash) + ATTRIBUTE_KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getAttributeKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromAttributeResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeKeyAccessServer_ = null; - if (attributeKeyAccessServerBuilder_ != null) { - attributeKeyAccessServerBuilder_.dispose(); - attributeKeyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromAttributeResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse build() { - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse buildPartial() { - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse result = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeKeyAccessServer_ = attributeKeyAccessServerBuilder_ == null - ? attributeKeyAccessServer_ - : attributeKeyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse other) { - if (other == io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse.getDefaultInstance()) return this; - if (other.hasAttributeKeyAccessServer()) { - mergeAttributeKeyAccessServer(other.getAttributeKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.attributes.AttributeKeyAccessServer attributeKeyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> attributeKeyAccessServerBuilder_; - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - public boolean hasAttributeKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer() { - if (attributeKeyAccessServerBuilder_ == null) { - return attributeKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } else { - return attributeKeyAccessServerBuilder_.getMessage(); - } - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder setAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { - if (attributeKeyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attributeKeyAccessServer_ = value; - } else { - attributeKeyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder setAttributeKeyAccessServer( - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder builderForValue) { - if (attributeKeyAccessServerBuilder_ == null) { - attributeKeyAccessServer_ = builderForValue.build(); - } else { - attributeKeyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder mergeAttributeKeyAccessServer(io.opentdf.platform.policy.attributes.AttributeKeyAccessServer value) { - if (attributeKeyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attributeKeyAccessServer_ != null && - attributeKeyAccessServer_ != io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance()) { - getAttributeKeyAccessServerBuilder().mergeFrom(value); - } else { - attributeKeyAccessServer_ = value; - } - } else { - attributeKeyAccessServerBuilder_.mergeFrom(value); - } - if (attributeKeyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public Builder clearAttributeKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - attributeKeyAccessServer_ = null; - if (attributeKeyAccessServerBuilder_ != null) { - attributeKeyAccessServerBuilder_.dispose(); - attributeKeyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder getAttributeKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder() { - if (attributeKeyAccessServerBuilder_ != null) { - return attributeKeyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return attributeKeyAccessServer_ == null ? - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.getDefaultInstance() : attributeKeyAccessServer_; - } - } - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder> - getAttributeKeyAccessServerFieldBuilder() { - if (attributeKeyAccessServerBuilder_ == null) { - attributeKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer, io.opentdf.platform.policy.attributes.AttributeKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder>( - getAttributeKeyAccessServer(), - getParentForChildren(), - isClean()); - attributeKeyAccessServer_ = null; - } - return attributeKeyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) - private static final io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse(); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveKeyAccessServerFromAttributeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromAttributeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponseOrBuilder.java deleted file mode 100644 index 39e4dde9..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromAttributeResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface RemoveKeyAccessServerFromAttributeResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.RemoveKeyAccessServerFromAttributeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return Whether the attributeKeyAccessServer field is set. - */ - boolean hasAttributeKeyAccessServer(); - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - * @return The attributeKeyAccessServer. - */ - io.opentdf.platform.policy.attributes.AttributeKeyAccessServer getAttributeKeyAccessServer(); - /** - * .policy.attributes.AttributeKeyAccessServer attribute_key_access_server = 1 [json_name = "attributeKeyAccessServer"]; - */ - io.opentdf.platform.policy.attributes.AttributeKeyAccessServerOrBuilder getAttributeKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequest.java deleted file mode 100644 index a1834a4d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequest.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromValueRequest} - */ -public final class RemoveKeyAccessServerFromValueRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.RemoveKeyAccessServerFromValueRequest) - RemoveKeyAccessServerFromValueRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RemoveKeyAccessServerFromValueRequest.newBuilder() to construct. - private RemoveKeyAccessServerFromValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RemoveKeyAccessServerFromValueRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoveKeyAccessServerFromValueRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.Builder.class); - } - - private int bitField0_; - public static final int VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - @java.lang.Override - public boolean hasValueKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getValueKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValueKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest other = (io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest) obj; - - if (hasValueKeyAccessServer() != other.hasValueKeyAccessServer()) return false; - if (hasValueKeyAccessServer()) { - if (!getValueKeyAccessServer() - .equals(other.getValueKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValueKeyAccessServer()) { - hash = (37 * hash) + VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getValueKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromValueRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.RemoveKeyAccessServerFromValueRequest) - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueKeyAccessServer_ = null; - if (valueKeyAccessServerBuilder_ != null) { - valueKeyAccessServerBuilder_.dispose(); - valueKeyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest build() { - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest buildPartial() { - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest result = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.valueKeyAccessServer_ = valueKeyAccessServerBuilder_ == null - ? valueKeyAccessServer_ - : valueKeyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest other) { - if (other == io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest.getDefaultInstance()) return this; - if (other.hasValueKeyAccessServer()) { - mergeValueKeyAccessServer(other.getValueKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValueKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> valueKeyAccessServerBuilder_; - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - public boolean hasValueKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { - if (valueKeyAccessServerBuilder_ == null) { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } else { - return valueKeyAccessServerBuilder_.getMessage(); - } - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder setValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { - if (valueKeyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - valueKeyAccessServer_ = value; - } else { - valueKeyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder setValueKeyAccessServer( - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder builderForValue) { - if (valueKeyAccessServerBuilder_ == null) { - valueKeyAccessServer_ = builderForValue.build(); - } else { - valueKeyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder mergeValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { - if (valueKeyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - valueKeyAccessServer_ != null && - valueKeyAccessServer_ != io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) { - getValueKeyAccessServerBuilder().mergeFrom(value); - } else { - valueKeyAccessServer_ = value; - } - } else { - valueKeyAccessServerBuilder_.mergeFrom(value); - } - if (valueKeyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder clearValueKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - valueKeyAccessServer_ = null; - if (valueKeyAccessServerBuilder_ != null) { - valueKeyAccessServerBuilder_.dispose(); - valueKeyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder getValueKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValueKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { - if (valueKeyAccessServerBuilder_ != null) { - return valueKeyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return valueKeyAccessServer_ == null ? - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> - getValueKeyAccessServerFieldBuilder() { - if (valueKeyAccessServerBuilder_ == null) { - valueKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder>( - getValueKeyAccessServer(), - getParentForChildren(), - isClean()); - valueKeyAccessServer_ = null; - } - return valueKeyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.RemoveKeyAccessServerFromValueRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.RemoveKeyAccessServerFromValueRequest) - private static final io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest(); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveKeyAccessServerFromValueRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequestOrBuilder.java deleted file mode 100644 index 59fd2699..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueRequestOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface RemoveKeyAccessServerFromValueRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.RemoveKeyAccessServerFromValueRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - boolean hasValueKeyAccessServer(); - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer(); - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponse.java deleted file mode 100644 index 46d788d6..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromValueResponse} - */ -public final class RemoveKeyAccessServerFromValueResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.RemoveKeyAccessServerFromValueResponse) - RemoveKeyAccessServerFromValueResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use RemoveKeyAccessServerFromValueResponse.newBuilder() to construct. - private RemoveKeyAccessServerFromValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RemoveKeyAccessServerFromValueResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoveKeyAccessServerFromValueResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.Builder.class); - } - - private int bitField0_; - public static final int VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - @java.lang.Override - public boolean hasValueKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getValueKeyAccessServer()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValueKeyAccessServer()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse other = (io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse) obj; - - if (hasValueKeyAccessServer() != other.hasValueKeyAccessServer()) return false; - if (hasValueKeyAccessServer()) { - if (!getValueKeyAccessServer() - .equals(other.getValueKeyAccessServer())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValueKeyAccessServer()) { - hash = (37 * hash) + VALUE_KEY_ACCESS_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getValueKeyAccessServer().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.RemoveKeyAccessServerFromValueResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.RemoveKeyAccessServerFromValueResponse) - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.class, io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueKeyAccessServerFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueKeyAccessServer_ = null; - if (valueKeyAccessServerBuilder_ != null) { - valueKeyAccessServerBuilder_.dispose(); - valueKeyAccessServerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_RemoveKeyAccessServerFromValueResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse build() { - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse buildPartial() { - io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse result = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.valueKeyAccessServer_ = valueKeyAccessServerBuilder_ == null - ? valueKeyAccessServer_ - : valueKeyAccessServerBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse other) { - if (other == io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse.getDefaultInstance()) return this; - if (other.hasValueKeyAccessServer()) { - mergeValueKeyAccessServer(other.getValueKeyAccessServer()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValueKeyAccessServerFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.attributes.ValueKeyAccessServer valueKeyAccessServer_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> valueKeyAccessServerBuilder_; - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - public boolean hasValueKeyAccessServer() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer() { - if (valueKeyAccessServerBuilder_ == null) { - return valueKeyAccessServer_ == null ? io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } else { - return valueKeyAccessServerBuilder_.getMessage(); - } - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder setValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { - if (valueKeyAccessServerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - valueKeyAccessServer_ = value; - } else { - valueKeyAccessServerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder setValueKeyAccessServer( - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder builderForValue) { - if (valueKeyAccessServerBuilder_ == null) { - valueKeyAccessServer_ = builderForValue.build(); - } else { - valueKeyAccessServerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder mergeValueKeyAccessServer(io.opentdf.platform.policy.attributes.ValueKeyAccessServer value) { - if (valueKeyAccessServerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - valueKeyAccessServer_ != null && - valueKeyAccessServer_ != io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) { - getValueKeyAccessServerBuilder().mergeFrom(value); - } else { - valueKeyAccessServer_ = value; - } - } else { - valueKeyAccessServerBuilder_.mergeFrom(value); - } - if (valueKeyAccessServer_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public Builder clearValueKeyAccessServer() { - bitField0_ = (bitField0_ & ~0x00000001); - valueKeyAccessServer_ = null; - if (valueKeyAccessServerBuilder_ != null) { - valueKeyAccessServerBuilder_.dispose(); - valueKeyAccessServerBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder getValueKeyAccessServerBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValueKeyAccessServerFieldBuilder().getBuilder(); - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - public io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder() { - if (valueKeyAccessServerBuilder_ != null) { - return valueKeyAccessServerBuilder_.getMessageOrBuilder(); - } else { - return valueKeyAccessServer_ == null ? - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance() : valueKeyAccessServer_; - } - } - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder> - getValueKeyAccessServerFieldBuilder() { - if (valueKeyAccessServerBuilder_ == null) { - valueKeyAccessServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.attributes.ValueKeyAccessServer, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder, io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder>( - getValueKeyAccessServer(), - getParentForChildren(), - isClean()); - valueKeyAccessServer_ = null; - } - return valueKeyAccessServerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.RemoveKeyAccessServerFromValueResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.RemoveKeyAccessServerFromValueResponse) - private static final io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse(); - } - - public static io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveKeyAccessServerFromValueResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.RemoveKeyAccessServerFromValueResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponseOrBuilder.java deleted file mode 100644 index e696bfae..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/RemoveKeyAccessServerFromValueResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface RemoveKeyAccessServerFromValueResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.RemoveKeyAccessServerFromValueResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return Whether the valueKeyAccessServer field is set. - */ - boolean hasValueKeyAccessServer(); - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - * @return The valueKeyAccessServer. - */ - io.opentdf.platform.policy.attributes.ValueKeyAccessServer getValueKeyAccessServer(); - /** - * .policy.attributes.ValueKeyAccessServer value_key_access_server = 1 [json_name = "valueKeyAccessServer"]; - */ - io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder getValueKeyAccessServerOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequest.java deleted file mode 100644 index 6f6a5fe1..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequest.java +++ /dev/null @@ -1,905 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.UpdateAttributeRequest} - */ -public final class UpdateAttributeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.UpdateAttributeRequest) - UpdateAttributeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateAttributeRequest.newBuilder() to construct. - private UpdateAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateAttributeRequest() { - id_ = ""; - metadataUpdateBehavior_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateAttributeRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.UpdateAttributeRequest.class, io.opentdf.platform.policy.attributes.UpdateAttributeRequest.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(101, metadataUpdateBehavior_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(101, metadataUpdateBehavior_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.UpdateAttributeRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.UpdateAttributeRequest other = (io.opentdf.platform.policy.attributes.UpdateAttributeRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; - hash = (53 * hash) + metadataUpdateBehavior_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.UpdateAttributeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.UpdateAttributeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.UpdateAttributeRequest) - io.opentdf.platform.policy.attributes.UpdateAttributeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.UpdateAttributeRequest.class, io.opentdf.platform.policy.attributes.UpdateAttributeRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.UpdateAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - metadataUpdateBehavior_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.UpdateAttributeRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeRequest build() { - io.opentdf.platform.policy.attributes.UpdateAttributeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeRequest buildPartial() { - io.opentdf.platform.policy.attributes.UpdateAttributeRequest result = new io.opentdf.platform.policy.attributes.UpdateAttributeRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.UpdateAttributeRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadataUpdateBehavior_ = metadataUpdateBehavior_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.UpdateAttributeRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.UpdateAttributeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.UpdateAttributeRequest other) { - if (other == io.opentdf.platform.policy.attributes.UpdateAttributeRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.metadataUpdateBehavior_ != 0) { - setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 802 - case 808: { - metadataUpdateBehavior_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 808 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehaviorValue(int value) { - metadataUpdateBehavior_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - metadataUpdateBehavior_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return This builder for chaining. - */ - public Builder clearMetadataUpdateBehavior() { - bitField0_ = (bitField0_ & ~0x00000004); - metadataUpdateBehavior_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.UpdateAttributeRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.UpdateAttributeRequest) - private static final io.opentdf.platform.policy.attributes.UpdateAttributeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.UpdateAttributeRequest(); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateAttributeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequestOrBuilder.java deleted file mode 100644 index 6d7d1be3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeRequestOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface UpdateAttributeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.UpdateAttributeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - int getMetadataUpdateBehaviorValue(); - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponse.java deleted file mode 100644 index c23c8f72..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.UpdateAttributeResponse} - */ -public final class UpdateAttributeResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.UpdateAttributeResponse) - UpdateAttributeResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateAttributeResponse.newBuilder() to construct. - private UpdateAttributeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateAttributeResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateAttributeResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.UpdateAttributeResponse.class, io.opentdf.platform.policy.attributes.UpdateAttributeResponse.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Attribute attribute_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - @java.lang.Override - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - @java.lang.Override - public io.opentdf.platform.policy.Attribute getAttribute() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttribute()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttribute()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.UpdateAttributeResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.UpdateAttributeResponse other = (io.opentdf.platform.policy.attributes.UpdateAttributeResponse) obj; - - if (hasAttribute() != other.hasAttribute()) return false; - if (hasAttribute()) { - if (!getAttribute() - .equals(other.getAttribute())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttribute()) { - hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getAttribute().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.UpdateAttributeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.UpdateAttributeResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.UpdateAttributeResponse) - io.opentdf.platform.policy.attributes.UpdateAttributeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.UpdateAttributeResponse.class, io.opentdf.platform.policy.attributes.UpdateAttributeResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.UpdateAttributeResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.UpdateAttributeResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeResponse build() { - io.opentdf.platform.policy.attributes.UpdateAttributeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeResponse buildPartial() { - io.opentdf.platform.policy.attributes.UpdateAttributeResponse result = new io.opentdf.platform.policy.attributes.UpdateAttributeResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.UpdateAttributeResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attribute_ = attributeBuilder_ == null - ? attribute_ - : attributeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.UpdateAttributeResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.UpdateAttributeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.UpdateAttributeResponse other) { - if (other == io.opentdf.platform.policy.attributes.UpdateAttributeResponse.getDefaultInstance()) return this; - if (other.hasAttribute()) { - mergeAttribute(other.getAttribute()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAttributeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Attribute attribute_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> attributeBuilder_; - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - public boolean hasAttribute() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - public io.opentdf.platform.policy.Attribute getAttribute() { - if (attributeBuilder_ == null) { - return attribute_ == null ? io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } else { - return attributeBuilder_.getMessage(); - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attribute_ = value; - } else { - attributeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder setAttribute( - io.opentdf.platform.policy.Attribute.Builder builderForValue) { - if (attributeBuilder_ == null) { - attribute_ = builderForValue.build(); - } else { - attributeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder mergeAttribute(io.opentdf.platform.policy.Attribute value) { - if (attributeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attribute_ != null && - attribute_ != io.opentdf.platform.policy.Attribute.getDefaultInstance()) { - getAttributeBuilder().mergeFrom(value); - } else { - attribute_ = value; - } - } else { - attributeBuilder_.mergeFrom(value); - } - if (attribute_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public Builder clearAttribute() { - bitField0_ = (bitField0_ & ~0x00000001); - attribute_ = null; - if (attributeBuilder_ != null) { - attributeBuilder_.dispose(); - attributeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.Attribute.Builder getAttributeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getAttributeFieldBuilder().getBuilder(); - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - public io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder() { - if (attributeBuilder_ != null) { - return attributeBuilder_.getMessageOrBuilder(); - } else { - return attribute_ == null ? - io.opentdf.platform.policy.Attribute.getDefaultInstance() : attribute_; - } - } - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder> - getAttributeFieldBuilder() { - if (attributeBuilder_ == null) { - attributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Attribute, io.opentdf.platform.policy.Attribute.Builder, io.opentdf.platform.policy.AttributeOrBuilder>( - getAttribute(), - getParentForChildren(), - isClean()); - attribute_ = null; - } - return attributeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.UpdateAttributeResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.UpdateAttributeResponse) - private static final io.opentdf.platform.policy.attributes.UpdateAttributeResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.UpdateAttributeResponse(); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateAttributeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponseOrBuilder.java deleted file mode 100644 index 8795ef75..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface UpdateAttributeResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.UpdateAttributeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return Whether the attribute field is set. - */ - boolean hasAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - * @return The attribute. - */ - io.opentdf.platform.policy.Attribute getAttribute(); - /** - * .policy.Attribute attribute = 1 [json_name = "attribute"]; - */ - io.opentdf.platform.policy.AttributeOrBuilder getAttributeOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequest.java deleted file mode 100644 index c1c9390a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequest.java +++ /dev/null @@ -1,1118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.UpdateAttributeValueRequest} - */ -public final class UpdateAttributeValueRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.UpdateAttributeValueRequest) - UpdateAttributeValueRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateAttributeValueRequest.newBuilder() to construct. - private UpdateAttributeValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateAttributeValueRequest() { - id_ = ""; - members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - metadataUpdateBehavior_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateAttributeValueRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEMBERS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * Optional
-   * 
- * - * repeated string members = 4 [json_name = "members"]; - * @return A list containing the members. - */ - public com.google.protobuf.ProtocolStringList - getMembersList() { - return members_; - } - /** - *
-   * Optional
-   * 
- * - * repeated string members = 4 [json_name = "members"]; - * @return The count of members. - */ - public int getMembersCount() { - return members_.size(); - } - /** - *
-   * Optional
-   * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param index The index of the element to return. - * @return The members at the given index. - */ - public java.lang.String getMembers(int index) { - return members_.get(index); - } - /** - *
-   * Optional
-   * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - public com.google.protobuf.ByteString - getMembersBytes(int index) { - return members_.getByteString(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - for (int i = 0; i < members_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, members_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(101, metadataUpdateBehavior_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - { - int dataSize = 0; - for (int i = 0; i < members_.size(); i++) { - dataSize += computeStringSizeNoTag(members_.getRaw(i)); - } - size += dataSize; - size += 1 * getMembersList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(101, metadataUpdateBehavior_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest other = (io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getMembersList() - .equals(other.getMembersList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getMembersCount() > 0) { - hash = (37 * hash) + MEMBERS_FIELD_NUMBER; - hash = (53 * hash) + getMembersList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; - hash = (53 * hash) + metadataUpdateBehavior_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.UpdateAttributeValueRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.UpdateAttributeValueRequest) - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.class, io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - metadataUpdateBehavior_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest build() { - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest buildPartial() { - io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest result = new io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - members_.makeImmutable(); - result.members_ = members_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.metadataUpdateBehavior_ = metadataUpdateBehavior_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest) { - return mergeFrom((io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest other) { - if (other == io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.members_.isEmpty()) { - if (members_.isEmpty()) { - members_ = other.members_; - bitField0_ |= 0x00000002; - } else { - ensureMembersIsMutable(); - members_.addAll(other.members_); - } - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.metadataUpdateBehavior_ != 0) { - setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - ensureMembersIsMutable(); - members_.add(s); - break; - } // case 34 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 802 - case 808: { - metadataUpdateBehavior_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 808 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureMembersIsMutable() { - if (!members_.isModifiable()) { - members_ = new com.google.protobuf.LazyStringArrayList(members_); - } - bitField0_ |= 0x00000002; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @return A list containing the members. - */ - public com.google.protobuf.ProtocolStringList - getMembersList() { - members_.makeImmutable(); - return members_; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @return The count of members. - */ - public int getMembersCount() { - return members_.size(); - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param index The index of the element to return. - * @return The members at the given index. - */ - public java.lang.String getMembers(int index) { - return members_.get(index); - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - public com.google.protobuf.ByteString - getMembersBytes(int index) { - return members_.getByteString(index); - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param index The index to set the value at. - * @param value The members to set. - * @return This builder for chaining. - */ - public Builder setMembers( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureMembersIsMutable(); - members_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param value The members to add. - * @return This builder for chaining. - */ - public Builder addMembers( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureMembersIsMutable(); - members_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param values The members to add. - * @return This builder for chaining. - */ - public Builder addAllMembers( - java.lang.Iterable values) { - ensureMembersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, members_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @return This builder for chaining. - */ - public Builder clearMembers() { - members_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002);; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param value The bytes of the members to add. - * @return This builder for chaining. - */ - public Builder addMembersBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureMembersIsMutable(); - members_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehaviorValue(int value) { - metadataUpdateBehavior_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - metadataUpdateBehavior_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return This builder for chaining. - */ - public Builder clearMetadataUpdateBehavior() { - bitField0_ = (bitField0_ & ~0x00000008); - metadataUpdateBehavior_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.UpdateAttributeValueRequest) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.UpdateAttributeValueRequest) - private static final io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest(); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateAttributeValueRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeValueRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequestOrBuilder.java deleted file mode 100644 index 5022a20a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface UpdateAttributeValueRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.UpdateAttributeValueRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Optional
-   * 
- * - * repeated string members = 4 [json_name = "members"]; - * @return A list containing the members. - */ - java.util.List - getMembersList(); - /** - *
-   * Optional
-   * 
- * - * repeated string members = 4 [json_name = "members"]; - * @return The count of members. - */ - int getMembersCount(); - /** - *
-   * Optional
-   * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param index The index of the element to return. - * @return The members at the given index. - */ - java.lang.String getMembers(int index); - /** - *
-   * Optional
-   * 
- * - * repeated string members = 4 [json_name = "members"]; - * @param index The index of the value to return. - * @return The bytes of the members at the given index. - */ - com.google.protobuf.ByteString - getMembersBytes(int index); - - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - int getMetadataUpdateBehaviorValue(); - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponse.java deleted file mode 100644 index f523892c..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.UpdateAttributeValueResponse} - */ -public final class UpdateAttributeValueResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.UpdateAttributeValueResponse) - UpdateAttributeValueResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateAttributeValueResponse.newBuilder() to construct. - private UpdateAttributeValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateAttributeValueResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateAttributeValueResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.Builder.class); - } - - private int bitField0_; - public static final int VALUE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Value value_; - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - @java.lang.Override - public io.opentdf.platform.policy.Value getValue() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getValue()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValue()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse other = (io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse) obj; - - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue() - .equals(other.getValue())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.UpdateAttributeValueResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.UpdateAttributeValueResponse) - io.opentdf.platform.policy.attributes.UpdateAttributeValueResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.class, io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_UpdateAttributeValueResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse build() { - io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse buildPartial() { - io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse result = new io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.value_ = valueBuilder_ == null - ? value_ - : valueBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse) { - return mergeFrom((io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse other) { - if (other == io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse.getDefaultInstance()) return this; - if (other.hasValue()) { - mergeValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValueFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> valueBuilder_; - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - public io.opentdf.platform.policy.Value getValue() { - if (valueBuilder_ == null) { - return value_ == null ? io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder setValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - } else { - valueBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder setValue( - io.opentdf.platform.policy.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder mergeValue(io.opentdf.platform.policy.Value value) { - if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - value_ != null && - value_ != io.opentdf.platform.policy.Value.getDefaultInstance()) { - getValueBuilder().mergeFrom(value); - } else { - value_ = value; - } - } else { - valueBuilder_.mergeFrom(value); - } - if (value_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000001); - value_ = null; - if (valueBuilder_ != null) { - valueBuilder_.dispose(); - valueBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public io.opentdf.platform.policy.Value.Builder getValueBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - public io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? - io.opentdf.platform.policy.Value.getDefaultInstance() : value_; - } - } - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Value, io.opentdf.platform.policy.Value.Builder, io.opentdf.platform.policy.ValueOrBuilder>( - getValue(), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.UpdateAttributeValueResponse) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.UpdateAttributeValueResponse) - private static final io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse(); - } - - public static io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateAttributeValueResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.UpdateAttributeValueResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponseOrBuilder.java deleted file mode 100644 index 29e29df9..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/UpdateAttributeValueResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface UpdateAttributeValueResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.UpdateAttributeValueResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - * .policy.Value value = 1 [json_name = "value"]; - * @return The value. - */ - io.opentdf.platform.policy.Value getValue(); - /** - * .policy.Value value = 1 [json_name = "value"]; - */ - io.opentdf.platform.policy.ValueOrBuilder getValueOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServer.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServer.java deleted file mode 100644 index 443d66eb..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServer.java +++ /dev/null @@ -1,678 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -/** - * Protobuf type {@code policy.attributes.ValueKeyAccessServer} - */ -public final class ValueKeyAccessServer extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.attributes.ValueKeyAccessServer) - ValueKeyAccessServerOrBuilder { -private static final long serialVersionUID = 0L; - // Use ValueKeyAccessServer.newBuilder() to construct. - private ValueKeyAccessServer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ValueKeyAccessServer() { - valueId_ = ""; - keyAccessServerId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ValueKeyAccessServer(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.class, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder.class); - } - - public static final int VALUE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object valueId_ = ""; - /** - * string value_id = 1 [json_name = "valueId"]; - * @return The valueId. - */ - @java.lang.Override - public java.lang.String getValueId() { - java.lang.Object ref = valueId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - valueId_ = s; - return s; - } - } - /** - * string value_id = 1 [json_name = "valueId"]; - * @return The bytes for valueId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueIdBytes() { - java.lang.Object ref = valueId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - valueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KEY_ACCESS_SERVER_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object keyAccessServerId_ = ""; - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The keyAccessServerId. - */ - @java.lang.Override - public java.lang.String getKeyAccessServerId() { - java.lang.Object ref = keyAccessServerId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyAccessServerId_ = s; - return s; - } - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The bytes for keyAccessServerId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKeyAccessServerIdBytes() { - java.lang.Object ref = keyAccessServerId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - keyAccessServerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, valueId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyAccessServerId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keyAccessServerId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, valueId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyAccessServerId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keyAccessServerId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.attributes.ValueKeyAccessServer)) { - return super.equals(obj); - } - io.opentdf.platform.policy.attributes.ValueKeyAccessServer other = (io.opentdf.platform.policy.attributes.ValueKeyAccessServer) obj; - - if (!getValueId() - .equals(other.getValueId())) return false; - if (!getKeyAccessServerId() - .equals(other.getKeyAccessServerId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VALUE_ID_FIELD_NUMBER; - hash = (53 * hash) + getValueId().hashCode(); - hash = (37 * hash) + KEY_ACCESS_SERVER_ID_FIELD_NUMBER; - hash = (53 * hash) + getKeyAccessServerId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.attributes.ValueKeyAccessServer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.attributes.ValueKeyAccessServer} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.attributes.ValueKeyAccessServer) - io.opentdf.platform.policy.attributes.ValueKeyAccessServerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.attributes.ValueKeyAccessServer.class, io.opentdf.platform.policy.attributes.ValueKeyAccessServer.Builder.class); - } - - // Construct using io.opentdf.platform.policy.attributes.ValueKeyAccessServer.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valueId_ = ""; - keyAccessServerId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.attributes.AttributesProto.internal_static_policy_attributes_ValueKeyAccessServer_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getDefaultInstanceForType() { - return io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer build() { - io.opentdf.platform.policy.attributes.ValueKeyAccessServer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer buildPartial() { - io.opentdf.platform.policy.attributes.ValueKeyAccessServer result = new io.opentdf.platform.policy.attributes.ValueKeyAccessServer(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.attributes.ValueKeyAccessServer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.valueId_ = valueId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.keyAccessServerId_ = keyAccessServerId_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.attributes.ValueKeyAccessServer) { - return mergeFrom((io.opentdf.platform.policy.attributes.ValueKeyAccessServer)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.attributes.ValueKeyAccessServer other) { - if (other == io.opentdf.platform.policy.attributes.ValueKeyAccessServer.getDefaultInstance()) return this; - if (!other.getValueId().isEmpty()) { - valueId_ = other.valueId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getKeyAccessServerId().isEmpty()) { - keyAccessServerId_ = other.keyAccessServerId_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - valueId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - keyAccessServerId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object valueId_ = ""; - /** - * string value_id = 1 [json_name = "valueId"]; - * @return The valueId. - */ - public java.lang.String getValueId() { - java.lang.Object ref = valueId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - valueId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string value_id = 1 [json_name = "valueId"]; - * @return The bytes for valueId. - */ - public com.google.protobuf.ByteString - getValueIdBytes() { - java.lang.Object ref = valueId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - valueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string value_id = 1 [json_name = "valueId"]; - * @param value The valueId to set. - * @return This builder for chaining. - */ - public Builder setValueId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - valueId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string value_id = 1 [json_name = "valueId"]; - * @return This builder for chaining. - */ - public Builder clearValueId() { - valueId_ = getDefaultInstance().getValueId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string value_id = 1 [json_name = "valueId"]; - * @param value The bytes for valueId to set. - * @return This builder for chaining. - */ - public Builder setValueIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - valueId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object keyAccessServerId_ = ""; - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The keyAccessServerId. - */ - public java.lang.String getKeyAccessServerId() { - java.lang.Object ref = keyAccessServerId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyAccessServerId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The bytes for keyAccessServerId. - */ - public com.google.protobuf.ByteString - getKeyAccessServerIdBytes() { - java.lang.Object ref = keyAccessServerId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - keyAccessServerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @param value The keyAccessServerId to set. - * @return This builder for chaining. - */ - public Builder setKeyAccessServerId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - keyAccessServerId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return This builder for chaining. - */ - public Builder clearKeyAccessServerId() { - keyAccessServerId_ = getDefaultInstance().getKeyAccessServerId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @param value The bytes for keyAccessServerId to set. - * @return This builder for chaining. - */ - public Builder setKeyAccessServerIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - keyAccessServerId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.attributes.ValueKeyAccessServer) - } - - // @@protoc_insertion_point(class_scope:policy.attributes.ValueKeyAccessServer) - private static final io.opentdf.platform.policy.attributes.ValueKeyAccessServer DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.attributes.ValueKeyAccessServer(); - } - - public static io.opentdf.platform.policy.attributes.ValueKeyAccessServer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValueKeyAccessServer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.attributes.ValueKeyAccessServer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServerOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServerOrBuilder.java deleted file mode 100644 index addc68d9..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/attributes/ValueKeyAccessServerOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/attributes/attributes.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.attributes; - -public interface ValueKeyAccessServerOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.attributes.ValueKeyAccessServer) - com.google.protobuf.MessageOrBuilder { - - /** - * string value_id = 1 [json_name = "valueId"]; - * @return The valueId. - */ - java.lang.String getValueId(); - /** - * string value_id = 1 [json_name = "valueId"]; - * @return The bytes for valueId. - */ - com.google.protobuf.ByteString - getValueIdBytes(); - - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The keyAccessServerId. - */ - java.lang.String getKeyAccessServerId(); - /** - * string key_access_server_id = 2 [json_name = "keyAccessServerId"]; - * @return The bytes for keyAccessServerId. - */ - com.google.protobuf.ByteString - getKeyAccessServerIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequest.java deleted file mode 100644 index da77385d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequest.java +++ /dev/null @@ -1,811 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.CreateNamespaceRequest} - */ -public final class CreateNamespaceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.CreateNamespaceRequest) - CreateNamespaceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateNamespaceRequest.newBuilder() to construct. - private CreateNamespaceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateNamespaceRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateNamespaceRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * Required
-   * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.CreateNamespaceRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.CreateNamespaceRequest other = (io.opentdf.platform.policy.namespaces.CreateNamespaceRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.CreateNamespaceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.CreateNamespaceRequest) - io.opentdf.platform.policy.namespaces.CreateNamespaceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.CreateNamespaceRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.CreateNamespaceRequest build() { - io.opentdf.platform.policy.namespaces.CreateNamespaceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.CreateNamespaceRequest buildPartial() { - io.opentdf.platform.policy.namespaces.CreateNamespaceRequest result = new io.opentdf.platform.policy.namespaces.CreateNamespaceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.CreateNamespaceRequest) { - return mergeFrom((io.opentdf.platform.policy.namespaces.CreateNamespaceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest other) { - if (other == io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Required
-     * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.CreateNamespaceRequest) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.CreateNamespaceRequest) - private static final io.opentdf.platform.policy.namespaces.CreateNamespaceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.CreateNamespaceRequest(); - } - - public static io.opentdf.platform.policy.namespaces.CreateNamespaceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNamespaceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.CreateNamespaceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequestOrBuilder.java deleted file mode 100644 index 0451297d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceRequestOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface CreateNamespaceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.CreateNamespaceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required
-   * 
- * - * string name = 1 [json_name = "name", (.buf.validate.field) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponse.java deleted file mode 100644 index b1e183cb..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.CreateNamespaceResponse} - */ -public final class CreateNamespaceResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.CreateNamespaceResponse) - CreateNamespaceResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateNamespaceResponse.newBuilder() to construct. - private CreateNamespaceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateNamespaceResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateNamespaceResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.Builder.class); - } - - private int bitField0_; - public static final int NAMESPACE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Namespace namespace_; - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - @java.lang.Override - public boolean hasNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - @java.lang.Override - public io.opentdf.platform.policy.Namespace getNamespace() { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getNamespace()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getNamespace()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.CreateNamespaceResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.CreateNamespaceResponse other = (io.opentdf.platform.policy.namespaces.CreateNamespaceResponse) obj; - - if (hasNamespace() != other.hasNamespace()) return false; - if (hasNamespace()) { - if (!getNamespace() - .equals(other.getNamespace())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasNamespace()) { - hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getNamespace().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.CreateNamespaceResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.CreateNamespaceResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.CreateNamespaceResponse) - io.opentdf.platform.policy.namespaces.CreateNamespaceResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNamespaceFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - namespace_ = null; - if (namespaceBuilder_ != null) { - namespaceBuilder_.dispose(); - namespaceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_CreateNamespaceResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse build() { - io.opentdf.platform.policy.namespaces.CreateNamespaceResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse buildPartial() { - io.opentdf.platform.policy.namespaces.CreateNamespaceResponse result = new io.opentdf.platform.policy.namespaces.CreateNamespaceResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.CreateNamespaceResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.namespace_ = namespaceBuilder_ == null - ? namespace_ - : namespaceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.CreateNamespaceResponse) { - return mergeFrom((io.opentdf.platform.policy.namespaces.CreateNamespaceResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.CreateNamespaceResponse other) { - if (other == io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.getDefaultInstance()) return this; - if (other.hasNamespace()) { - mergeNamespace(other.getNamespace()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getNamespaceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Namespace namespace_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespaceBuilder_; - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - public boolean hasNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - public io.opentdf.platform.policy.Namespace getNamespace() { - if (namespaceBuilder_ == null) { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } else { - return namespaceBuilder_.getMessage(); - } - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder setNamespace(io.opentdf.platform.policy.Namespace value) { - if (namespaceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - namespace_ = value; - } else { - namespaceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder setNamespace( - io.opentdf.platform.policy.Namespace.Builder builderForValue) { - if (namespaceBuilder_ == null) { - namespace_ = builderForValue.build(); - } else { - namespaceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder mergeNamespace(io.opentdf.platform.policy.Namespace value) { - if (namespaceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - namespace_ != null && - namespace_ != io.opentdf.platform.policy.Namespace.getDefaultInstance()) { - getNamespaceBuilder().mergeFrom(value); - } else { - namespace_ = value; - } - } else { - namespaceBuilder_.mergeFrom(value); - } - if (namespace_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder clearNamespace() { - bitField0_ = (bitField0_ & ~0x00000001); - namespace_ = null; - if (namespaceBuilder_ != null) { - namespaceBuilder_.dispose(); - namespaceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public io.opentdf.platform.policy.Namespace.Builder getNamespaceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getNamespaceFieldBuilder().getBuilder(); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { - if (namespaceBuilder_ != null) { - return namespaceBuilder_.getMessageOrBuilder(); - } else { - return namespace_ == null ? - io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> - getNamespaceFieldBuilder() { - if (namespaceBuilder_ == null) { - namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( - getNamespace(), - getParentForChildren(), - isClean()); - namespace_ = null; - } - return namespaceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.CreateNamespaceResponse) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.CreateNamespaceResponse) - private static final io.opentdf.platform.policy.namespaces.CreateNamespaceResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.CreateNamespaceResponse(); - } - - public static io.opentdf.platform.policy.namespaces.CreateNamespaceResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNamespaceResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponseOrBuilder.java deleted file mode 100644 index 1777ae2b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/CreateNamespaceResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface CreateNamespaceResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.CreateNamespaceResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - boolean hasNamespace(); - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - io.opentdf.platform.policy.Namespace getNamespace(); - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequest.java deleted file mode 100644 index 5fd35eaa..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.DeactivateNamespaceRequest} - */ -public final class DeactivateNamespaceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.DeactivateNamespaceRequest) - DeactivateNamespaceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeactivateNamespaceRequest.newBuilder() to construct. - private DeactivateNamespaceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeactivateNamespaceRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeactivateNamespaceRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest other = (io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.DeactivateNamespaceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.DeactivateNamespaceRequest) - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest build() { - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest buildPartial() { - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest result = new io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest) { - return mergeFrom((io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest other) { - if (other == io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.DeactivateNamespaceRequest) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.DeactivateNamespaceRequest) - private static final io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest(); - } - - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeactivateNamespaceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequestOrBuilder.java deleted file mode 100644 index 425660ed..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface DeactivateNamespaceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.DeactivateNamespaceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponse.java deleted file mode 100644 index 966726dc..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponse.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.DeactivateNamespaceResponse} - */ -public final class DeactivateNamespaceResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.DeactivateNamespaceResponse) - DeactivateNamespaceResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeactivateNamespaceResponse.newBuilder() to construct. - private DeactivateNamespaceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeactivateNamespaceResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeactivateNamespaceResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse other = (io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.DeactivateNamespaceResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.DeactivateNamespaceResponse) - io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse build() { - io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse buildPartial() { - io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse result = new io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse) { - return mergeFrom((io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse other) { - if (other == io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.DeactivateNamespaceResponse) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.DeactivateNamespaceResponse) - private static final io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse(); - } - - public static io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeactivateNamespaceResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponseOrBuilder.java deleted file mode 100644 index b800fb04..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/DeactivateNamespaceResponseOrBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface DeactivateNamespaceResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.DeactivateNamespaceResponse) - com.google.protobuf.MessageOrBuilder { -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequest.java deleted file mode 100644 index d0529acd..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.GetNamespaceRequest} - */ -public final class GetNamespaceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.GetNamespaceRequest) - GetNamespaceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetNamespaceRequest.newBuilder() to construct. - private GetNamespaceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNamespaceRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNamespaceRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.GetNamespaceRequest.class, io.opentdf.platform.policy.namespaces.GetNamespaceRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.GetNamespaceRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.GetNamespaceRequest other = (io.opentdf.platform.policy.namespaces.GetNamespaceRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.GetNamespaceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.GetNamespaceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.GetNamespaceRequest) - io.opentdf.platform.policy.namespaces.GetNamespaceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.GetNamespaceRequest.class, io.opentdf.platform.policy.namespaces.GetNamespaceRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.GetNamespaceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.GetNamespaceRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.GetNamespaceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.GetNamespaceRequest build() { - io.opentdf.platform.policy.namespaces.GetNamespaceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.GetNamespaceRequest buildPartial() { - io.opentdf.platform.policy.namespaces.GetNamespaceRequest result = new io.opentdf.platform.policy.namespaces.GetNamespaceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.GetNamespaceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.GetNamespaceRequest) { - return mergeFrom((io.opentdf.platform.policy.namespaces.GetNamespaceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.GetNamespaceRequest other) { - if (other == io.opentdf.platform.policy.namespaces.GetNamespaceRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.GetNamespaceRequest) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.GetNamespaceRequest) - private static final io.opentdf.platform.policy.namespaces.GetNamespaceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.GetNamespaceRequest(); - } - - public static io.opentdf.platform.policy.namespaces.GetNamespaceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNamespaceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.GetNamespaceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequestOrBuilder.java deleted file mode 100644 index a2a70855..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface GetNamespaceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.GetNamespaceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponse.java deleted file mode 100644 index fac2b52d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.GetNamespaceResponse} - */ -public final class GetNamespaceResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.GetNamespaceResponse) - GetNamespaceResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetNamespaceResponse.newBuilder() to construct. - private GetNamespaceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNamespaceResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNamespaceResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.GetNamespaceResponse.class, io.opentdf.platform.policy.namespaces.GetNamespaceResponse.Builder.class); - } - - private int bitField0_; - public static final int NAMESPACE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Namespace namespace_; - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - @java.lang.Override - public boolean hasNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - @java.lang.Override - public io.opentdf.platform.policy.Namespace getNamespace() { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getNamespace()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getNamespace()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.GetNamespaceResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.GetNamespaceResponse other = (io.opentdf.platform.policy.namespaces.GetNamespaceResponse) obj; - - if (hasNamespace() != other.hasNamespace()) return false; - if (hasNamespace()) { - if (!getNamespace() - .equals(other.getNamespace())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasNamespace()) { - hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getNamespace().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.GetNamespaceResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.GetNamespaceResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.GetNamespaceResponse) - io.opentdf.platform.policy.namespaces.GetNamespaceResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.GetNamespaceResponse.class, io.opentdf.platform.policy.namespaces.GetNamespaceResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.GetNamespaceResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNamespaceFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - namespace_ = null; - if (namespaceBuilder_ != null) { - namespaceBuilder_.dispose(); - namespaceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_GetNamespaceResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.GetNamespaceResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.GetNamespaceResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.GetNamespaceResponse build() { - io.opentdf.platform.policy.namespaces.GetNamespaceResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.GetNamespaceResponse buildPartial() { - io.opentdf.platform.policy.namespaces.GetNamespaceResponse result = new io.opentdf.platform.policy.namespaces.GetNamespaceResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.GetNamespaceResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.namespace_ = namespaceBuilder_ == null - ? namespace_ - : namespaceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.GetNamespaceResponse) { - return mergeFrom((io.opentdf.platform.policy.namespaces.GetNamespaceResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.GetNamespaceResponse other) { - if (other == io.opentdf.platform.policy.namespaces.GetNamespaceResponse.getDefaultInstance()) return this; - if (other.hasNamespace()) { - mergeNamespace(other.getNamespace()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getNamespaceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Namespace namespace_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespaceBuilder_; - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - public boolean hasNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - public io.opentdf.platform.policy.Namespace getNamespace() { - if (namespaceBuilder_ == null) { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } else { - return namespaceBuilder_.getMessage(); - } - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder setNamespace(io.opentdf.platform.policy.Namespace value) { - if (namespaceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - namespace_ = value; - } else { - namespaceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder setNamespace( - io.opentdf.platform.policy.Namespace.Builder builderForValue) { - if (namespaceBuilder_ == null) { - namespace_ = builderForValue.build(); - } else { - namespaceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder mergeNamespace(io.opentdf.platform.policy.Namespace value) { - if (namespaceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - namespace_ != null && - namespace_ != io.opentdf.platform.policy.Namespace.getDefaultInstance()) { - getNamespaceBuilder().mergeFrom(value); - } else { - namespace_ = value; - } - } else { - namespaceBuilder_.mergeFrom(value); - } - if (namespace_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder clearNamespace() { - bitField0_ = (bitField0_ & ~0x00000001); - namespace_ = null; - if (namespaceBuilder_ != null) { - namespaceBuilder_.dispose(); - namespaceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public io.opentdf.platform.policy.Namespace.Builder getNamespaceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getNamespaceFieldBuilder().getBuilder(); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { - if (namespaceBuilder_ != null) { - return namespaceBuilder_.getMessageOrBuilder(); - } else { - return namespace_ == null ? - io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> - getNamespaceFieldBuilder() { - if (namespaceBuilder_ == null) { - namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( - getNamespace(), - getParentForChildren(), - isClean()); - namespace_ = null; - } - return namespaceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.GetNamespaceResponse) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.GetNamespaceResponse) - private static final io.opentdf.platform.policy.namespaces.GetNamespaceResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.GetNamespaceResponse(); - } - - public static io.opentdf.platform.policy.namespaces.GetNamespaceResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNamespaceResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.GetNamespaceResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponseOrBuilder.java deleted file mode 100644 index 80192090..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/GetNamespaceResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface GetNamespaceResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.GetNamespaceResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - boolean hasNamespace(); - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - io.opentdf.platform.policy.Namespace getNamespace(); - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequest.java deleted file mode 100644 index 56ccdf5d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequest.java +++ /dev/null @@ -1,528 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.ListNamespacesRequest} - */ -public final class ListNamespacesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.ListNamespacesRequest) - ListNamespacesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNamespacesRequest.newBuilder() to construct. - private ListNamespacesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNamespacesRequest() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNamespacesRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.ListNamespacesRequest.class, io.opentdf.platform.policy.namespaces.ListNamespacesRequest.Builder.class); - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_ = 0; - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The state. - */ - @java.lang.Override public io.opentdf.platform.common.ActiveStateEnum getState() { - io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); - return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != io.opentdf.platform.common.ActiveStateEnum.ACTIVE_STATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.ListNamespacesRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.ListNamespacesRequest other = (io.opentdf.platform.policy.namespaces.ListNamespacesRequest) obj; - - if (state_ != other.state_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.ListNamespacesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.ListNamespacesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.ListNamespacesRequest) - io.opentdf.platform.policy.namespaces.ListNamespacesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.ListNamespacesRequest.class, io.opentdf.platform.policy.namespaces.ListNamespacesRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.ListNamespacesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - state_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.ListNamespacesRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.ListNamespacesRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.ListNamespacesRequest build() { - io.opentdf.platform.policy.namespaces.ListNamespacesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.ListNamespacesRequest buildPartial() { - io.opentdf.platform.policy.namespaces.ListNamespacesRequest result = new io.opentdf.platform.policy.namespaces.ListNamespacesRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.ListNamespacesRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.state_ = state_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.ListNamespacesRequest) { - return mergeFrom((io.opentdf.platform.policy.namespaces.ListNamespacesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.ListNamespacesRequest other) { - if (other == io.opentdf.platform.policy.namespaces.ListNamespacesRequest.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - state_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int state_ = 0; - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The state. - */ - @java.lang.Override - public io.opentdf.platform.common.ActiveStateEnum getState() { - io.opentdf.platform.common.ActiveStateEnum result = io.opentdf.platform.common.ActiveStateEnum.forNumber(state_); - return result == null ? io.opentdf.platform.common.ActiveStateEnum.UNRECOGNIZED : result; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(io.opentdf.platform.common.ActiveStateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * ACTIVE by default when not specified
-     * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000001); - state_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.ListNamespacesRequest) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.ListNamespacesRequest) - private static final io.opentdf.platform.policy.namespaces.ListNamespacesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.ListNamespacesRequest(); - } - - public static io.opentdf.platform.policy.namespaces.ListNamespacesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNamespacesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.ListNamespacesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequestOrBuilder.java deleted file mode 100644 index 4fe596c8..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesRequestOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface ListNamespacesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.ListNamespacesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * ACTIVE by default when not specified
-   * 
- * - * .common.ActiveStateEnum state = 1 [json_name = "state"]; - * @return The state. - */ - io.opentdf.platform.common.ActiveStateEnum getState(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponse.java deleted file mode 100644 index 9e08998e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.ListNamespacesResponse} - */ -public final class ListNamespacesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.ListNamespacesResponse) - ListNamespacesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListNamespacesResponse.newBuilder() to construct. - private ListNamespacesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListNamespacesResponse() { - namespaces_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListNamespacesResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.ListNamespacesResponse.class, io.opentdf.platform.policy.namespaces.ListNamespacesResponse.Builder.class); - } - - public static final int NAMESPACES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List namespaces_; - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - @java.lang.Override - public java.util.List getNamespacesList() { - return namespaces_; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - @java.lang.Override - public java.util.List - getNamespacesOrBuilderList() { - return namespaces_; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - @java.lang.Override - public int getNamespacesCount() { - return namespaces_.size(); - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.Namespace getNamespaces(int index) { - return namespaces_.get(index); - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespacesOrBuilder( - int index) { - return namespaces_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < namespaces_.size(); i++) { - output.writeMessage(1, namespaces_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < namespaces_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, namespaces_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.ListNamespacesResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.ListNamespacesResponse other = (io.opentdf.platform.policy.namespaces.ListNamespacesResponse) obj; - - if (!getNamespacesList() - .equals(other.getNamespacesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNamespacesCount() > 0) { - hash = (37 * hash) + NAMESPACES_FIELD_NUMBER; - hash = (53 * hash) + getNamespacesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.ListNamespacesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.ListNamespacesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.ListNamespacesResponse) - io.opentdf.platform.policy.namespaces.ListNamespacesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.ListNamespacesResponse.class, io.opentdf.platform.policy.namespaces.ListNamespacesResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.ListNamespacesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (namespacesBuilder_ == null) { - namespaces_ = java.util.Collections.emptyList(); - } else { - namespaces_ = null; - namespacesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_ListNamespacesResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.ListNamespacesResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.ListNamespacesResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.ListNamespacesResponse build() { - io.opentdf.platform.policy.namespaces.ListNamespacesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.ListNamespacesResponse buildPartial() { - io.opentdf.platform.policy.namespaces.ListNamespacesResponse result = new io.opentdf.platform.policy.namespaces.ListNamespacesResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.namespaces.ListNamespacesResponse result) { - if (namespacesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - namespaces_ = java.util.Collections.unmodifiableList(namespaces_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.namespaces_ = namespaces_; - } else { - result.namespaces_ = namespacesBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.ListNamespacesResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.ListNamespacesResponse) { - return mergeFrom((io.opentdf.platform.policy.namespaces.ListNamespacesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.ListNamespacesResponse other) { - if (other == io.opentdf.platform.policy.namespaces.ListNamespacesResponse.getDefaultInstance()) return this; - if (namespacesBuilder_ == null) { - if (!other.namespaces_.isEmpty()) { - if (namespaces_.isEmpty()) { - namespaces_ = other.namespaces_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNamespacesIsMutable(); - namespaces_.addAll(other.namespaces_); - } - onChanged(); - } - } else { - if (!other.namespaces_.isEmpty()) { - if (namespacesBuilder_.isEmpty()) { - namespacesBuilder_.dispose(); - namespacesBuilder_ = null; - namespaces_ = other.namespaces_; - bitField0_ = (bitField0_ & ~0x00000001); - namespacesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNamespacesFieldBuilder() : null; - } else { - namespacesBuilder_.addAllMessages(other.namespaces_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.Namespace m = - input.readMessage( - io.opentdf.platform.policy.Namespace.parser(), - extensionRegistry); - if (namespacesBuilder_ == null) { - ensureNamespacesIsMutable(); - namespaces_.add(m); - } else { - namespacesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List namespaces_ = - java.util.Collections.emptyList(); - private void ensureNamespacesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - namespaces_ = new java.util.ArrayList(namespaces_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespacesBuilder_; - - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public java.util.List getNamespacesList() { - if (namespacesBuilder_ == null) { - return java.util.Collections.unmodifiableList(namespaces_); - } else { - return namespacesBuilder_.getMessageList(); - } - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public int getNamespacesCount() { - if (namespacesBuilder_ == null) { - return namespaces_.size(); - } else { - return namespacesBuilder_.getCount(); - } - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public io.opentdf.platform.policy.Namespace getNamespaces(int index) { - if (namespacesBuilder_ == null) { - return namespaces_.get(index); - } else { - return namespacesBuilder_.getMessage(index); - } - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder setNamespaces( - int index, io.opentdf.platform.policy.Namespace value) { - if (namespacesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNamespacesIsMutable(); - namespaces_.set(index, value); - onChanged(); - } else { - namespacesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder setNamespaces( - int index, io.opentdf.platform.policy.Namespace.Builder builderForValue) { - if (namespacesBuilder_ == null) { - ensureNamespacesIsMutable(); - namespaces_.set(index, builderForValue.build()); - onChanged(); - } else { - namespacesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder addNamespaces(io.opentdf.platform.policy.Namespace value) { - if (namespacesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNamespacesIsMutable(); - namespaces_.add(value); - onChanged(); - } else { - namespacesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder addNamespaces( - int index, io.opentdf.platform.policy.Namespace value) { - if (namespacesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNamespacesIsMutable(); - namespaces_.add(index, value); - onChanged(); - } else { - namespacesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder addNamespaces( - io.opentdf.platform.policy.Namespace.Builder builderForValue) { - if (namespacesBuilder_ == null) { - ensureNamespacesIsMutable(); - namespaces_.add(builderForValue.build()); - onChanged(); - } else { - namespacesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder addNamespaces( - int index, io.opentdf.platform.policy.Namespace.Builder builderForValue) { - if (namespacesBuilder_ == null) { - ensureNamespacesIsMutable(); - namespaces_.add(index, builderForValue.build()); - onChanged(); - } else { - namespacesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder addAllNamespaces( - java.lang.Iterable values) { - if (namespacesBuilder_ == null) { - ensureNamespacesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, namespaces_); - onChanged(); - } else { - namespacesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder clearNamespaces() { - if (namespacesBuilder_ == null) { - namespaces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - namespacesBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public Builder removeNamespaces(int index) { - if (namespacesBuilder_ == null) { - ensureNamespacesIsMutable(); - namespaces_.remove(index); - onChanged(); - } else { - namespacesBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public io.opentdf.platform.policy.Namespace.Builder getNamespacesBuilder( - int index) { - return getNamespacesFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespacesOrBuilder( - int index) { - if (namespacesBuilder_ == null) { - return namespaces_.get(index); } else { - return namespacesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public java.util.List - getNamespacesOrBuilderList() { - if (namespacesBuilder_ != null) { - return namespacesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(namespaces_); - } - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public io.opentdf.platform.policy.Namespace.Builder addNamespacesBuilder() { - return getNamespacesFieldBuilder().addBuilder( - io.opentdf.platform.policy.Namespace.getDefaultInstance()); - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public io.opentdf.platform.policy.Namespace.Builder addNamespacesBuilder( - int index) { - return getNamespacesFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Namespace.getDefaultInstance()); - } - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - public java.util.List - getNamespacesBuilderList() { - return getNamespacesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> - getNamespacesFieldBuilder() { - if (namespacesBuilder_ == null) { - namespacesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( - namespaces_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - namespaces_ = null; - } - return namespacesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.ListNamespacesResponse) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.ListNamespacesResponse) - private static final io.opentdf.platform.policy.namespaces.ListNamespacesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.ListNamespacesResponse(); - } - - public static io.opentdf.platform.policy.namespaces.ListNamespacesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNamespacesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.ListNamespacesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponseOrBuilder.java deleted file mode 100644 index ac8c1d34..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/ListNamespacesResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface ListNamespacesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.ListNamespacesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - java.util.List - getNamespacesList(); - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - io.opentdf.platform.policy.Namespace getNamespaces(int index); - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - int getNamespacesCount(); - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - java.util.List - getNamespacesOrBuilderList(); - /** - * repeated .policy.Namespace namespaces = 1 [json_name = "namespaces"]; - */ - io.opentdf.platform.policy.NamespaceOrBuilder getNamespacesOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespaceServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespaceServiceGrpc.java deleted file mode 100644 index e8c70f2a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespaceServiceGrpc.java +++ /dev/null @@ -1,589 +0,0 @@ -package io.opentdf.platform.policy.namespaces; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.61.1)", - comments = "Source: policy/namespaces/namespaces.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class NamespaceServiceGrpc { - - private NamespaceServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "policy.namespaces.NamespaceService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetNamespaceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNamespace", - requestType = io.opentdf.platform.policy.namespaces.GetNamespaceRequest.class, - responseType = io.opentdf.platform.policy.namespaces.GetNamespaceResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetNamespaceMethod() { - io.grpc.MethodDescriptor getGetNamespaceMethod; - if ((getGetNamespaceMethod = NamespaceServiceGrpc.getGetNamespaceMethod) == null) { - synchronized (NamespaceServiceGrpc.class) { - if ((getGetNamespaceMethod = NamespaceServiceGrpc.getGetNamespaceMethod) == null) { - NamespaceServiceGrpc.getGetNamespaceMethod = getGetNamespaceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNamespace")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.GetNamespaceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.GetNamespaceResponse.getDefaultInstance())) - .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("GetNamespace")) - .build(); - } - } - } - return getGetNamespaceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListNamespacesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNamespaces", - requestType = io.opentdf.platform.policy.namespaces.ListNamespacesRequest.class, - responseType = io.opentdf.platform.policy.namespaces.ListNamespacesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListNamespacesMethod() { - io.grpc.MethodDescriptor getListNamespacesMethod; - if ((getListNamespacesMethod = NamespaceServiceGrpc.getListNamespacesMethod) == null) { - synchronized (NamespaceServiceGrpc.class) { - if ((getListNamespacesMethod = NamespaceServiceGrpc.getListNamespacesMethod) == null) { - NamespaceServiceGrpc.getListNamespacesMethod = getListNamespacesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNamespaces")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.ListNamespacesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.ListNamespacesResponse.getDefaultInstance())) - .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("ListNamespaces")) - .build(); - } - } - } - return getListNamespacesMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateNamespaceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateNamespace", - requestType = io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.class, - responseType = io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateNamespaceMethod() { - io.grpc.MethodDescriptor getCreateNamespaceMethod; - if ((getCreateNamespaceMethod = NamespaceServiceGrpc.getCreateNamespaceMethod) == null) { - synchronized (NamespaceServiceGrpc.class) { - if ((getCreateNamespaceMethod = NamespaceServiceGrpc.getCreateNamespaceMethod) == null) { - NamespaceServiceGrpc.getCreateNamespaceMethod = getCreateNamespaceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNamespace")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.CreateNamespaceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.CreateNamespaceResponse.getDefaultInstance())) - .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("CreateNamespace")) - .build(); - } - } - } - return getCreateNamespaceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateNamespaceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateNamespace", - requestType = io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.class, - responseType = io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateNamespaceMethod() { - io.grpc.MethodDescriptor getUpdateNamespaceMethod; - if ((getUpdateNamespaceMethod = NamespaceServiceGrpc.getUpdateNamespaceMethod) == null) { - synchronized (NamespaceServiceGrpc.class) { - if ((getUpdateNamespaceMethod = NamespaceServiceGrpc.getUpdateNamespaceMethod) == null) { - NamespaceServiceGrpc.getUpdateNamespaceMethod = getUpdateNamespaceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateNamespace")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.getDefaultInstance())) - .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("UpdateNamespace")) - .build(); - } - } - } - return getUpdateNamespaceMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeactivateNamespaceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeactivateNamespace", - requestType = io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.class, - responseType = io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeactivateNamespaceMethod() { - io.grpc.MethodDescriptor getDeactivateNamespaceMethod; - if ((getDeactivateNamespaceMethod = NamespaceServiceGrpc.getDeactivateNamespaceMethod) == null) { - synchronized (NamespaceServiceGrpc.class) { - if ((getDeactivateNamespaceMethod = NamespaceServiceGrpc.getDeactivateNamespaceMethod) == null) { - NamespaceServiceGrpc.getDeactivateNamespaceMethod = getDeactivateNamespaceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeactivateNamespace")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse.getDefaultInstance())) - .setSchemaDescriptor(new NamespaceServiceMethodDescriptorSupplier("DeactivateNamespace")) - .build(); - } - } - } - return getDeactivateNamespaceMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static NamespaceServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public NamespaceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NamespaceServiceStub(channel, callOptions); - } - }; - return NamespaceServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static NamespaceServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public NamespaceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NamespaceServiceBlockingStub(channel, callOptions); - } - }; - return NamespaceServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static NamespaceServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public NamespaceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NamespaceServiceFutureStub(channel, callOptions); - } - }; - return NamespaceServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public interface AsyncService { - - /** - */ - default void getNamespace(io.opentdf.platform.policy.namespaces.GetNamespaceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNamespaceMethod(), responseObserver); - } - - /** - */ - default void listNamespaces(io.opentdf.platform.policy.namespaces.ListNamespacesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNamespacesMethod(), responseObserver); - } - - /** - */ - default void createNamespace(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNamespaceMethod(), responseObserver); - } - - /** - */ - default void updateNamespace(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNamespaceMethod(), responseObserver); - } - - /** - */ - default void deactivateNamespace(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeactivateNamespaceMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service NamespaceService. - */ - public static abstract class NamespaceServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return NamespaceServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service NamespaceService. - */ - public static final class NamespaceServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private NamespaceServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected NamespaceServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NamespaceServiceStub(channel, callOptions); - } - - /** - */ - public void getNamespace(io.opentdf.platform.policy.namespaces.GetNamespaceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNamespaceMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void listNamespaces(io.opentdf.platform.policy.namespaces.ListNamespacesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNamespacesMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void createNamespace(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void updateNamespace(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateNamespaceMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void deactivateNamespace(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeactivateNamespaceMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service NamespaceService. - */ - public static final class NamespaceServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private NamespaceServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected NamespaceServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NamespaceServiceBlockingStub(channel, callOptions); - } - - /** - */ - public io.opentdf.platform.policy.namespaces.GetNamespaceResponse getNamespace(io.opentdf.platform.policy.namespaces.GetNamespaceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNamespaceMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.namespaces.ListNamespacesResponse listNamespaces(io.opentdf.platform.policy.namespaces.ListNamespacesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNamespacesMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.namespaces.CreateNamespaceResponse createNamespace(io.opentdf.platform.policy.namespaces.CreateNamespaceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateNamespaceMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse updateNamespace(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateNamespaceMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse deactivateNamespace(io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeactivateNamespaceMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service NamespaceService. - */ - public static final class NamespaceServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private NamespaceServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected NamespaceServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NamespaceServiceFutureStub(channel, callOptions); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getNamespace( - io.opentdf.platform.policy.namespaces.GetNamespaceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNamespaceMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture listNamespaces( - io.opentdf.platform.policy.namespaces.ListNamespacesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNamespacesMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture createNamespace( - io.opentdf.platform.policy.namespaces.CreateNamespaceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateNamespaceMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture updateNamespace( - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateNamespaceMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture deactivateNamespace( - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeactivateNamespaceMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_NAMESPACE = 0; - private static final int METHODID_LIST_NAMESPACES = 1; - private static final int METHODID_CREATE_NAMESPACE = 2; - private static final int METHODID_UPDATE_NAMESPACE = 3; - private static final int METHODID_DEACTIVATE_NAMESPACE = 4; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_GET_NAMESPACE: - serviceImpl.getNamespace((io.opentdf.platform.policy.namespaces.GetNamespaceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_NAMESPACES: - serviceImpl.listNamespaces((io.opentdf.platform.policy.namespaces.ListNamespacesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_NAMESPACE: - serviceImpl.createNamespace((io.opentdf.platform.policy.namespaces.CreateNamespaceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_NAMESPACE: - serviceImpl.updateNamespace((io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DEACTIVATE_NAMESPACE: - serviceImpl.deactivateNamespace((io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetNamespaceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.namespaces.GetNamespaceRequest, - io.opentdf.platform.policy.namespaces.GetNamespaceResponse>( - service, METHODID_GET_NAMESPACE))) - .addMethod( - getListNamespacesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.namespaces.ListNamespacesRequest, - io.opentdf.platform.policy.namespaces.ListNamespacesResponse>( - service, METHODID_LIST_NAMESPACES))) - .addMethod( - getCreateNamespaceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.namespaces.CreateNamespaceRequest, - io.opentdf.platform.policy.namespaces.CreateNamespaceResponse>( - service, METHODID_CREATE_NAMESPACE))) - .addMethod( - getUpdateNamespaceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest, - io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse>( - service, METHODID_UPDATE_NAMESPACE))) - .addMethod( - getDeactivateNamespaceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.namespaces.DeactivateNamespaceRequest, - io.opentdf.platform.policy.namespaces.DeactivateNamespaceResponse>( - service, METHODID_DEACTIVATE_NAMESPACE))) - .build(); - } - - private static abstract class NamespaceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - NamespaceServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("NamespaceService"); - } - } - - private static final class NamespaceServiceFileDescriptorSupplier - extends NamespaceServiceBaseDescriptorSupplier { - NamespaceServiceFileDescriptorSupplier() {} - } - - private static final class NamespaceServiceMethodDescriptorSupplier - extends NamespaceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - NamespaceServiceMethodDescriptorSupplier(java.lang.String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (NamespaceServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new NamespaceServiceFileDescriptorSupplier()) - .addMethod(getGetNamespaceMethod()) - .addMethod(getListNamespacesMethod()) - .addMethod(getCreateNamespaceMethod()) - .addMethod(getUpdateNamespaceMethod()) - .addMethod(getDeactivateNamespaceMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespacesProto.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespacesProto.java deleted file mode 100644 index 3aa3713d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/NamespacesProto.java +++ /dev/null @@ -1,218 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public final class NamespacesProto { - private NamespacesProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_GetNamespaceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_GetNamespaceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_GetNamespaceResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_GetNamespaceResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_ListNamespacesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_ListNamespacesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_ListNamespacesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_ListNamespacesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_CreateNamespaceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_CreateNamespaceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_CreateNamespaceResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_CreateNamespaceResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_UpdateNamespaceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_UpdateNamespaceResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_DeactivateNamespaceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_namespaces_DeactivateNamespaceResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\"policy/namespaces/namespaces.proto\022\021po" + - "licy.namespaces\032\033buf/validate/validate.p" + - "roto\032\034google/api/annotations.proto\032\023comm" + - "on/common.proto\032\024policy/objects.proto\"-\n" + - "\023GetNamespaceRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001" + - "R\002id\"G\n\024GetNamespaceResponse\022/\n\tnamespac" + - "e\030\001 \001(\0132\021.policy.NamespaceR\tnamespace\"F\n" + - "\025ListNamespacesRequest\022-\n\005state\030\001 \001(\0162\027." + - "common.ActiveStateEnumR\005state\"K\n\026ListNam" + - "espacesResponse\0221\n\nnamespaces\030\001 \003(\0132\021.po" + - "licy.NamespaceR\nnamespaces\"\307\004\n\026CreateNam" + - "espaceRequest\022\367\003\n\004name\030\001 \001(\tB\342\003\272H\336\003r\003\030\375\001" + - "\272\001\322\003\n\020namespace_format\022\352\002Namespace must " + - "be a valid hostname. It should include a" + - "t least one dot, with each segment (labe" + - "l) starting and ending with an alphanume" + - "ric character. Each label must be 1 to 6" + - "3 characters long, allowing hyphens but " + - "not as the first or last character. The " + - "top-level domain (the last segment after" + - " the final dot) must consist of at least" + - " two alphabetic characters.\032Qthis.matche" + - "s(\'^([a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-" + - "zA-Z0-9])?\\\\.)+[a-zA-Z]{2,}$\')\310\001\001R\004name\022" + - "3\n\010metadata\030d \001(\0132\027.common.MetadataMutab" + - "leR\010metadata\"J\n\027CreateNamespaceResponse\022" + - "/\n\tnamespace\030\001 \001(\0132\021.policy.NamespaceR\tn" + - "amespace\"\273\001\n\026UpdateNamespaceRequest\022\026\n\002i" + - "d\030\001 \001(\tB\006\272H\003\310\001\001R\002id\0223\n\010metadata\030d \001(\0132\027." + - "common.MetadataMutableR\010metadata\022T\n\030meta" + - "data_update_behavior\030e \001(\0162\032.common.Meta" + - "dataUpdateEnumR\026metadataUpdateBehavior\"J" + - "\n\027UpdateNamespaceResponse\022/\n\tnamespace\030\001" + - " \001(\0132\021.policy.NamespaceR\tnamespace\"4\n\032De" + - "activateNamespaceRequest\022\026\n\002id\030\001 \001(\tB\006\272H" + - "\003\310\001\001R\002id\"\035\n\033DeactivateNamespaceResponse2" + - "\336\005\n\020NamespaceService\022\204\001\n\014GetNamespace\022&." + - "policy.namespaces.GetNamespaceRequest\032\'." + - "policy.namespaces.GetNamespaceResponse\"#" + - "\202\323\344\223\002\035\022\033/attributes/namespaces/{id}\022\205\001\n\016" + - "ListNamespaces\022(.policy.namespaces.ListN" + - "amespacesRequest\032).policy.namespaces.Lis" + - "tNamespacesResponse\"\036\202\323\344\223\002\030\022\026/attributes" + - "/namespaces\022\213\001\n\017CreateNamespace\022).policy" + - ".namespaces.CreateNamespaceRequest\032*.pol" + - "icy.namespaces.CreateNamespaceResponse\"!" + - "\202\323\344\223\002\033\"\026/attributes/namespaces:\001*\022\220\001\n\017Up" + - "dateNamespace\022).policy.namespaces.Update" + - "NamespaceRequest\032*.policy.namespaces.Upd" + - "ateNamespaceResponse\"&\202\323\344\223\002 2\033/attribute" + - "s/namespaces/{id}:\001*\022\231\001\n\023DeactivateNames" + - "pace\022-.policy.namespaces.DeactivateNames" + - "paceRequest\032..policy.namespaces.Deactiva" + - "teNamespaceResponse\"#\202\323\344\223\002\035*\033/attributes" + - "/namespaces/{id}B\235\001\n%io.opentdf.platform" + - ".policy.namespacesB\017NamespacesProtoP\001\242\002\003" + - "PNX\252\002\021Policy.Namespaces\312\002\021Policy\\Namespa" + - "ces\342\002\035Policy\\Namespaces\\GPBMetadata\352\002\022Po" + - "licy::Namespacesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - io.opentdf.platform.common.CommonProto.getDescriptor(), - io.opentdf.platform.policy.ObjectsProto.getDescriptor(), - }); - internal_static_policy_namespaces_GetNamespaceRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_namespaces_GetNamespaceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_GetNamespaceRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_namespaces_GetNamespaceResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_policy_namespaces_GetNamespaceResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_GetNamespaceResponse_descriptor, - new java.lang.String[] { "Namespace", }); - internal_static_policy_namespaces_ListNamespacesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_policy_namespaces_ListNamespacesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_ListNamespacesRequest_descriptor, - new java.lang.String[] { "State", }); - internal_static_policy_namespaces_ListNamespacesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_policy_namespaces_ListNamespacesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_ListNamespacesResponse_descriptor, - new java.lang.String[] { "Namespaces", }); - internal_static_policy_namespaces_CreateNamespaceRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_policy_namespaces_CreateNamespaceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_CreateNamespaceRequest_descriptor, - new java.lang.String[] { "Name", "Metadata", }); - internal_static_policy_namespaces_CreateNamespaceResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_policy_namespaces_CreateNamespaceResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_CreateNamespaceResponse_descriptor, - new java.lang.String[] { "Namespace", }); - internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_policy_namespaces_UpdateNamespaceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor, - new java.lang.String[] { "Id", "Metadata", "MetadataUpdateBehavior", }); - internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_policy_namespaces_UpdateNamespaceResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor, - new java.lang.String[] { "Namespace", }); - internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_policy_namespaces_DeactivateNamespaceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_DeactivateNamespaceRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_policy_namespaces_DeactivateNamespaceResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_namespaces_DeactivateNamespaceResponse_descriptor, - new java.lang.String[] { }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - io.opentdf.platform.common.CommonProto.getDescriptor(); - io.opentdf.platform.policy.ObjectsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequest.java deleted file mode 100644 index 32f8ec7d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequest.java +++ /dev/null @@ -1,905 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.UpdateNamespaceRequest} - */ -public final class UpdateNamespaceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.UpdateNamespaceRequest) - UpdateNamespaceRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateNamespaceRequest.newBuilder() to construct. - private UpdateNamespaceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateNamespaceRequest() { - id_ = ""; - metadataUpdateBehavior_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateNamespaceRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(101, metadataUpdateBehavior_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(101, metadataUpdateBehavior_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest other = (io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; - hash = (53 * hash) + metadataUpdateBehavior_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.UpdateNamespaceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.UpdateNamespaceRequest) - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.class, io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - metadataUpdateBehavior_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest build() { - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest buildPartial() { - io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest result = new io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadataUpdateBehavior_ = metadataUpdateBehavior_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest) { - return mergeFrom((io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest other) { - if (other == io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.metadataUpdateBehavior_ != 0) { - setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 802 - case 808: { - metadataUpdateBehavior_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 808 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehaviorValue(int value) { - metadataUpdateBehavior_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - metadataUpdateBehavior_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return This builder for chaining. - */ - public Builder clearMetadataUpdateBehavior() { - bitField0_ = (bitField0_ & ~0x00000004); - metadataUpdateBehavior_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.UpdateNamespaceRequest) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.UpdateNamespaceRequest) - private static final io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest(); - } - - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateNamespaceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.UpdateNamespaceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequestOrBuilder.java deleted file mode 100644 index 957e4d67..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceRequestOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface UpdateNamespaceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.UpdateNamespaceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - int getMetadataUpdateBehaviorValue(); - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponse.java deleted file mode 100644 index ca787ac8..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -/** - * Protobuf type {@code policy.namespaces.UpdateNamespaceResponse} - */ -public final class UpdateNamespaceResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.namespaces.UpdateNamespaceResponse) - UpdateNamespaceResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateNamespaceResponse.newBuilder() to construct. - private UpdateNamespaceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateNamespaceResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateNamespaceResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.Builder.class); - } - - private int bitField0_; - public static final int NAMESPACE_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.Namespace namespace_; - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - @java.lang.Override - public boolean hasNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - @java.lang.Override - public io.opentdf.platform.policy.Namespace getNamespace() { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getNamespace()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getNamespace()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse other = (io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse) obj; - - if (hasNamespace() != other.hasNamespace()) return false; - if (hasNamespace()) { - if (!getNamespace() - .equals(other.getNamespace())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasNamespace()) { - hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getNamespace().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.namespaces.UpdateNamespaceResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.namespaces.UpdateNamespaceResponse) - io.opentdf.platform.policy.namespaces.UpdateNamespaceResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.class, io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNamespaceFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - namespace_ = null; - if (namespaceBuilder_ != null) { - namespaceBuilder_.dispose(); - namespaceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.namespaces.NamespacesProto.internal_static_policy_namespaces_UpdateNamespaceResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse build() { - io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse buildPartial() { - io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse result = new io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.namespace_ = namespaceBuilder_ == null - ? namespace_ - : namespaceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse) { - return mergeFrom((io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse other) { - if (other == io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse.getDefaultInstance()) return this; - if (other.hasNamespace()) { - mergeNamespace(other.getNamespace()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getNamespaceFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.Namespace namespace_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> namespaceBuilder_; - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - public boolean hasNamespace() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - public io.opentdf.platform.policy.Namespace getNamespace() { - if (namespaceBuilder_ == null) { - return namespace_ == null ? io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } else { - return namespaceBuilder_.getMessage(); - } - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder setNamespace(io.opentdf.platform.policy.Namespace value) { - if (namespaceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - namespace_ = value; - } else { - namespaceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder setNamespace( - io.opentdf.platform.policy.Namespace.Builder builderForValue) { - if (namespaceBuilder_ == null) { - namespace_ = builderForValue.build(); - } else { - namespaceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder mergeNamespace(io.opentdf.platform.policy.Namespace value) { - if (namespaceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - namespace_ != null && - namespace_ != io.opentdf.platform.policy.Namespace.getDefaultInstance()) { - getNamespaceBuilder().mergeFrom(value); - } else { - namespace_ = value; - } - } else { - namespaceBuilder_.mergeFrom(value); - } - if (namespace_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public Builder clearNamespace() { - bitField0_ = (bitField0_ & ~0x00000001); - namespace_ = null; - if (namespaceBuilder_ != null) { - namespaceBuilder_.dispose(); - namespaceBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public io.opentdf.platform.policy.Namespace.Builder getNamespaceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getNamespaceFieldBuilder().getBuilder(); - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - public io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder() { - if (namespaceBuilder_ != null) { - return namespaceBuilder_.getMessageOrBuilder(); - } else { - return namespace_ == null ? - io.opentdf.platform.policy.Namespace.getDefaultInstance() : namespace_; - } - } - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder> - getNamespaceFieldBuilder() { - if (namespaceBuilder_ == null) { - namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.Namespace, io.opentdf.platform.policy.Namespace.Builder, io.opentdf.platform.policy.NamespaceOrBuilder>( - getNamespace(), - getParentForChildren(), - isClean()); - namespace_ = null; - } - return namespaceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.namespaces.UpdateNamespaceResponse) - } - - // @@protoc_insertion_point(class_scope:policy.namespaces.UpdateNamespaceResponse) - private static final io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse(); - } - - public static io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateNamespaceResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.namespaces.UpdateNamespaceResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponseOrBuilder.java deleted file mode 100644 index 6745a99b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/namespaces/UpdateNamespaceResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/namespaces/namespaces.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.namespaces; - -public interface UpdateNamespaceResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.namespaces.UpdateNamespaceResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return Whether the namespace field is set. - */ - boolean hasNamespace(); - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - * @return The namespace. - */ - io.opentdf.platform.policy.Namespace getNamespace(); - /** - * .policy.Namespace namespace = 1 [json_name = "namespace"]; - */ - io.opentdf.platform.policy.NamespaceOrBuilder getNamespaceOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequest.java deleted file mode 100644 index 439e9e9b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequest.java +++ /dev/null @@ -1,1060 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - *
- *
- *### Request
- *
- *grpcurl -plaintext -d @ localhost:9000 policy.resourcemapping.ResourceMappingService/CreateResourceMapping <<EOM
- *{
- *"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"]
- *}
- *}
- * 
- * - * Protobuf type {@code policy.resourcemapping.CreateResourceMappingRequest} - */ -public final class CreateResourceMappingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.CreateResourceMappingRequest) - CreateResourceMappingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateResourceMappingRequest.newBuilder() to construct. - private CreateResourceMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateResourceMappingRequest() { - attributeValueId_ = ""; - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateResourceMappingRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object attributeValueId_ = ""; - /** - *
-   * Required
-   * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The attributeValueId. - */ - @java.lang.Override - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeValueId_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The bytes for attributeValueId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeValueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TERMS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @return A list containing the terms. - */ - public com.google.protobuf.ProtocolStringList - getTermsList() { - return terms_; - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @return The count of terms. - */ - public int getTermsCount() { - return terms_.size(); - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The terms at the given index. - */ - public java.lang.String getTerms(int index) { - return terms_.get(index); - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - public com.google.protobuf.ByteString - getTermsBytes(int index) { - return terms_.getByteString(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeValueId_); - } - for (int i = 0; i < terms_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, terms_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeValueId_); - } - { - int dataSize = 0; - for (int i = 0; i < terms_.size(); i++) { - dataSize += computeStringSizeNoTag(terms_.getRaw(i)); - } - size += dataSize; - size += 1 * getTermsList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest other = (io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest) obj; - - if (!getAttributeValueId() - .equals(other.getAttributeValueId())) return false; - if (!getTermsList() - .equals(other.getTermsList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeValueId().hashCode(); - if (getTermsCount() > 0) { - hash = (37 * hash) + TERMS_FIELD_NUMBER; - hash = (53 * hash) + getTermsList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   *
-   *### Request
-   *
-   *grpcurl -plaintext -d @ localhost:9000 policy.resourcemapping.ResourceMappingService/CreateResourceMapping <<EOM
-   *{
-   *"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"]
-   *}
-   *}
-   * 
- * - * Protobuf type {@code policy.resourcemapping.CreateResourceMappingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.CreateResourceMappingRequest) - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeValueId_ = ""; - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest build() { - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest buildPartial() { - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest result = new io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeValueId_ = attributeValueId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - terms_.makeImmutable(); - result.terms_ = terms_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest other) { - if (other == io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.getDefaultInstance()) return this; - if (!other.getAttributeValueId().isEmpty()) { - attributeValueId_ = other.attributeValueId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.terms_.isEmpty()) { - if (terms_.isEmpty()) { - terms_ = other.terms_; - bitField0_ |= 0x00000002; - } else { - ensureTermsIsMutable(); - terms_.addAll(other.terms_); - } - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - attributeValueId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - ensureTermsIsMutable(); - terms_.add(s); - break; - } // case 18 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object attributeValueId_ = ""; - /** - *
-     * Required
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The attributeValueId. - */ - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeValueId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The bytes for attributeValueId. - */ - public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeValueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @param value The attributeValueId to set. - * @return This builder for chaining. - */ - public Builder setAttributeValueId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - attributeValueId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearAttributeValueId() { - attributeValueId_ = getDefaultInstance().getAttributeValueId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @param value The bytes for attributeValueId to set. - * @return This builder for chaining. - */ - public Builder setAttributeValueIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - attributeValueId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureTermsIsMutable() { - if (!terms_.isModifiable()) { - terms_ = new com.google.protobuf.LazyStringArrayList(terms_); - } - bitField0_ |= 0x00000002; - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @return A list containing the terms. - */ - public com.google.protobuf.ProtocolStringList - getTermsList() { - terms_.makeImmutable(); - return terms_; - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @return The count of terms. - */ - public int getTermsCount() { - return terms_.size(); - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The terms at the given index. - */ - public java.lang.String getTerms(int index) { - return terms_.get(index); - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - public com.google.protobuf.ByteString - getTermsBytes(int index) { - return terms_.getByteString(index); - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The terms to set. - * @return This builder for chaining. - */ - public Builder setTerms( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureTermsIsMutable(); - terms_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param value The terms to add. - * @return This builder for chaining. - */ - public Builder addTerms( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureTermsIsMutable(); - terms_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param values The terms to add. - * @return This builder for chaining. - */ - public Builder addAllTerms( - java.lang.Iterable values) { - ensureTermsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, terms_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearTerms() { - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002);; - onChanged(); - return this; - } - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param value The bytes of the terms to add. - * @return This builder for chaining. - */ - public Builder addTermsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureTermsIsMutable(); - terms_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.CreateResourceMappingRequest) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.CreateResourceMappingRequest) - private static final io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest(); - } - - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateResourceMappingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequestOrBuilder.java deleted file mode 100644 index 78bd1af6..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingRequestOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface CreateResourceMappingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.CreateResourceMappingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The attributeValueId. - */ - java.lang.String getAttributeValueId(); - /** - *
-   * Required
-   * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The bytes for attributeValueId. - */ - com.google.protobuf.ByteString - getAttributeValueIdBytes(); - - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @return A list containing the terms. - */ - java.util.List - getTermsList(); - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @return The count of terms. - */ - int getTermsCount(); - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The terms at the given index. - */ - java.lang.String getTerms(int index); - /** - * repeated string terms = 2 [json_name = "terms", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - com.google.protobuf.ByteString - getTermsBytes(int index); - - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponse.java deleted file mode 100644 index 129b58a5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.CreateResourceMappingResponse} - */ -public final class CreateResourceMappingResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.CreateResourceMappingResponse) - CreateResourceMappingResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateResourceMappingResponse.newBuilder() to construct. - private CreateResourceMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateResourceMappingResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateResourceMappingResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.Builder.class); - } - - private int bitField0_; - public static final int RESOURCE_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.ResourceMapping resourceMapping_; - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - @java.lang.Override - public boolean hasResourceMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getResourceMapping()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getResourceMapping()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse other = (io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse) obj; - - if (hasResourceMapping() != other.hasResourceMapping()) return false; - if (hasResourceMapping()) { - if (!getResourceMapping() - .equals(other.getResourceMapping())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasResourceMapping()) { - hash = (37 * hash) + RESOURCE_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getResourceMapping().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.CreateResourceMappingResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.CreateResourceMappingResponse) - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResourceMappingFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceMapping_ = null; - if (resourceMappingBuilder_ != null) { - resourceMappingBuilder_.dispose(); - resourceMappingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse build() { - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse buildPartial() { - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse result = new io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resourceMapping_ = resourceMappingBuilder_ == null - ? resourceMapping_ - : resourceMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse other) { - if (other == io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.getDefaultInstance()) return this; - if (other.hasResourceMapping()) { - mergeResourceMapping(other.getResourceMapping()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getResourceMappingFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.ResourceMapping resourceMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingBuilder_; - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - public boolean hasResourceMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { - if (resourceMappingBuilder_ == null) { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } else { - return resourceMappingBuilder_.getMessage(); - } - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder setResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resourceMapping_ = value; - } else { - resourceMappingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder setResourceMapping( - io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { - if (resourceMappingBuilder_ == null) { - resourceMapping_ = builderForValue.build(); - } else { - resourceMappingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder mergeResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - resourceMapping_ != null && - resourceMapping_ != io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) { - getResourceMappingBuilder().mergeFrom(value); - } else { - resourceMapping_ = value; - } - } else { - resourceMappingBuilder_.mergeFrom(value); - } - if (resourceMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder clearResourceMapping() { - bitField0_ = (bitField0_ & ~0x00000001); - resourceMapping_ = null; - if (resourceMappingBuilder_ != null) { - resourceMappingBuilder_.dispose(); - resourceMappingBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getResourceMappingFieldBuilder().getBuilder(); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { - if (resourceMappingBuilder_ != null) { - return resourceMappingBuilder_.getMessageOrBuilder(); - } else { - return resourceMapping_ == null ? - io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> - getResourceMappingFieldBuilder() { - if (resourceMappingBuilder_ == null) { - resourceMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( - getResourceMapping(), - getParentForChildren(), - isClean()); - resourceMapping_ = null; - } - return resourceMappingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.CreateResourceMappingResponse) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.CreateResourceMappingResponse) - private static final io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse(); - } - - public static io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateResourceMappingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponseOrBuilder.java deleted file mode 100644 index 48a98fb8..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/CreateResourceMappingResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface CreateResourceMappingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.CreateResourceMappingResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - boolean hasResourceMapping(); - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - io.opentdf.platform.policy.ResourceMapping getResourceMapping(); - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequest.java deleted file mode 100644 index 72094ff5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.DeleteResourceMappingRequest} - */ -public final class DeleteResourceMappingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.DeleteResourceMappingRequest) - DeleteResourceMappingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteResourceMappingRequest.newBuilder() to construct. - private DeleteResourceMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteResourceMappingRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteResourceMappingRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest other = (io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.DeleteResourceMappingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.DeleteResourceMappingRequest) - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest build() { - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest buildPartial() { - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest result = new io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest other) { - if (other == io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.DeleteResourceMappingRequest) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.DeleteResourceMappingRequest) - private static final io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest(); - } - - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteResourceMappingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequestOrBuilder.java deleted file mode 100644 index 5534d378..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface DeleteResourceMappingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.DeleteResourceMappingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponse.java deleted file mode 100644 index 452bdbdf..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.DeleteResourceMappingResponse} - */ -public final class DeleteResourceMappingResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.DeleteResourceMappingResponse) - DeleteResourceMappingResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteResourceMappingResponse.newBuilder() to construct. - private DeleteResourceMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteResourceMappingResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteResourceMappingResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.Builder.class); - } - - private int bitField0_; - public static final int RESOURCE_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.ResourceMapping resourceMapping_; - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - @java.lang.Override - public boolean hasResourceMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getResourceMapping()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getResourceMapping()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse other = (io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse) obj; - - if (hasResourceMapping() != other.hasResourceMapping()) return false; - if (hasResourceMapping()) { - if (!getResourceMapping() - .equals(other.getResourceMapping())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasResourceMapping()) { - hash = (37 * hash) + RESOURCE_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getResourceMapping().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.DeleteResourceMappingResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.DeleteResourceMappingResponse) - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResourceMappingFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceMapping_ = null; - if (resourceMappingBuilder_ != null) { - resourceMappingBuilder_.dispose(); - resourceMappingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse build() { - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse buildPartial() { - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse result = new io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resourceMapping_ = resourceMappingBuilder_ == null - ? resourceMapping_ - : resourceMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse other) { - if (other == io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.getDefaultInstance()) return this; - if (other.hasResourceMapping()) { - mergeResourceMapping(other.getResourceMapping()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getResourceMappingFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.ResourceMapping resourceMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingBuilder_; - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - public boolean hasResourceMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { - if (resourceMappingBuilder_ == null) { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } else { - return resourceMappingBuilder_.getMessage(); - } - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder setResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resourceMapping_ = value; - } else { - resourceMappingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder setResourceMapping( - io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { - if (resourceMappingBuilder_ == null) { - resourceMapping_ = builderForValue.build(); - } else { - resourceMappingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder mergeResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - resourceMapping_ != null && - resourceMapping_ != io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) { - getResourceMappingBuilder().mergeFrom(value); - } else { - resourceMapping_ = value; - } - } else { - resourceMappingBuilder_.mergeFrom(value); - } - if (resourceMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder clearResourceMapping() { - bitField0_ = (bitField0_ & ~0x00000001); - resourceMapping_ = null; - if (resourceMappingBuilder_ != null) { - resourceMappingBuilder_.dispose(); - resourceMappingBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getResourceMappingFieldBuilder().getBuilder(); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { - if (resourceMappingBuilder_ != null) { - return resourceMappingBuilder_.getMessageOrBuilder(); - } else { - return resourceMapping_ == null ? - io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> - getResourceMappingFieldBuilder() { - if (resourceMappingBuilder_ == null) { - resourceMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( - getResourceMapping(), - getParentForChildren(), - isClean()); - resourceMapping_ = null; - } - return resourceMappingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.DeleteResourceMappingResponse) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.DeleteResourceMappingResponse) - private static final io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse(); - } - - public static io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteResourceMappingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponseOrBuilder.java deleted file mode 100644 index e2c24617..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/DeleteResourceMappingResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface DeleteResourceMappingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.DeleteResourceMappingResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - boolean hasResourceMapping(); - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - io.opentdf.platform.policy.ResourceMapping getResourceMapping(); - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequest.java deleted file mode 100644 index 4bff27c8..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.GetResourceMappingRequest} - */ -public final class GetResourceMappingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.GetResourceMappingRequest) - GetResourceMappingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetResourceMappingRequest.newBuilder() to construct. - private GetResourceMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetResourceMappingRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetResourceMappingRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest other = (io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.GetResourceMappingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.GetResourceMappingRequest) - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest build() { - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest buildPartial() { - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest result = new io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest other) { - if (other == io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.GetResourceMappingRequest) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.GetResourceMappingRequest) - private static final io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest(); - } - - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetResourceMappingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequestOrBuilder.java deleted file mode 100644 index 4108468f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface GetResourceMappingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.GetResourceMappingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponse.java deleted file mode 100644 index 7833c469..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.GetResourceMappingResponse} - */ -public final class GetResourceMappingResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.GetResourceMappingResponse) - GetResourceMappingResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetResourceMappingResponse.newBuilder() to construct. - private GetResourceMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetResourceMappingResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetResourceMappingResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.Builder.class); - } - - private int bitField0_; - public static final int RESOURCE_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.ResourceMapping resourceMapping_; - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - @java.lang.Override - public boolean hasResourceMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getResourceMapping()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getResourceMapping()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse other = (io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse) obj; - - if (hasResourceMapping() != other.hasResourceMapping()) return false; - if (hasResourceMapping()) { - if (!getResourceMapping() - .equals(other.getResourceMapping())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasResourceMapping()) { - hash = (37 * hash) + RESOURCE_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getResourceMapping().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.GetResourceMappingResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.GetResourceMappingResponse) - io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResourceMappingFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceMapping_ = null; - if (resourceMappingBuilder_ != null) { - resourceMappingBuilder_.dispose(); - resourceMappingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse build() { - io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse buildPartial() { - io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse result = new io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resourceMapping_ = resourceMappingBuilder_ == null - ? resourceMapping_ - : resourceMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse other) { - if (other == io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.getDefaultInstance()) return this; - if (other.hasResourceMapping()) { - mergeResourceMapping(other.getResourceMapping()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getResourceMappingFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.ResourceMapping resourceMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingBuilder_; - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - public boolean hasResourceMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { - if (resourceMappingBuilder_ == null) { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } else { - return resourceMappingBuilder_.getMessage(); - } - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder setResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resourceMapping_ = value; - } else { - resourceMappingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder setResourceMapping( - io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { - if (resourceMappingBuilder_ == null) { - resourceMapping_ = builderForValue.build(); - } else { - resourceMappingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder mergeResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - resourceMapping_ != null && - resourceMapping_ != io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) { - getResourceMappingBuilder().mergeFrom(value); - } else { - resourceMapping_ = value; - } - } else { - resourceMappingBuilder_.mergeFrom(value); - } - if (resourceMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder clearResourceMapping() { - bitField0_ = (bitField0_ & ~0x00000001); - resourceMapping_ = null; - if (resourceMappingBuilder_ != null) { - resourceMappingBuilder_.dispose(); - resourceMappingBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getResourceMappingFieldBuilder().getBuilder(); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { - if (resourceMappingBuilder_ != null) { - return resourceMappingBuilder_.getMessageOrBuilder(); - } else { - return resourceMapping_ == null ? - io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> - getResourceMappingFieldBuilder() { - if (resourceMappingBuilder_ == null) { - resourceMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( - getResourceMapping(), - getParentForChildren(), - isClean()); - resourceMapping_ = null; - } - return resourceMappingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.GetResourceMappingResponse) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.GetResourceMappingResponse) - private static final io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse(); - } - - public static io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetResourceMappingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponseOrBuilder.java deleted file mode 100644 index bcd8e324..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/GetResourceMappingResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface GetResourceMappingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.GetResourceMappingResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - boolean hasResourceMapping(); - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - io.opentdf.platform.policy.ResourceMapping getResourceMapping(); - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequest.java deleted file mode 100644 index 6e1c10c1..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequest.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.ListResourceMappingsRequest} - */ -public final class ListResourceMappingsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.ListResourceMappingsRequest) - ListResourceMappingsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListResourceMappingsRequest.newBuilder() to construct. - private ListResourceMappingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListResourceMappingsRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListResourceMappingsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.class, io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest other = (io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.ListResourceMappingsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.ListResourceMappingsRequest) - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.class, io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest build() { - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest buildPartial() { - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest result = new io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest other) { - if (other == io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.ListResourceMappingsRequest) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.ListResourceMappingsRequest) - private static final io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest(); - } - - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListResourceMappingsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequestOrBuilder.java deleted file mode 100644 index de7c470a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsRequestOrBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface ListResourceMappingsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.ListResourceMappingsRequest) - com.google.protobuf.MessageOrBuilder { -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponse.java deleted file mode 100644 index bc85a9c0..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.ListResourceMappingsResponse} - */ -public final class ListResourceMappingsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.ListResourceMappingsResponse) - ListResourceMappingsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListResourceMappingsResponse.newBuilder() to construct. - private ListResourceMappingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListResourceMappingsResponse() { - resourceMappings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListResourceMappingsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.class, io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.Builder.class); - } - - public static final int RESOURCE_MAPPINGS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List resourceMappings_; - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - @java.lang.Override - public java.util.List getResourceMappingsList() { - return resourceMappings_; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - @java.lang.Override - public java.util.List - getResourceMappingsOrBuilderList() { - return resourceMappings_; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - @java.lang.Override - public int getResourceMappingsCount() { - return resourceMappings_.size(); - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping getResourceMappings(int index) { - return resourceMappings_.get(index); - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingsOrBuilder( - int index) { - return resourceMappings_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < resourceMappings_.size(); i++) { - output.writeMessage(1, resourceMappings_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < resourceMappings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, resourceMappings_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse other = (io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse) obj; - - if (!getResourceMappingsList() - .equals(other.getResourceMappingsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResourceMappingsCount() > 0) { - hash = (37 * hash) + RESOURCE_MAPPINGS_FIELD_NUMBER; - hash = (53 * hash) + getResourceMappingsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.ListResourceMappingsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.ListResourceMappingsResponse) - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.class, io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (resourceMappingsBuilder_ == null) { - resourceMappings_ = java.util.Collections.emptyList(); - } else { - resourceMappings_ = null; - resourceMappingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse build() { - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse buildPartial() { - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse result = new io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse result) { - if (resourceMappingsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - resourceMappings_ = java.util.Collections.unmodifiableList(resourceMappings_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.resourceMappings_ = resourceMappings_; - } else { - result.resourceMappings_ = resourceMappingsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse other) { - if (other == io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.getDefaultInstance()) return this; - if (resourceMappingsBuilder_ == null) { - if (!other.resourceMappings_.isEmpty()) { - if (resourceMappings_.isEmpty()) { - resourceMappings_ = other.resourceMappings_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResourceMappingsIsMutable(); - resourceMappings_.addAll(other.resourceMappings_); - } - onChanged(); - } - } else { - if (!other.resourceMappings_.isEmpty()) { - if (resourceMappingsBuilder_.isEmpty()) { - resourceMappingsBuilder_.dispose(); - resourceMappingsBuilder_ = null; - resourceMappings_ = other.resourceMappings_; - bitField0_ = (bitField0_ & ~0x00000001); - resourceMappingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResourceMappingsFieldBuilder() : null; - } else { - resourceMappingsBuilder_.addAllMessages(other.resourceMappings_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.ResourceMapping m = - input.readMessage( - io.opentdf.platform.policy.ResourceMapping.parser(), - extensionRegistry); - if (resourceMappingsBuilder_ == null) { - ensureResourceMappingsIsMutable(); - resourceMappings_.add(m); - } else { - resourceMappingsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List resourceMappings_ = - java.util.Collections.emptyList(); - private void ensureResourceMappingsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - resourceMappings_ = new java.util.ArrayList(resourceMappings_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingsBuilder_; - - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public java.util.List getResourceMappingsList() { - if (resourceMappingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(resourceMappings_); - } else { - return resourceMappingsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public int getResourceMappingsCount() { - if (resourceMappingsBuilder_ == null) { - return resourceMappings_.size(); - } else { - return resourceMappingsBuilder_.getCount(); - } - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public io.opentdf.platform.policy.ResourceMapping getResourceMappings(int index) { - if (resourceMappingsBuilder_ == null) { - return resourceMappings_.get(index); - } else { - return resourceMappingsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder setResourceMappings( - int index, io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceMappingsIsMutable(); - resourceMappings_.set(index, value); - onChanged(); - } else { - resourceMappingsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder setResourceMappings( - int index, io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { - if (resourceMappingsBuilder_ == null) { - ensureResourceMappingsIsMutable(); - resourceMappings_.set(index, builderForValue.build()); - onChanged(); - } else { - resourceMappingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder addResourceMappings(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceMappingsIsMutable(); - resourceMappings_.add(value); - onChanged(); - } else { - resourceMappingsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder addResourceMappings( - int index, io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceMappingsIsMutable(); - resourceMappings_.add(index, value); - onChanged(); - } else { - resourceMappingsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder addResourceMappings( - io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { - if (resourceMappingsBuilder_ == null) { - ensureResourceMappingsIsMutable(); - resourceMappings_.add(builderForValue.build()); - onChanged(); - } else { - resourceMappingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder addResourceMappings( - int index, io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { - if (resourceMappingsBuilder_ == null) { - ensureResourceMappingsIsMutable(); - resourceMappings_.add(index, builderForValue.build()); - onChanged(); - } else { - resourceMappingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder addAllResourceMappings( - java.lang.Iterable values) { - if (resourceMappingsBuilder_ == null) { - ensureResourceMappingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resourceMappings_); - onChanged(); - } else { - resourceMappingsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder clearResourceMappings() { - if (resourceMappingsBuilder_ == null) { - resourceMappings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resourceMappingsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public Builder removeResourceMappings(int index) { - if (resourceMappingsBuilder_ == null) { - ensureResourceMappingsIsMutable(); - resourceMappings_.remove(index); - onChanged(); - } else { - resourceMappingsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingsBuilder( - int index) { - return getResourceMappingsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingsOrBuilder( - int index) { - if (resourceMappingsBuilder_ == null) { - return resourceMappings_.get(index); } else { - return resourceMappingsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public java.util.List - getResourceMappingsOrBuilderList() { - if (resourceMappingsBuilder_ != null) { - return resourceMappingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(resourceMappings_); - } - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public io.opentdf.platform.policy.ResourceMapping.Builder addResourceMappingsBuilder() { - return getResourceMappingsFieldBuilder().addBuilder( - io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()); - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public io.opentdf.platform.policy.ResourceMapping.Builder addResourceMappingsBuilder( - int index) { - return getResourceMappingsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()); - } - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - public java.util.List - getResourceMappingsBuilderList() { - return getResourceMappingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> - getResourceMappingsFieldBuilder() { - if (resourceMappingsBuilder_ == null) { - resourceMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( - resourceMappings_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - resourceMappings_ = null; - } - return resourceMappingsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.ListResourceMappingsResponse) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.ListResourceMappingsResponse) - private static final io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse(); - } - - public static io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListResourceMappingsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponseOrBuilder.java deleted file mode 100644 index 9a5ef92e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ListResourceMappingsResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface ListResourceMappingsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.ListResourceMappingsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - java.util.List - getResourceMappingsList(); - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - io.opentdf.platform.policy.ResourceMapping getResourceMappings(int index); - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - int getResourceMappingsCount(); - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - java.util.List - getResourceMappingsOrBuilderList(); - /** - * repeated .policy.ResourceMapping resource_mappings = 1 [json_name = "resourceMappings"]; - */ - io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingsOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingProto.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingProto.java deleted file mode 100644 index 86d7e8a3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingProto.java +++ /dev/null @@ -1,217 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public final class ResourceMappingProto { - private ResourceMappingProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_ListResourceMappingsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_ListResourceMappingsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_GetResourceMappingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_GetResourceMappingResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_CreateResourceMappingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_CreateResourceMappingResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_UpdateResourceMappingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_UpdateResourceMappingResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_DeleteResourceMappingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_resourcemapping_DeleteResourceMappingResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n-policy/resourcemapping/resource_mappin" + - "g.proto\022\026policy.resourcemapping\032\033buf/val" + - "idate/validate.proto\032\034google/api/annotat" + - "ions.proto\032\023common/common.proto\032\024policy/" + - "objects.proto\"\035\n\033ListResourceMappingsReq" + - "uest\"d\n\034ListResourceMappingsResponse\022D\n\021" + - "resource_mappings\030\001 \003(\0132\027.policy.Resourc" + - "eMappingR\020resourceMappings\"3\n\031GetResourc" + - "eMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"" + - "`\n\032GetResourceMappingResponse\022B\n\020resourc" + - "e_mapping\030\001 \001(\0132\027.policy.ResourceMapping" + - "R\017resourceMapping\"\247\001\n\034CreateResourceMapp" + - "ingRequest\0224\n\022attribute_value_id\030\001 \001(\tB\006" + - "\272H\003\310\001\001R\020attributeValueId\022\034\n\005terms\030\002 \003(\tB" + - "\006\272H\003\310\001\001R\005terms\0223\n\010metadata\030d \001(\0132\027.commo" + - "n.MetadataMutableR\010metadata\"c\n\035CreateRes" + - "ourceMappingResponse\022B\n\020resource_mapping" + - "\030\001 \001(\0132\027.policy.ResourceMappingR\017resourc" + - "eMapping\"\205\002\n\034UpdateResourceMappingReques" + - "t\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022,\n\022attribute_v" + - "alue_id\030\004 \001(\tR\020attributeValueId\022\024\n\005terms" + - "\030\005 \003(\tR\005terms\0223\n\010metadata\030d \001(\0132\027.common" + - ".MetadataMutableR\010metadata\022T\n\030metadata_u" + - "pdate_behavior\030e \001(\0162\032.common.MetadataUp" + - "dateEnumR\026metadataUpdateBehavior\"c\n\035Upda" + - "teResourceMappingResponse\022B\n\020resource_ma" + - "pping\030\001 \001(\0132\027.policy.ResourceMappingR\017re" + - "sourceMapping\"6\n\034DeleteResourceMappingRe" + - "quest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"c\n\035DeleteR" + - "esourceMappingResponse\022B\n\020resource_mappi" + - "ng\030\001 \001(\0132\027.policy.ResourceMappingR\017resou" + - "rceMapping2\320\006\n\026ResourceMappingService\022\235\001" + - "\n\024ListResourceMappings\0223.policy.resource" + - "mapping.ListResourceMappingsRequest\0324.po" + - "licy.resourcemapping.ListResourceMapping" + - "sResponse\"\032\202\323\344\223\002\024\022\022/resource-mappings\022\234\001" + - "\n\022GetResourceMapping\0221.policy.resourcema" + - "pping.GetResourceMappingRequest\0322.policy" + - ".resourcemapping.GetResourceMappingRespo" + - "nse\"\037\202\323\344\223\002\031\022\027/resource-mappings/{id}\022\243\001\n" + - "\025CreateResourceMapping\0224.policy.resource" + - "mapping.CreateResourceMappingRequest\0325.p" + - "olicy.resourcemapping.CreateResourceMapp" + - "ingResponse\"\035\202\323\344\223\002\027\"\022/resource-mappings:" + - "\001*\022\250\001\n\025UpdateResourceMapping\0224.policy.re" + - "sourcemapping.UpdateResourceMappingReque" + - "st\0325.policy.resourcemapping.UpdateResour" + - "ceMappingResponse\"\"\202\323\344\223\002\034\"\027/resource-map" + - "pings/{id}:\001*\022\245\001\n\025DeleteResourceMapping\022" + - "4.policy.resourcemapping.DeleteResourceM" + - "appingRequest\0325.policy.resourcemapping.D" + - "eleteResourceMappingResponse\"\037\202\323\344\223\002\031*\027/r" + - "esource-mappings/{id}B\273\001\n*io.opentdf.pla" + - "tform.policy.resourcemappingB\024ResourceMa" + - "ppingProtoP\001\242\002\003PRX\252\002\026Policy.Resourcemapp" + - "ing\312\002\026Policy\\Resourcemapping\342\002\"Policy\\Re" + - "sourcemapping\\GPBMetadata\352\002\027Policy::Reso" + - "urcemappingb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - io.opentdf.platform.common.CommonProto.getDescriptor(), - io.opentdf.platform.policy.ObjectsProto.getDescriptor(), - }); - internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_resourcemapping_ListResourceMappingsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_ListResourceMappingsRequest_descriptor, - new java.lang.String[] { }); - internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_policy_resourcemapping_ListResourceMappingsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_ListResourceMappingsResponse_descriptor, - new java.lang.String[] { "ResourceMappings", }); - internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_policy_resourcemapping_GetResourceMappingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_GetResourceMappingRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_policy_resourcemapping_GetResourceMappingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_GetResourceMappingResponse_descriptor, - new java.lang.String[] { "ResourceMapping", }); - internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_policy_resourcemapping_CreateResourceMappingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_CreateResourceMappingRequest_descriptor, - new java.lang.String[] { "AttributeValueId", "Terms", "Metadata", }); - internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_policy_resourcemapping_CreateResourceMappingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_CreateResourceMappingResponse_descriptor, - new java.lang.String[] { "ResourceMapping", }); - internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_policy_resourcemapping_UpdateResourceMappingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor, - new java.lang.String[] { "Id", "AttributeValueId", "Terms", "Metadata", "MetadataUpdateBehavior", }); - internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_policy_resourcemapping_UpdateResourceMappingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor, - new java.lang.String[] { "ResourceMapping", }); - internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_policy_resourcemapping_DeleteResourceMappingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_DeleteResourceMappingRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_policy_resourcemapping_DeleteResourceMappingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_resourcemapping_DeleteResourceMappingResponse_descriptor, - new java.lang.String[] { "ResourceMapping", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - io.opentdf.platform.common.CommonProto.getDescriptor(); - io.opentdf.platform.policy.ObjectsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingServiceGrpc.java deleted file mode 100644 index 5fed62e1..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/ResourceMappingServiceGrpc.java +++ /dev/null @@ -1,1363 +0,0 @@ -package io.opentdf.platform.policy.resourcemapping; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- *Resource Mappings
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.61.1)", - comments = "Source: policy/resourcemapping/resource_mapping.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ResourceMappingServiceGrpc { - - private ResourceMappingServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "policy.resourcemapping.ResourceMappingService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListResourceMappingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListResourceMappings", - requestType = io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.class, - responseType = io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListResourceMappingsMethod() { - io.grpc.MethodDescriptor getListResourceMappingsMethod; - if ((getListResourceMappingsMethod = ResourceMappingServiceGrpc.getListResourceMappingsMethod) == null) { - synchronized (ResourceMappingServiceGrpc.class) { - if ((getListResourceMappingsMethod = ResourceMappingServiceGrpc.getListResourceMappingsMethod) == null) { - ResourceMappingServiceGrpc.getListResourceMappingsMethod = getListResourceMappingsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListResourceMappings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse.getDefaultInstance())) - .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("ListResourceMappings")) - .build(); - } - } - } - return getListResourceMappingsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetResourceMappingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetResourceMapping", - requestType = io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.class, - responseType = io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetResourceMappingMethod() { - io.grpc.MethodDescriptor getGetResourceMappingMethod; - if ((getGetResourceMappingMethod = ResourceMappingServiceGrpc.getGetResourceMappingMethod) == null) { - synchronized (ResourceMappingServiceGrpc.class) { - if ((getGetResourceMappingMethod = ResourceMappingServiceGrpc.getGetResourceMappingMethod) == null) { - ResourceMappingServiceGrpc.getGetResourceMappingMethod = getGetResourceMappingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetResourceMapping")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse.getDefaultInstance())) - .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("GetResourceMapping")) - .build(); - } - } - } - return getGetResourceMappingMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateResourceMappingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateResourceMapping", - requestType = io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.class, - responseType = io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateResourceMappingMethod() { - io.grpc.MethodDescriptor getCreateResourceMappingMethod; - if ((getCreateResourceMappingMethod = ResourceMappingServiceGrpc.getCreateResourceMappingMethod) == null) { - synchronized (ResourceMappingServiceGrpc.class) { - if ((getCreateResourceMappingMethod = ResourceMappingServiceGrpc.getCreateResourceMappingMethod) == null) { - ResourceMappingServiceGrpc.getCreateResourceMappingMethod = getCreateResourceMappingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateResourceMapping")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse.getDefaultInstance())) - .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("CreateResourceMapping")) - .build(); - } - } - } - return getCreateResourceMappingMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateResourceMappingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateResourceMapping", - requestType = io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.class, - responseType = io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateResourceMappingMethod() { - io.grpc.MethodDescriptor getUpdateResourceMappingMethod; - if ((getUpdateResourceMappingMethod = ResourceMappingServiceGrpc.getUpdateResourceMappingMethod) == null) { - synchronized (ResourceMappingServiceGrpc.class) { - if ((getUpdateResourceMappingMethod = ResourceMappingServiceGrpc.getUpdateResourceMappingMethod) == null) { - ResourceMappingServiceGrpc.getUpdateResourceMappingMethod = getUpdateResourceMappingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateResourceMapping")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.getDefaultInstance())) - .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("UpdateResourceMapping")) - .build(); - } - } - } - return getUpdateResourceMappingMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteResourceMappingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteResourceMapping", - requestType = io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.class, - responseType = io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteResourceMappingMethod() { - io.grpc.MethodDescriptor getDeleteResourceMappingMethod; - if ((getDeleteResourceMappingMethod = ResourceMappingServiceGrpc.getDeleteResourceMappingMethod) == null) { - synchronized (ResourceMappingServiceGrpc.class) { - if ((getDeleteResourceMappingMethod = ResourceMappingServiceGrpc.getDeleteResourceMappingMethod) == null) { - ResourceMappingServiceGrpc.getDeleteResourceMappingMethod = getDeleteResourceMappingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteResourceMapping")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse.getDefaultInstance())) - .setSchemaDescriptor(new ResourceMappingServiceMethodDescriptorSupplier("DeleteResourceMapping")) - .build(); - } - } - } - return getDeleteResourceMappingMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ResourceMappingServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ResourceMappingServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ResourceMappingServiceStub(channel, callOptions); - } - }; - return ResourceMappingServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ResourceMappingServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ResourceMappingServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ResourceMappingServiceBlockingStub(channel, callOptions); - } - }; - return ResourceMappingServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ResourceMappingServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ResourceMappingServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ResourceMappingServiceFutureStub(channel, callOptions); - } - }; - return ResourceMappingServiceFutureStub.newStub(factory, channel); - } - - /** - *
-   *Resource Mappings
-   * 
- */ - public interface AsyncService { - - /** - *
-     *Request Example:
-     *- empty body
-     *Response Example:
-     *{
-     *"resource_mappings": [
-     *{
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *]
-     *}
-     * 
- */ - default void listResourceMappings(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListResourceMappingsMethod(), responseObserver); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - default void getResourceMapping(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetResourceMappingMethod(), responseObserver); - } - - /** - *
-     *Request Example:
-     *{
-     *"resource_mapping": {
-     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *]
-     *}
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - default void createResourceMapping(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateResourceMappingMethod(), responseObserver); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"resource_mapping": {
-     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *"NEWTERM"
-     *]
-     *}
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - default void updateResourceMapping(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateResourceMappingMethod(), responseObserver); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - default void deleteResourceMapping(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteResourceMappingMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service ResourceMappingService. - *
-   *Resource Mappings
-   * 
- */ - public static abstract class ResourceMappingServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return ResourceMappingServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service ResourceMappingService. - *
-   *Resource Mappings
-   * 
- */ - public static final class ResourceMappingServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private ResourceMappingServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ResourceMappingServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ResourceMappingServiceStub(channel, callOptions); - } - - /** - *
-     *Request Example:
-     *- empty body
-     *Response Example:
-     *{
-     *"resource_mappings": [
-     *{
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *]
-     *}
-     * 
- */ - public void listResourceMappings(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListResourceMappingsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public void getResourceMapping(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetResourceMappingMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     *Request Example:
-     *{
-     *"resource_mapping": {
-     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *]
-     *}
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public void createResourceMapping(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateResourceMappingMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"resource_mapping": {
-     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *"NEWTERM"
-     *]
-     *}
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public void updateResourceMapping(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateResourceMappingMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public void deleteResourceMapping(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteResourceMappingMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service ResourceMappingService. - *
-   *Resource Mappings
-   * 
- */ - public static final class ResourceMappingServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private ResourceMappingServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ResourceMappingServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ResourceMappingServiceBlockingStub(channel, callOptions); - } - - /** - *
-     *Request Example:
-     *- empty body
-     *Response Example:
-     *{
-     *"resource_mappings": [
-     *{
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *]
-     *}
-     * 
- */ - public io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse listResourceMappings(io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListResourceMappingsMethod(), getCallOptions(), request); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse getResourceMapping(io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetResourceMappingMethod(), getCallOptions(), request); - } - - /** - *
-     *Request Example:
-     *{
-     *"resource_mapping": {
-     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *]
-     *}
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse createResourceMapping(io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateResourceMappingMethod(), getCallOptions(), request); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"resource_mapping": {
-     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *"NEWTERM"
-     *]
-     *}
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse updateResourceMapping(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateResourceMappingMethod(), getCallOptions(), request); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse deleteResourceMapping(io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteResourceMappingMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service ResourceMappingService. - *
-   *Resource Mappings
-   * 
- */ - public static final class ResourceMappingServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private ResourceMappingServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ResourceMappingServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ResourceMappingServiceFutureStub(channel, callOptions); - } - - /** - *
-     *Request Example:
-     *- empty body
-     *Response Example:
-     *{
-     *"resource_mappings": [
-     *{
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *]
-     *}
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listResourceMappings( - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListResourceMappingsMethod(), getCallOptions()), request); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getResourceMapping( - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetResourceMappingMethod(), getCallOptions()), request); - } - - /** - *
-     *Request Example:
-     *{
-     *"resource_mapping": {
-     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *]
-     *}
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createResourceMapping( - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateResourceMappingMethod(), getCallOptions()), request); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"resource_mapping": {
-     *"attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *"NEWTERM"
-     *]
-     *}
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateResourceMapping( - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateResourceMappingMethod(), getCallOptions()), request); - } - - /** - *
-     *Request Example:
-     *{
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e"
-     *}
-     *Response Example:
-     *{
-     *"resource_mapping": {
-     *"terms": [
-     *"TOPSECRET",
-     *"TS",
-     *],
-     *"id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e",
-     *"metadata": {
-     *"labels": [],
-     *"created_at": {
-     *"seconds": "1706103276",
-     *"nanos": 510718000
-     *},
-     *"updated_at": {
-     *"seconds": "1706107873",
-     *"nanos": 399786000
-     *},
-     *"description": ""
-     *},
-     *"attribute_value": {
-     *"members": [],
-     *"id": "f0d1d4f6-bff9-45fd-8170-607b6b559349",
-     *"metadata": null,
-     *"attribute_id": "",
-     *"value": "value1"
-     *}
-     *}
-     *}
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteResourceMapping( - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteResourceMappingMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_RESOURCE_MAPPINGS = 0; - private static final int METHODID_GET_RESOURCE_MAPPING = 1; - private static final int METHODID_CREATE_RESOURCE_MAPPING = 2; - private static final int METHODID_UPDATE_RESOURCE_MAPPING = 3; - private static final int METHODID_DELETE_RESOURCE_MAPPING = 4; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_RESOURCE_MAPPINGS: - serviceImpl.listResourceMappings((io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_RESOURCE_MAPPING: - serviceImpl.getResourceMapping((io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_RESOURCE_MAPPING: - serviceImpl.createResourceMapping((io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_RESOURCE_MAPPING: - serviceImpl.updateResourceMapping((io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_RESOURCE_MAPPING: - serviceImpl.deleteResourceMapping((io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListResourceMappingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsRequest, - io.opentdf.platform.policy.resourcemapping.ListResourceMappingsResponse>( - service, METHODID_LIST_RESOURCE_MAPPINGS))) - .addMethod( - getGetResourceMappingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.resourcemapping.GetResourceMappingRequest, - io.opentdf.platform.policy.resourcemapping.GetResourceMappingResponse>( - service, METHODID_GET_RESOURCE_MAPPING))) - .addMethod( - getCreateResourceMappingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingRequest, - io.opentdf.platform.policy.resourcemapping.CreateResourceMappingResponse>( - service, METHODID_CREATE_RESOURCE_MAPPING))) - .addMethod( - getUpdateResourceMappingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest, - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse>( - service, METHODID_UPDATE_RESOURCE_MAPPING))) - .addMethod( - getDeleteResourceMappingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingRequest, - io.opentdf.platform.policy.resourcemapping.DeleteResourceMappingResponse>( - service, METHODID_DELETE_RESOURCE_MAPPING))) - .build(); - } - - private static abstract class ResourceMappingServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ResourceMappingServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ResourceMappingService"); - } - } - - private static final class ResourceMappingServiceFileDescriptorSupplier - extends ResourceMappingServiceBaseDescriptorSupplier { - ResourceMappingServiceFileDescriptorSupplier() {} - } - - private static final class ResourceMappingServiceMethodDescriptorSupplier - extends ResourceMappingServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - ResourceMappingServiceMethodDescriptorSupplier(java.lang.String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ResourceMappingServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ResourceMappingServiceFileDescriptorSupplier()) - .addMethod(getListResourceMappingsMethod()) - .addMethod(getGetResourceMappingMethod()) - .addMethod(getCreateResourceMappingMethod()) - .addMethod(getUpdateResourceMappingMethod()) - .addMethod(getDeleteResourceMappingMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequest.java deleted file mode 100644 index 24e9eea0..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequest.java +++ /dev/null @@ -1,1258 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.UpdateResourceMappingRequest} - */ -public final class UpdateResourceMappingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.UpdateResourceMappingRequest) - UpdateResourceMappingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateResourceMappingRequest.newBuilder() to construct. - private UpdateResourceMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateResourceMappingRequest() { - id_ = ""; - attributeValueId_ = ""; - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - metadataUpdateBehavior_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateResourceMappingRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object attributeValueId_ = ""; - /** - *
-   * Optional
-   * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @return The attributeValueId. - */ - @java.lang.Override - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeValueId_ = s; - return s; - } - } - /** - *
-   * Optional
-   * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeValueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TERMS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string terms = 5 [json_name = "terms"]; - * @return A list containing the terms. - */ - public com.google.protobuf.ProtocolStringList - getTermsList() { - return terms_; - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @return The count of terms. - */ - public int getTermsCount() { - return terms_.size(); - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param index The index of the element to return. - * @return The terms at the given index. - */ - public java.lang.String getTerms(int index) { - return terms_.get(index); - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - public com.google.protobuf.ByteString - getTermsBytes(int index) { - return terms_.getByteString(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Common Metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Common Metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Common Metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, attributeValueId_); - } - for (int i = 0; i < terms_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, terms_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(101, metadataUpdateBehavior_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, attributeValueId_); - } - { - int dataSize = 0; - for (int i = 0; i < terms_.size(); i++) { - dataSize += computeStringSizeNoTag(terms_.getRaw(i)); - } - size += dataSize; - size += 1 * getTermsList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(101, metadataUpdateBehavior_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest other = (io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getAttributeValueId() - .equals(other.getAttributeValueId())) return false; - if (!getTermsList() - .equals(other.getTermsList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeValueId().hashCode(); - if (getTermsCount() > 0) { - hash = (37 * hash) + TERMS_FIELD_NUMBER; - hash = (53 * hash) + getTermsList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; - hash = (53 * hash) + metadataUpdateBehavior_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.UpdateResourceMappingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.UpdateResourceMappingRequest) - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.class, io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - attributeValueId_ = ""; - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - metadataUpdateBehavior_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest build() { - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest buildPartial() { - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest result = new io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.attributeValueId_ = attributeValueId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - terms_.makeImmutable(); - result.terms_ = terms_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.metadataUpdateBehavior_ = metadataUpdateBehavior_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest other) { - if (other == io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getAttributeValueId().isEmpty()) { - attributeValueId_ = other.attributeValueId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.terms_.isEmpty()) { - if (terms_.isEmpty()) { - terms_ = other.terms_; - bitField0_ |= 0x00000004; - } else { - ensureTermsIsMutable(); - terms_.addAll(other.terms_); - } - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.metadataUpdateBehavior_ != 0) { - setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 34: { - attributeValueId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 34 - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - ensureTermsIsMutable(); - terms_.add(s); - break; - } // case 42 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 802 - case 808: { - metadataUpdateBehavior_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 808 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object attributeValueId_ = ""; - /** - *
-     * Optional
-     * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @return The attributeValueId. - */ - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeValueId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional
-     * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. - */ - public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeValueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional
-     * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @param value The attributeValueId to set. - * @return This builder for chaining. - */ - public Builder setAttributeValueId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - attributeValueId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @return This builder for chaining. - */ - public Builder clearAttributeValueId() { - attributeValueId_ = getDefaultInstance().getAttributeValueId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @param value The bytes for attributeValueId to set. - * @return This builder for chaining. - */ - public Builder setAttributeValueIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - attributeValueId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureTermsIsMutable() { - if (!terms_.isModifiable()) { - terms_ = new com.google.protobuf.LazyStringArrayList(terms_); - } - bitField0_ |= 0x00000004; - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @return A list containing the terms. - */ - public com.google.protobuf.ProtocolStringList - getTermsList() { - terms_.makeImmutable(); - return terms_; - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @return The count of terms. - */ - public int getTermsCount() { - return terms_.size(); - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param index The index of the element to return. - * @return The terms at the given index. - */ - public java.lang.String getTerms(int index) { - return terms_.get(index); - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - public com.google.protobuf.ByteString - getTermsBytes(int index) { - return terms_.getByteString(index); - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param index The index to set the value at. - * @param value The terms to set. - * @return This builder for chaining. - */ - public Builder setTerms( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureTermsIsMutable(); - terms_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param value The terms to add. - * @return This builder for chaining. - */ - public Builder addTerms( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureTermsIsMutable(); - terms_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param values The terms to add. - * @return This builder for chaining. - */ - public Builder addAllTerms( - java.lang.Iterable values) { - ensureTermsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, terms_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @return This builder for chaining. - */ - public Builder clearTerms() { - terms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004);; - onChanged(); - return this; - } - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param value The bytes of the terms to add. - * @return This builder for chaining. - */ - public Builder addTermsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureTermsIsMutable(); - terms_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common Metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehaviorValue(int value) { - metadataUpdateBehavior_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - metadataUpdateBehavior_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return This builder for chaining. - */ - public Builder clearMetadataUpdateBehavior() { - bitField0_ = (bitField0_ & ~0x00000010); - metadataUpdateBehavior_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.UpdateResourceMappingRequest) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.UpdateResourceMappingRequest) - private static final io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest(); - } - - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateResourceMappingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequestOrBuilder.java deleted file mode 100644 index 2a1a6ea2..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingRequestOrBuilder.java +++ /dev/null @@ -1,113 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface UpdateResourceMappingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.UpdateResourceMappingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Optional
-   * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @return The attributeValueId. - */ - java.lang.String getAttributeValueId(); - /** - *
-   * Optional
-   * 
- * - * string attribute_value_id = 4 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. - */ - com.google.protobuf.ByteString - getAttributeValueIdBytes(); - - /** - * repeated string terms = 5 [json_name = "terms"]; - * @return A list containing the terms. - */ - java.util.List - getTermsList(); - /** - * repeated string terms = 5 [json_name = "terms"]; - * @return The count of terms. - */ - int getTermsCount(); - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param index The index of the element to return. - * @return The terms at the given index. - */ - java.lang.String getTerms(int index); - /** - * repeated string terms = 5 [json_name = "terms"]; - * @param index The index of the value to return. - * @return The bytes of the terms at the given index. - */ - com.google.protobuf.ByteString - getTermsBytes(int index); - - /** - *
-   * Common Metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common Metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Common Metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - int getMetadataUpdateBehaviorValue(); - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponse.java deleted file mode 100644 index e008eff9..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -/** - * Protobuf type {@code policy.resourcemapping.UpdateResourceMappingResponse} - */ -public final class UpdateResourceMappingResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.resourcemapping.UpdateResourceMappingResponse) - UpdateResourceMappingResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateResourceMappingResponse.newBuilder() to construct. - private UpdateResourceMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateResourceMappingResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateResourceMappingResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.Builder.class); - } - - private int bitField0_; - public static final int RESOURCE_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.ResourceMapping resourceMapping_; - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - @java.lang.Override - public boolean hasResourceMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getResourceMapping()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getResourceMapping()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse other = (io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse) obj; - - if (hasResourceMapping() != other.hasResourceMapping()) return false; - if (hasResourceMapping()) { - if (!getResourceMapping() - .equals(other.getResourceMapping())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasResourceMapping()) { - hash = (37 * hash) + RESOURCE_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getResourceMapping().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.resourcemapping.UpdateResourceMappingResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.resourcemapping.UpdateResourceMappingResponse) - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.class, io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResourceMappingFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceMapping_ = null; - if (resourceMappingBuilder_ != null) { - resourceMappingBuilder_.dispose(); - resourceMappingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.resourcemapping.ResourceMappingProto.internal_static_policy_resourcemapping_UpdateResourceMappingResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse build() { - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse buildPartial() { - io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse result = new io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resourceMapping_ = resourceMappingBuilder_ == null - ? resourceMapping_ - : resourceMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse) { - return mergeFrom((io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse other) { - if (other == io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse.getDefaultInstance()) return this; - if (other.hasResourceMapping()) { - mergeResourceMapping(other.getResourceMapping()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getResourceMappingFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.ResourceMapping resourceMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> resourceMappingBuilder_; - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - public boolean hasResourceMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - public io.opentdf.platform.policy.ResourceMapping getResourceMapping() { - if (resourceMappingBuilder_ == null) { - return resourceMapping_ == null ? io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } else { - return resourceMappingBuilder_.getMessage(); - } - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder setResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resourceMapping_ = value; - } else { - resourceMappingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder setResourceMapping( - io.opentdf.platform.policy.ResourceMapping.Builder builderForValue) { - if (resourceMappingBuilder_ == null) { - resourceMapping_ = builderForValue.build(); - } else { - resourceMappingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder mergeResourceMapping(io.opentdf.platform.policy.ResourceMapping value) { - if (resourceMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - resourceMapping_ != null && - resourceMapping_ != io.opentdf.platform.policy.ResourceMapping.getDefaultInstance()) { - getResourceMappingBuilder().mergeFrom(value); - } else { - resourceMapping_ = value; - } - } else { - resourceMappingBuilder_.mergeFrom(value); - } - if (resourceMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public Builder clearResourceMapping() { - bitField0_ = (bitField0_ & ~0x00000001); - resourceMapping_ = null; - if (resourceMappingBuilder_ != null) { - resourceMappingBuilder_.dispose(); - resourceMappingBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public io.opentdf.platform.policy.ResourceMapping.Builder getResourceMappingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getResourceMappingFieldBuilder().getBuilder(); - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - public io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder() { - if (resourceMappingBuilder_ != null) { - return resourceMappingBuilder_.getMessageOrBuilder(); - } else { - return resourceMapping_ == null ? - io.opentdf.platform.policy.ResourceMapping.getDefaultInstance() : resourceMapping_; - } - } - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder> - getResourceMappingFieldBuilder() { - if (resourceMappingBuilder_ == null) { - resourceMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.ResourceMapping, io.opentdf.platform.policy.ResourceMapping.Builder, io.opentdf.platform.policy.ResourceMappingOrBuilder>( - getResourceMapping(), - getParentForChildren(), - isClean()); - resourceMapping_ = null; - } - return resourceMappingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.resourcemapping.UpdateResourceMappingResponse) - } - - // @@protoc_insertion_point(class_scope:policy.resourcemapping.UpdateResourceMappingResponse) - private static final io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse(); - } - - public static io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateResourceMappingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.resourcemapping.UpdateResourceMappingResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponseOrBuilder.java deleted file mode 100644 index 42050b6f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/resourcemapping/UpdateResourceMappingResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/resourcemapping/resource_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.resourcemapping; - -public interface UpdateResourceMappingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.resourcemapping.UpdateResourceMappingResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return Whether the resourceMapping field is set. - */ - boolean hasResourceMapping(); - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - * @return The resourceMapping. - */ - io.opentdf.platform.policy.ResourceMapping getResourceMapping(); - /** - * .policy.ResourceMapping resource_mapping = 1 [json_name = "resourceMapping"]; - */ - io.opentdf.platform.policy.ResourceMappingOrBuilder getResourceMappingOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java deleted file mode 100644 index 96414f00..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.CreateSubjectConditionSetRequest} - */ -public final class CreateSubjectConditionSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectConditionSetRequest) - CreateSubjectConditionSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateSubjectConditionSetRequest.newBuilder() to construct. - private CreateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateSubjectConditionSetRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateSubjectConditionSetRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate subjectConditionSet_; - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectConditionSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectConditionSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest) obj; - - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.CreateSubjectConditionSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectConditionSetRequest) - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest build() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance()) return this; - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> subjectConditionSetBuilder_; - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; - } else { - return subjectConditionSetBuilder_.getMessage(); - } - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; - } else { - subjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getSubjectConditionSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; - } - } - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectConditionSetRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectConditionSetRequest) - private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSubjectConditionSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java deleted file mode 100644 index cc271966..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface CreateSubjectConditionSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectConditionSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - boolean hasSubjectConditionSet(); - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet(); - /** - * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java deleted file mode 100644 index 65fef415..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.CreateSubjectConditionSetResponse} - */ -public final class CreateSubjectConditionSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectConditionSetResponse) - CreateSubjectConditionSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateSubjectConditionSetResponse.newBuilder() to construct. - private CreateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateSubjectConditionSetResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateSubjectConditionSetResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectConditionSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectConditionSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse) obj; - - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.CreateSubjectConditionSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectConditionSetResponse) - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse build() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } else { - return subjectConditionSetBuilder_.getMessage(); - } - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; - } else { - subjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectConditionSetResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectConditionSetResponse) - private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSubjectConditionSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java deleted file mode 100644 index 72b28076..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface CreateSubjectConditionSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectConditionSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - boolean hasSubjectConditionSet(); - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java deleted file mode 100644 index e95512a0..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java +++ /dev/null @@ -1,1669 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.CreateSubjectMappingRequest} - */ -public final class CreateSubjectMappingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectMappingRequest) - CreateSubjectMappingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateSubjectMappingRequest.newBuilder() to construct. - private CreateSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateSubjectMappingRequest() { - attributeValueId_ = ""; - actions_ = java.util.Collections.emptyList(); - existingSubjectConditionSetId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateSubjectMappingRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.Builder.class); - } - - private int bitField0_; - public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object attributeValueId_ = ""; - /** - *
-   * Required
-   * Attribute Value to be mapped to
-   * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The attributeValueId. - */ - @java.lang.Override - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeValueId_ = s; - return s; - } - } - /** - *
-   * Required
-   * Attribute Value to be mapped to
-   * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The bytes for attributeValueId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeValueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTIONS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List actions_; - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.Action getActions(int index) { - return actions_.get(index); - } - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); - } - - public static final int EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object existingSubjectConditionSetId_ = ""; - /** - *
-   * Either of the following:
-   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-   * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The existingSubjectConditionSetId. - */ - @java.lang.Override - public java.lang.String getExistingSubjectConditionSetId() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - existingSubjectConditionSetId_ = s; - return s; - } - } - /** - *
-   * Either of the following:
-   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-   * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The bytes for existingSubjectConditionSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExistingSubjectConditionSetIdBytes() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - existingSubjectConditionSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER = 4; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; - /** - *
-   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-   * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return Whether the newSubjectConditionSet field is set. - */ - @java.lang.Override - public boolean hasNewSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-   * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return The newSubjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { - return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } - /** - *
-   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-   * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { - return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeValueId_); - } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(2, actions_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingSubjectConditionSetId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getNewSubjectConditionSet()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeValueId_); - } - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, actions_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, existingSubjectConditionSetId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getNewSubjectConditionSet()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest) obj; - - if (!getAttributeValueId() - .equals(other.getAttributeValueId())) return false; - if (!getActionsList() - .equals(other.getActionsList())) return false; - if (!getExistingSubjectConditionSetId() - .equals(other.getExistingSubjectConditionSetId())) return false; - if (hasNewSubjectConditionSet() != other.hasNewSubjectConditionSet()) return false; - if (hasNewSubjectConditionSet()) { - if (!getNewSubjectConditionSet() - .equals(other.getNewSubjectConditionSet())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeValueId().hashCode(); - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - hash = (37 * hash) + EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getExistingSubjectConditionSetId().hashCode(); - if (hasNewSubjectConditionSet()) { - hash = (37 * hash) + NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getNewSubjectConditionSet().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.CreateSubjectMappingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectMappingRequest) - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getActionsFieldBuilder(); - getNewSubjectConditionSetFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - attributeValueId_ = ""; - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - } else { - actions_ = null; - actionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - existingSubjectConditionSetId_ = ""; - newSubjectConditionSet_ = null; - if (newSubjectConditionSetBuilder_ != null) { - newSubjectConditionSetBuilder_.dispose(); - newSubjectConditionSetBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest build() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result) { - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributeValueId_ = attributeValueId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.existingSubjectConditionSetId_ = existingSubjectConditionSetId_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.newSubjectConditionSet_ = newSubjectConditionSetBuilder_ == null - ? newSubjectConditionSet_ - : newSubjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.getDefaultInstance()) return this; - if (!other.getAttributeValueId().isEmpty()) { - attributeValueId_ = other.attributeValueId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000002); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } - } - } - if (!other.getExistingSubjectConditionSetId().isEmpty()) { - existingSubjectConditionSetId_ = other.existingSubjectConditionSetId_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasNewSubjectConditionSet()) { - mergeNewSubjectConditionSet(other.getNewSubjectConditionSet()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - attributeValueId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.opentdf.platform.policy.Action m = - input.readMessage( - io.opentdf.platform.policy.Action.parser(), - extensionRegistry); - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(m); - } else { - actionsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: { - existingSubjectConditionSetId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getNewSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object attributeValueId_ = ""; - /** - *
-     * Required
-     * Attribute Value to be mapped to
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The attributeValueId. - */ - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeValueId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * Attribute Value to be mapped to
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The bytes for attributeValueId. - */ - public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeValueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * Attribute Value to be mapped to
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @param value The attributeValueId to set. - * @return This builder for chaining. - */ - public Builder setAttributeValueId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - attributeValueId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * Attribute Value to be mapped to
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearAttributeValueId() { - attributeValueId_ = getDefaultInstance().getAttributeValueId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * Attribute Value to be mapped to
-     * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @param value The bytes for attributeValueId to set. - * @return This builder for chaining. - */ - public Builder setAttributeValueIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - attributeValueId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionsBuilder_; - - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder setActions( - int index, io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder setActions( - int index, io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder addActions(io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder addActions( - int index, io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder addActions( - io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder addActions( - int index, io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Action.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Action.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - io.opentdf.platform.policy.Action.getDefaultInstance()); - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.Action.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Action.getDefaultInstance()); - } - /** - *
-     * The actions permitted by subjects in this mapping
-     * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } - - private java.lang.Object existingSubjectConditionSetId_ = ""; - /** - *
-     * Either of the following:
-     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-     * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The existingSubjectConditionSetId. - */ - public java.lang.String getExistingSubjectConditionSetId() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - existingSubjectConditionSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Either of the following:
-     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-     * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The bytes for existingSubjectConditionSetId. - */ - public com.google.protobuf.ByteString - getExistingSubjectConditionSetIdBytes() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - existingSubjectConditionSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Either of the following:
-     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-     * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @param value The existingSubjectConditionSetId to set. - * @return This builder for chaining. - */ - public Builder setExistingSubjectConditionSetId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - existingSubjectConditionSetId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Either of the following:
-     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-     * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return This builder for chaining. - */ - public Builder clearExistingSubjectConditionSetId() { - existingSubjectConditionSetId_ = getDefaultInstance().getExistingSubjectConditionSetId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Either of the following:
-     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-     * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @param value The bytes for existingSubjectConditionSetId to set. - * @return This builder for chaining. - */ - public Builder setExistingSubjectConditionSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - existingSubjectConditionSetId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> newSubjectConditionSetBuilder_; - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return Whether the newSubjectConditionSet field is set. - */ - public boolean hasNewSubjectConditionSet() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return The newSubjectConditionSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { - if (newSubjectConditionSetBuilder_ == null) { - return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } else { - return newSubjectConditionSetBuilder_.getMessage(); - } - } - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder setNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { - if (newSubjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - newSubjectConditionSet_ = value; - } else { - newSubjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder setNewSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { - if (newSubjectConditionSetBuilder_ == null) { - newSubjectConditionSet_ = builderForValue.build(); - } else { - newSubjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder mergeNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { - if (newSubjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - newSubjectConditionSet_ != null && - newSubjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { - getNewSubjectConditionSetBuilder().mergeFrom(value); - } else { - newSubjectConditionSet_ = value; - } - } else { - newSubjectConditionSetBuilder_.mergeFrom(value); - } - if (newSubjectConditionSet_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder clearNewSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000008); - newSubjectConditionSet_ = null; - if (newSubjectConditionSetBuilder_ != null) { - newSubjectConditionSetBuilder_.dispose(); - newSubjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getNewSubjectConditionSetBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getNewSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { - if (newSubjectConditionSetBuilder_ != null) { - return newSubjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return newSubjectConditionSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } - } - /** - *
-     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-     * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> - getNewSubjectConditionSetFieldBuilder() { - if (newSubjectConditionSetBuilder_ == null) { - newSubjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( - getNewSubjectConditionSet(), - getParentForChildren(), - isClean()); - newSubjectConditionSet_ = null; - } - return newSubjectConditionSetBuilder_; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000010); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Optional
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectMappingRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectMappingRequest) - private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSubjectMappingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java deleted file mode 100644 index ebe8524f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java +++ /dev/null @@ -1,152 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface CreateSubjectMappingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectMappingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * Attribute Value to be mapped to
-   * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The attributeValueId. - */ - java.lang.String getAttributeValueId(); - /** - *
-   * Required
-   * Attribute Value to be mapped to
-   * 
- * - * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } - * @return The bytes for attributeValueId. - */ - com.google.protobuf.ByteString - getAttributeValueIdBytes(); - - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - java.util.List - getActionsList(); - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.Action getActions(int index); - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - int getActionsCount(); - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - java.util.List - getActionsOrBuilderList(); - /** - *
-   * The actions permitted by subjects in this mapping
-   * 
- * - * repeated .policy.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index); - - /** - *
-   * Either of the following:
-   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-   * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The existingSubjectConditionSetId. - */ - java.lang.String getExistingSubjectConditionSetId(); - /** - *
-   * Either of the following:
-   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
-   * 
- * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The bytes for existingSubjectConditionSetId. - */ - com.google.protobuf.ByteString - getExistingSubjectConditionSetIdBytes(); - - /** - *
-   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-   * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return Whether the newSubjectConditionSet field is set. - */ - boolean hasNewSubjectConditionSet(); - /** - *
-   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-   * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return The newSubjectConditionSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet(); - /** - *
-   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
-   * 
- * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder(); - - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Optional
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java deleted file mode 100644 index 048034a7..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.CreateSubjectMappingResponse} - */ -public final class CreateSubjectMappingResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectMappingResponse) - CreateSubjectMappingResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateSubjectMappingResponse.newBuilder() to construct. - private CreateSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateSubjectMappingResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateSubjectMappingResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.SubjectMapping subjectMapping_; - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - @java.lang.Override - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectMapping()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectMapping()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse) obj; - - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.CreateSubjectMappingResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectMappingResponse) - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse build() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.getDefaultInstance()) return this; - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.SubjectMapping subjectMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingBuilder_; - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } else { - return subjectMappingBuilder_.getMessage(); - } - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder setSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectMapping_ = value; - } else { - subjectMappingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); - } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); - } else { - subjectMapping_ = value; - } - } else { - subjectMappingBuilder_.mergeFrom(value); - } - if (subjectMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder clearSubjectMapping() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); - } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( - getSubjectMapping(), - getParentForChildren(), - isClean()); - subjectMapping_ = null; - } - return subjectMappingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectMappingResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectMappingResponse) - private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSubjectMappingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java deleted file mode 100644 index 3f868566..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface CreateSubjectMappingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectMappingResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - boolean hasSubjectMapping(); - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - io.opentdf.platform.policy.SubjectMapping getSubjectMapping(); - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java deleted file mode 100644 index f2b5e6e3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectConditionSetRequest} - */ -public final class DeleteSubjectConditionSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectConditionSetRequest) - DeleteSubjectConditionSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteSubjectConditionSetRequest.newBuilder() to construct. - private DeleteSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteSubjectConditionSetRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteSubjectConditionSetRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectConditionSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectConditionSetRequest) - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest build() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectConditionSetRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectConditionSetRequest) - private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteSubjectConditionSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java deleted file mode 100644 index 485be1e2..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface DeleteSubjectConditionSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectConditionSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java deleted file mode 100644 index dcdc849b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java +++ /dev/null @@ -1,647 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectConditionSetResponse} - */ -public final class DeleteSubjectConditionSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectConditionSetResponse) - DeleteSubjectConditionSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteSubjectConditionSetResponse.newBuilder() to construct. - private DeleteSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteSubjectConditionSetResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteSubjectConditionSetResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - /** - *
-   * Only ID of deleted Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Only ID of deleted Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - /** - *
-   * Only ID of deleted Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectConditionSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectConditionSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse) obj; - - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectConditionSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectConditionSetResponse) - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse build() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } else { - return subjectConditionSetBuilder_.getMessage(); - } - } - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; - } else { - subjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - } - /** - *
-     * Only ID of deleted Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectConditionSetResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectConditionSetResponse) - private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteSubjectConditionSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java deleted file mode 100644 index 29b3401e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface DeleteSubjectConditionSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectConditionSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Only ID of deleted Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - boolean hasSubjectConditionSet(); - /** - *
-   * Only ID of deleted Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); - /** - *
-   * Only ID of deleted Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequest.java deleted file mode 100644 index 2b6c01ee..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectMappingRequest} - */ -public final class DeleteSubjectMappingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectMappingRequest) - DeleteSubjectMappingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteSubjectMappingRequest.newBuilder() to construct. - private DeleteSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteSubjectMappingRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteSubjectMappingRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectMappingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectMappingRequest) - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest build() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectMappingRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectMappingRequest) - private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteSubjectMappingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequestOrBuilder.java deleted file mode 100644 index e2e8f8de..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface DeleteSubjectMappingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectMappingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java deleted file mode 100644 index 4eb3a8c3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java +++ /dev/null @@ -1,647 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectMappingResponse} - */ -public final class DeleteSubjectMappingResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectMappingResponse) - DeleteSubjectMappingResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteSubjectMappingResponse.newBuilder() to construct. - private DeleteSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteSubjectMappingResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteSubjectMappingResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.SubjectMapping subjectMapping_; - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - @java.lang.Override - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectMapping()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectMapping()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse) obj; - - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectMappingResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectMappingResponse) - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse build() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.getDefaultInstance()) return this; - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.SubjectMapping subjectMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingBuilder_; - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } else { - return subjectMappingBuilder_.getMessage(); - } - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder setSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectMapping_ = value; - } else { - subjectMappingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); - } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); - } else { - subjectMapping_ = value; - } - } else { - subjectMappingBuilder_.mergeFrom(value); - } - if (subjectMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder clearSubjectMapping() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); - } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( - getSubjectMapping(), - getParentForChildren(), - isClean()); - subjectMapping_ = null; - } - return subjectMappingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectMappingResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectMappingResponse) - private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteSubjectMappingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java deleted file mode 100644 index 97231f85..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface DeleteSubjectMappingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectMappingResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - boolean hasSubjectMapping(); - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - io.opentdf.platform.policy.SubjectMapping getSubjectMapping(); - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java deleted file mode 100644 index d39484b8..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.GetSubjectConditionSetRequest} - */ -public final class GetSubjectConditionSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectConditionSetRequest) - GetSubjectConditionSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetSubjectConditionSetRequest.newBuilder() to construct. - private GetSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetSubjectConditionSetRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetSubjectConditionSetRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.GetSubjectConditionSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectConditionSetRequest) - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest build() { - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectConditionSetRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectConditionSetRequest) - private static final io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSubjectConditionSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java deleted file mode 100644 index f6c76435..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface GetSubjectConditionSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectConditionSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java deleted file mode 100644 index 2b4d78d5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java +++ /dev/null @@ -1,1046 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.GetSubjectConditionSetResponse} - */ -public final class GetSubjectConditionSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectConditionSetResponse) - GetSubjectConditionSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetSubjectConditionSetResponse.newBuilder() to construct. - private GetSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetSubjectConditionSetResponse() { - associatedSubjectMappings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetSubjectConditionSetResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - - public static final int ASSOCIATED_SUBJECT_MAPPINGS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List associatedSubjectMappings_; - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - @java.lang.Override - public java.util.List getAssociatedSubjectMappingsList() { - return associatedSubjectMappings_; - } - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - @java.lang.Override - public java.util.List - getAssociatedSubjectMappingsOrBuilderList() { - return associatedSubjectMappings_; - } - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - @java.lang.Override - public int getAssociatedSubjectMappingsCount() { - return associatedSubjectMappings_.size(); - } - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getAssociatedSubjectMappings(int index) { - return associatedSubjectMappings_.get(index); - } - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( - int index) { - return associatedSubjectMappings_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectConditionSet()); - } - for (int i = 0; i < associatedSubjectMappings_.size(); i++) { - output.writeMessage(2, associatedSubjectMappings_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectConditionSet()); - } - for (int i = 0; i < associatedSubjectMappings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, associatedSubjectMappings_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse) obj; - - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } - if (!getAssociatedSubjectMappingsList() - .equals(other.getAssociatedSubjectMappingsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } - if (getAssociatedSubjectMappingsCount() > 0) { - hash = (37 * hash) + ASSOCIATED_SUBJECT_MAPPINGS_FIELD_NUMBER; - hash = (53 * hash) + getAssociatedSubjectMappingsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.GetSubjectConditionSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectConditionSetResponse) - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); - getAssociatedSubjectMappingsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - if (associatedSubjectMappingsBuilder_ == null) { - associatedSubjectMappings_ = java.util.Collections.emptyList(); - } else { - associatedSubjectMappings_ = null; - associatedSubjectMappingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse build() { - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result) { - if (associatedSubjectMappingsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - associatedSubjectMappings_ = java.util.Collections.unmodifiableList(associatedSubjectMappings_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.associatedSubjectMappings_ = associatedSubjectMappings_; - } else { - result.associatedSubjectMappings_ = associatedSubjectMappingsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); - } - if (associatedSubjectMappingsBuilder_ == null) { - if (!other.associatedSubjectMappings_.isEmpty()) { - if (associatedSubjectMappings_.isEmpty()) { - associatedSubjectMappings_ = other.associatedSubjectMappings_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.addAll(other.associatedSubjectMappings_); - } - onChanged(); - } - } else { - if (!other.associatedSubjectMappings_.isEmpty()) { - if (associatedSubjectMappingsBuilder_.isEmpty()) { - associatedSubjectMappingsBuilder_.dispose(); - associatedSubjectMappingsBuilder_ = null; - associatedSubjectMappings_ = other.associatedSubjectMappings_; - bitField0_ = (bitField0_ & ~0x00000002); - associatedSubjectMappingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAssociatedSubjectMappingsFieldBuilder() : null; - } else { - associatedSubjectMappingsBuilder_.addAllMessages(other.associatedSubjectMappings_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.opentdf.platform.policy.SubjectMapping m = - input.readMessage( - io.opentdf.platform.policy.SubjectMapping.parser(), - extensionRegistry); - if (associatedSubjectMappingsBuilder_ == null) { - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.add(m); - } else { - associatedSubjectMappingsBuilder_.addMessage(m); - } - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } else { - return subjectConditionSetBuilder_.getMessage(); - } - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; - } else { - subjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - } - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; - } - - private java.util.List associatedSubjectMappings_ = - java.util.Collections.emptyList(); - private void ensureAssociatedSubjectMappingsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - associatedSubjectMappings_ = new java.util.ArrayList(associatedSubjectMappings_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> associatedSubjectMappingsBuilder_; - - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public java.util.List getAssociatedSubjectMappingsList() { - if (associatedSubjectMappingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(associatedSubjectMappings_); - } else { - return associatedSubjectMappingsBuilder_.getMessageList(); - } - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public int getAssociatedSubjectMappingsCount() { - if (associatedSubjectMappingsBuilder_ == null) { - return associatedSubjectMappings_.size(); - } else { - return associatedSubjectMappingsBuilder_.getCount(); - } - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping getAssociatedSubjectMappings(int index) { - if (associatedSubjectMappingsBuilder_ == null) { - return associatedSubjectMappings_.get(index); - } else { - return associatedSubjectMappingsBuilder_.getMessage(index); - } - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder setAssociatedSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping value) { - if (associatedSubjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.set(index, value); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder setAssociatedSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (associatedSubjectMappingsBuilder_ == null) { - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.set(index, builderForValue.build()); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder addAssociatedSubjectMappings(io.opentdf.platform.policy.SubjectMapping value) { - if (associatedSubjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.add(value); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder addAssociatedSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping value) { - if (associatedSubjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.add(index, value); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder addAssociatedSubjectMappings( - io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (associatedSubjectMappingsBuilder_ == null) { - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.add(builderForValue.build()); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder addAssociatedSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (associatedSubjectMappingsBuilder_ == null) { - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.add(index, builderForValue.build()); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder addAllAssociatedSubjectMappings( - java.lang.Iterable values) { - if (associatedSubjectMappingsBuilder_ == null) { - ensureAssociatedSubjectMappingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, associatedSubjectMappings_); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder clearAssociatedSubjectMappings() { - if (associatedSubjectMappingsBuilder_ == null) { - associatedSubjectMappings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.clear(); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public Builder removeAssociatedSubjectMappings(int index) { - if (associatedSubjectMappingsBuilder_ == null) { - ensureAssociatedSubjectMappingsIsMutable(); - associatedSubjectMappings_.remove(index); - onChanged(); - } else { - associatedSubjectMappingsBuilder_.remove(index); - } - return this; - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder getAssociatedSubjectMappingsBuilder( - int index) { - return getAssociatedSubjectMappingsFieldBuilder().getBuilder(index); - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( - int index) { - if (associatedSubjectMappingsBuilder_ == null) { - return associatedSubjectMappings_.get(index); } else { - return associatedSubjectMappingsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public java.util.List - getAssociatedSubjectMappingsOrBuilderList() { - if (associatedSubjectMappingsBuilder_ != null) { - return associatedSubjectMappingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(associatedSubjectMappings_); - } - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder addAssociatedSubjectMappingsBuilder() { - return getAssociatedSubjectMappingsFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder addAssociatedSubjectMappingsBuilder( - int index) { - return getAssociatedSubjectMappingsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); - } - /** - *
-     * contextualized Subject Mappings associated with this SubjectConditionSet
-     * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - public java.util.List - getAssociatedSubjectMappingsBuilderList() { - return getAssociatedSubjectMappingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> - getAssociatedSubjectMappingsFieldBuilder() { - if (associatedSubjectMappingsBuilder_ == null) { - associatedSubjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( - associatedSubjectMappings_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - associatedSubjectMappings_ = null; - } - return associatedSubjectMappingsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectConditionSetResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectConditionSetResponse) - private static final io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSubjectConditionSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java deleted file mode 100644 index 5664becb..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface GetSubjectConditionSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectConditionSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - boolean hasSubjectConditionSet(); - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); - /** - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); - - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - java.util.List - getAssociatedSubjectMappingsList(); - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - io.opentdf.platform.policy.SubjectMapping getAssociatedSubjectMappings(int index); - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - int getAssociatedSubjectMappingsCount(); - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - java.util.List - getAssociatedSubjectMappingsOrBuilderList(); - /** - *
-   * contextualized Subject Mappings associated with this SubjectConditionSet
-   * 
- * - * repeated .policy.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; - */ - io.opentdf.platform.policy.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequest.java deleted file mode 100644 index f2398e3f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.GetSubjectMappingRequest} - */ -public final class GetSubjectMappingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectMappingRequest) - GetSubjectMappingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetSubjectMappingRequest.newBuilder() to construct. - private GetSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetSubjectMappingRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetSubjectMappingRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.GetSubjectMappingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectMappingRequest) - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest build() { - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectMappingRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectMappingRequest) - private static final io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSubjectMappingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequestOrBuilder.java deleted file mode 100644 index 10b89afb..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface GetSubjectMappingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectMappingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponse.java deleted file mode 100644 index 2d2eb573..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.GetSubjectMappingResponse} - */ -public final class GetSubjectMappingResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectMappingResponse) - GetSubjectMappingResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetSubjectMappingResponse.newBuilder() to construct. - private GetSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetSubjectMappingResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetSubjectMappingResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.SubjectMapping subjectMapping_; - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - @java.lang.Override - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectMapping()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectMapping()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse) obj; - - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.GetSubjectMappingResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectMappingResponse) - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse build() { - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse result = new io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.getDefaultInstance()) return this; - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.SubjectMapping subjectMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingBuilder_; - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } else { - return subjectMappingBuilder_.getMessage(); - } - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder setSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectMapping_ = value; - } else { - subjectMappingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); - } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); - } else { - subjectMapping_ = value; - } - } else { - subjectMappingBuilder_.mergeFrom(value); - } - if (subjectMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder clearSubjectMapping() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); - } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - } - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( - getSubjectMapping(), - getParentForChildren(), - isClean()); - subjectMapping_ = null; - } - return subjectMappingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectMappingResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectMappingResponse) - private static final io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSubjectMappingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponseOrBuilder.java deleted file mode 100644 index 9bff6891..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectMappingResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface GetSubjectMappingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectMappingResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - boolean hasSubjectMapping(); - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - io.opentdf.platform.policy.SubjectMapping getSubjectMapping(); - /** - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java deleted file mode 100644 index 6a488af5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.ListSubjectConditionSetsRequest} - */ -public final class ListSubjectConditionSetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectConditionSetsRequest) - ListSubjectConditionSetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListSubjectConditionSetsRequest.newBuilder() to construct. - private ListSubjectConditionSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListSubjectConditionSetsRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListSubjectConditionSetsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest other = (io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.ListSubjectConditionSetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectConditionSetsRequest) - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest build() { - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest result = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectConditionSetsRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectConditionSetsRequest) - private static final io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSubjectConditionSetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java deleted file mode 100644 index 1a55d0e6..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface ListSubjectConditionSetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectConditionSetsRequest) - com.google.protobuf.MessageOrBuilder { -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java deleted file mode 100644 index b073dfed..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.ListSubjectConditionSetsResponse} - */ -public final class ListSubjectConditionSetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectConditionSetsResponse) - ListSubjectConditionSetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListSubjectConditionSetsResponse.newBuilder() to construct. - private ListSubjectConditionSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListSubjectConditionSetsResponse() { - subjectConditionSets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListSubjectConditionSetsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.Builder.class); - } - - public static final int SUBJECT_CONDITION_SETS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List subjectConditionSets_; - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - @java.lang.Override - public java.util.List getSubjectConditionSetsList() { - return subjectConditionSets_; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - @java.lang.Override - public java.util.List - getSubjectConditionSetsOrBuilderList() { - return subjectConditionSets_; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - @java.lang.Override - public int getSubjectConditionSetsCount() { - return subjectConditionSets_.size(); - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSets(int index) { - return subjectConditionSets_.get(index); - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( - int index) { - return subjectConditionSets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subjectConditionSets_.size(); i++) { - output.writeMessage(1, subjectConditionSets_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subjectConditionSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subjectConditionSets_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse other = (io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse) obj; - - if (!getSubjectConditionSetsList() - .equals(other.getSubjectConditionSetsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubjectConditionSetsCount() > 0) { - hash = (37 * hash) + SUBJECT_CONDITION_SETS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSetsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.ListSubjectConditionSetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectConditionSetsResponse) - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (subjectConditionSetsBuilder_ == null) { - subjectConditionSets_ = java.util.Collections.emptyList(); - } else { - subjectConditionSets_ = null; - subjectConditionSetsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse build() { - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result) { - if (subjectConditionSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subjectConditionSets_ = java.util.Collections.unmodifiableList(subjectConditionSets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subjectConditionSets_ = subjectConditionSets_; - } else { - result.subjectConditionSets_ = subjectConditionSetsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance()) return this; - if (subjectConditionSetsBuilder_ == null) { - if (!other.subjectConditionSets_.isEmpty()) { - if (subjectConditionSets_.isEmpty()) { - subjectConditionSets_ = other.subjectConditionSets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.addAll(other.subjectConditionSets_); - } - onChanged(); - } - } else { - if (!other.subjectConditionSets_.isEmpty()) { - if (subjectConditionSetsBuilder_.isEmpty()) { - subjectConditionSetsBuilder_.dispose(); - subjectConditionSetsBuilder_ = null; - subjectConditionSets_ = other.subjectConditionSets_; - bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectConditionSetsFieldBuilder() : null; - } else { - subjectConditionSetsBuilder_.addAllMessages(other.subjectConditionSets_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.SubjectConditionSet m = - input.readMessage( - io.opentdf.platform.policy.SubjectConditionSet.parser(), - extensionRegistry); - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(m); - } else { - subjectConditionSetsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List subjectConditionSets_ = - java.util.Collections.emptyList(); - private void ensureSubjectConditionSetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subjectConditionSets_ = new java.util.ArrayList(subjectConditionSets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetsBuilder_; - - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public java.util.List getSubjectConditionSetsList() { - if (subjectConditionSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectConditionSets_); - } else { - return subjectConditionSetsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public int getSubjectConditionSetsCount() { - if (subjectConditionSetsBuilder_ == null) { - return subjectConditionSets_.size(); - } else { - return subjectConditionSetsBuilder_.getCount(); - } - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSets(int index) { - if (subjectConditionSetsBuilder_ == null) { - return subjectConditionSets_.get(index); - } else { - return subjectConditionSetsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder setSubjectConditionSets( - int index, io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.set(index, value); - onChanged(); - } else { - subjectConditionSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder setSubjectConditionSets( - int index, io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectConditionSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder addSubjectConditionSets(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(value); - onChanged(); - } else { - subjectConditionSetsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder addSubjectConditionSets( - int index, io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(index, value); - onChanged(); - } else { - subjectConditionSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder addSubjectConditionSets( - io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(builderForValue.build()); - onChanged(); - } else { - subjectConditionSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder addSubjectConditionSets( - int index, io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectConditionSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder addAllSubjectConditionSets( - java.lang.Iterable values) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectConditionSets_); - onChanged(); - } else { - subjectConditionSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder clearSubjectConditionSets() { - if (subjectConditionSetsBuilder_ == null) { - subjectConditionSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subjectConditionSetsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public Builder removeSubjectConditionSets(int index) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.remove(index); - onChanged(); - } else { - subjectConditionSetsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetsBuilder( - int index) { - return getSubjectConditionSetsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( - int index) { - if (subjectConditionSetsBuilder_ == null) { - return subjectConditionSets_.get(index); } else { - return subjectConditionSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public java.util.List - getSubjectConditionSetsOrBuilderList() { - if (subjectConditionSetsBuilder_ != null) { - return subjectConditionSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectConditionSets_); - } - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet.Builder addSubjectConditionSetsBuilder() { - return getSubjectConditionSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()); - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet.Builder addSubjectConditionSetsBuilder( - int index) { - return getSubjectConditionSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()); - } - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - public java.util.List - getSubjectConditionSetsBuilderList() { - return getSubjectConditionSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> - getSubjectConditionSetsFieldBuilder() { - if (subjectConditionSetsBuilder_ == null) { - subjectConditionSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( - subjectConditionSets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subjectConditionSets_ = null; - } - return subjectConditionSetsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectConditionSetsResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectConditionSetsResponse) - private static final io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSubjectConditionSetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java deleted file mode 100644 index 9d833c1c..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface ListSubjectConditionSetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectConditionSetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - java.util.List - getSubjectConditionSetsList(); - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSets(int index); - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - int getSubjectConditionSetsCount(); - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - java.util.List - getSubjectConditionSetsOrBuilderList(); - /** - * repeated .policy.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; - */ - io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequest.java deleted file mode 100644 index 061831b3..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequest.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.ListSubjectMappingsRequest} - */ -public final class ListSubjectMappingsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectMappingsRequest) - ListSubjectMappingsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListSubjectMappingsRequest.newBuilder() to construct. - private ListSubjectMappingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListSubjectMappingsRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListSubjectMappingsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest other = (io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.ListSubjectMappingsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectMappingsRequest) - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest build() { - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest result = new io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectMappingsRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectMappingsRequest) - private static final io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSubjectMappingsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequestOrBuilder.java deleted file mode 100644 index e3fa9269..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsRequestOrBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface ListSubjectMappingsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectMappingsRequest) - com.google.protobuf.MessageOrBuilder { -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponse.java deleted file mode 100644 index 71cd08da..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.ListSubjectMappingsResponse} - */ -public final class ListSubjectMappingsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectMappingsResponse) - ListSubjectMappingsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListSubjectMappingsResponse.newBuilder() to construct. - private ListSubjectMappingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListSubjectMappingsResponse() { - subjectMappings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListSubjectMappingsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.Builder.class); - } - - public static final int SUBJECT_MAPPINGS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List subjectMappings_; - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public java.util.List getSubjectMappingsList() { - return subjectMappings_; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public java.util.List - getSubjectMappingsOrBuilderList() { - return subjectMappings_; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public int getSubjectMappingsCount() { - return subjectMappings_.size(); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { - return subjectMappings_.get(index); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index) { - return subjectMappings_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subjectMappings_.size(); i++) { - output.writeMessage(1, subjectMappings_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subjectMappings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subjectMappings_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse other = (io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse) obj; - - if (!getSubjectMappingsList() - .equals(other.getSubjectMappingsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubjectMappingsCount() > 0) { - hash = (37 * hash) + SUBJECT_MAPPINGS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMappingsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.ListSubjectMappingsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectMappingsResponse) - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (subjectMappingsBuilder_ == null) { - subjectMappings_ = java.util.Collections.emptyList(); - } else { - subjectMappings_ = null; - subjectMappingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse build() { - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse result = new io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse result) { - if (subjectMappingsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subjectMappings_ = java.util.Collections.unmodifiableList(subjectMappings_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subjectMappings_ = subjectMappings_; - } else { - result.subjectMappings_ = subjectMappingsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.getDefaultInstance()) return this; - if (subjectMappingsBuilder_ == null) { - if (!other.subjectMappings_.isEmpty()) { - if (subjectMappings_.isEmpty()) { - subjectMappings_ = other.subjectMappings_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubjectMappingsIsMutable(); - subjectMappings_.addAll(other.subjectMappings_); - } - onChanged(); - } - } else { - if (!other.subjectMappings_.isEmpty()) { - if (subjectMappingsBuilder_.isEmpty()) { - subjectMappingsBuilder_.dispose(); - subjectMappingsBuilder_ = null; - subjectMappings_ = other.subjectMappings_; - bitField0_ = (bitField0_ & ~0x00000001); - subjectMappingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectMappingsFieldBuilder() : null; - } else { - subjectMappingsBuilder_.addAllMessages(other.subjectMappings_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.SubjectMapping m = - input.readMessage( - io.opentdf.platform.policy.SubjectMapping.parser(), - extensionRegistry); - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(m); - } else { - subjectMappingsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List subjectMappings_ = - java.util.Collections.emptyList(); - private void ensureSubjectMappingsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subjectMappings_ = new java.util.ArrayList(subjectMappings_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingsBuilder_; - - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public java.util.List getSubjectMappingsList() { - if (subjectMappingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectMappings_); - } else { - return subjectMappingsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public int getSubjectMappingsCount() { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.size(); - } else { - return subjectMappingsBuilder_.getCount(); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.get(index); - } else { - return subjectMappingsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder setSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.set(index, value); - onChanged(); - } else { - subjectMappingsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder setSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(value); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(index, value); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addAllSubjectMappings( - java.lang.Iterable values) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectMappings_); - onChanged(); - } else { - subjectMappingsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder clearSubjectMappings() { - if (subjectMappingsBuilder_ == null) { - subjectMappings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subjectMappingsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder removeSubjectMappings(int index) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.remove(index); - onChanged(); - } else { - subjectMappingsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingsBuilder( - int index) { - return getSubjectMappingsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index) { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.get(index); } else { - return subjectMappingsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public java.util.List - getSubjectMappingsOrBuilderList() { - if (subjectMappingsBuilder_ != null) { - return subjectMappingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectMappings_); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder() { - return getSubjectMappingsFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder( - int index) { - return getSubjectMappingsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public java.util.List - getSubjectMappingsBuilderList() { - return getSubjectMappingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> - getSubjectMappingsFieldBuilder() { - if (subjectMappingsBuilder_ == null) { - subjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( - subjectMappings_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subjectMappings_ = null; - } - return subjectMappingsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectMappingsResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectMappingsResponse) - private static final io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSubjectMappingsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponseOrBuilder.java deleted file mode 100644 index cb1ee117..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectMappingsResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface ListSubjectMappingsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectMappingsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - java.util.List - getSubjectMappingsList(); - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index); - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - int getSubjectMappingsCount(); - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - java.util.List - getSubjectMappingsOrBuilderList(); - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java deleted file mode 100644 index b797ff70..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java +++ /dev/null @@ -1,788 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - *
- * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned
- * if there is any single condition found among the structures that matches for one of the provided properties:
- * 1. The external field, external value, and an IN operator
- * 2. The external field, _no_ external value, and a NOT_IN operator
- *
- * Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping
- * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no
- * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum
- * initial filter.
- *
- * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.
- * 
- * - * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsRequest} - */ -public final class MatchSubjectMappingsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.MatchSubjectMappingsRequest) - MatchSubjectMappingsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use MatchSubjectMappingsRequest.newBuilder() to construct. - private MatchSubjectMappingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MatchSubjectMappingsRequest() { - subjectProperties_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MatchSubjectMappingsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.Builder.class); - } - - public static final int SUBJECT_PROPERTIES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List subjectProperties_; - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - @java.lang.Override - public java.util.List getSubjectPropertiesList() { - return subjectProperties_; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - @java.lang.Override - public java.util.List - getSubjectPropertiesOrBuilderList() { - return subjectProperties_; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - @java.lang.Override - public int getSubjectPropertiesCount() { - return subjectProperties_.size(); - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectProperty getSubjectProperties(int index) { - return subjectProperties_.get(index); - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( - int index) { - return subjectProperties_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subjectProperties_.size(); i++) { - output.writeMessage(1, subjectProperties_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subjectProperties_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subjectProperties_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest other = (io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) obj; - - if (!getSubjectPropertiesList() - .equals(other.getSubjectPropertiesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubjectPropertiesCount() > 0) { - hash = (37 * hash) + SUBJECT_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + getSubjectPropertiesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned
-   * if there is any single condition found among the structures that matches for one of the provided properties:
-   * 1. The external field, external value, and an IN operator
-   * 2. The external field, _no_ external value, and a NOT_IN operator
-   *
-   * Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping
-   * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no
-   * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum
-   * initial filter.
-   *
-   * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.
-   * 
- * - * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.MatchSubjectMappingsRequest) - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (subjectPropertiesBuilder_ == null) { - subjectProperties_ = java.util.Collections.emptyList(); - } else { - subjectProperties_ = null; - subjectPropertiesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest build() { - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result) { - if (subjectPropertiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subjectProperties_ = java.util.Collections.unmodifiableList(subjectProperties_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subjectProperties_ = subjectProperties_; - } else { - result.subjectProperties_ = subjectPropertiesBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.getDefaultInstance()) return this; - if (subjectPropertiesBuilder_ == null) { - if (!other.subjectProperties_.isEmpty()) { - if (subjectProperties_.isEmpty()) { - subjectProperties_ = other.subjectProperties_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubjectPropertiesIsMutable(); - subjectProperties_.addAll(other.subjectProperties_); - } - onChanged(); - } - } else { - if (!other.subjectProperties_.isEmpty()) { - if (subjectPropertiesBuilder_.isEmpty()) { - subjectPropertiesBuilder_.dispose(); - subjectPropertiesBuilder_ = null; - subjectProperties_ = other.subjectProperties_; - bitField0_ = (bitField0_ & ~0x00000001); - subjectPropertiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectPropertiesFieldBuilder() : null; - } else { - subjectPropertiesBuilder_.addAllMessages(other.subjectProperties_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.SubjectProperty m = - input.readMessage( - io.opentdf.platform.policy.SubjectProperty.parser(), - extensionRegistry); - if (subjectPropertiesBuilder_ == null) { - ensureSubjectPropertiesIsMutable(); - subjectProperties_.add(m); - } else { - subjectPropertiesBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List subjectProperties_ = - java.util.Collections.emptyList(); - private void ensureSubjectPropertiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subjectProperties_ = new java.util.ArrayList(subjectProperties_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectProperty, io.opentdf.platform.policy.SubjectProperty.Builder, io.opentdf.platform.policy.SubjectPropertyOrBuilder> subjectPropertiesBuilder_; - - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public java.util.List getSubjectPropertiesList() { - if (subjectPropertiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectProperties_); - } else { - return subjectPropertiesBuilder_.getMessageList(); - } - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public int getSubjectPropertiesCount() { - if (subjectPropertiesBuilder_ == null) { - return subjectProperties_.size(); - } else { - return subjectPropertiesBuilder_.getCount(); - } - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public io.opentdf.platform.policy.SubjectProperty getSubjectProperties(int index) { - if (subjectPropertiesBuilder_ == null) { - return subjectProperties_.get(index); - } else { - return subjectPropertiesBuilder_.getMessage(index); - } - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder setSubjectProperties( - int index, io.opentdf.platform.policy.SubjectProperty value) { - if (subjectPropertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectPropertiesIsMutable(); - subjectProperties_.set(index, value); - onChanged(); - } else { - subjectPropertiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder setSubjectProperties( - int index, io.opentdf.platform.policy.SubjectProperty.Builder builderForValue) { - if (subjectPropertiesBuilder_ == null) { - ensureSubjectPropertiesIsMutable(); - subjectProperties_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectPropertiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder addSubjectProperties(io.opentdf.platform.policy.SubjectProperty value) { - if (subjectPropertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectPropertiesIsMutable(); - subjectProperties_.add(value); - onChanged(); - } else { - subjectPropertiesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder addSubjectProperties( - int index, io.opentdf.platform.policy.SubjectProperty value) { - if (subjectPropertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectPropertiesIsMutable(); - subjectProperties_.add(index, value); - onChanged(); - } else { - subjectPropertiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder addSubjectProperties( - io.opentdf.platform.policy.SubjectProperty.Builder builderForValue) { - if (subjectPropertiesBuilder_ == null) { - ensureSubjectPropertiesIsMutable(); - subjectProperties_.add(builderForValue.build()); - onChanged(); - } else { - subjectPropertiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder addSubjectProperties( - int index, io.opentdf.platform.policy.SubjectProperty.Builder builderForValue) { - if (subjectPropertiesBuilder_ == null) { - ensureSubjectPropertiesIsMutable(); - subjectProperties_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectPropertiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder addAllSubjectProperties( - java.lang.Iterable values) { - if (subjectPropertiesBuilder_ == null) { - ensureSubjectPropertiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectProperties_); - onChanged(); - } else { - subjectPropertiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder clearSubjectProperties() { - if (subjectPropertiesBuilder_ == null) { - subjectProperties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subjectPropertiesBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public Builder removeSubjectProperties(int index) { - if (subjectPropertiesBuilder_ == null) { - ensureSubjectPropertiesIsMutable(); - subjectProperties_.remove(index); - onChanged(); - } else { - subjectPropertiesBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public io.opentdf.platform.policy.SubjectProperty.Builder getSubjectPropertiesBuilder( - int index) { - return getSubjectPropertiesFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public io.opentdf.platform.policy.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( - int index) { - if (subjectPropertiesBuilder_ == null) { - return subjectProperties_.get(index); } else { - return subjectPropertiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public java.util.List - getSubjectPropertiesOrBuilderList() { - if (subjectPropertiesBuilder_ != null) { - return subjectPropertiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectProperties_); - } - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public io.opentdf.platform.policy.SubjectProperty.Builder addSubjectPropertiesBuilder() { - return getSubjectPropertiesFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectProperty.getDefaultInstance()); - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public io.opentdf.platform.policy.SubjectProperty.Builder addSubjectPropertiesBuilder( - int index) { - return getSubjectPropertiesFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectProperty.getDefaultInstance()); - } - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - public java.util.List - getSubjectPropertiesBuilderList() { - return getSubjectPropertiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectProperty, io.opentdf.platform.policy.SubjectProperty.Builder, io.opentdf.platform.policy.SubjectPropertyOrBuilder> - getSubjectPropertiesFieldBuilder() { - if (subjectPropertiesBuilder_ == null) { - subjectPropertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectProperty, io.opentdf.platform.policy.SubjectProperty.Builder, io.opentdf.platform.policy.SubjectPropertyOrBuilder>( - subjectProperties_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subjectProperties_ = null; - } - return subjectPropertiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.MatchSubjectMappingsRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.MatchSubjectMappingsRequest) - private static final io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MatchSubjectMappingsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java deleted file mode 100644 index cd06bdd5..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface MatchSubjectMappingsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.MatchSubjectMappingsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - java.util.List - getSubjectPropertiesList(); - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - io.opentdf.platform.policy.SubjectProperty getSubjectProperties(int index); - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - int getSubjectPropertiesCount(); - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - java.util.List - getSubjectPropertiesOrBuilderList(); - /** - * repeated .policy.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; - */ - io.opentdf.platform.policy.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponse.java deleted file mode 100644 index 7d48cd8b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsResponse} - */ -public final class MatchSubjectMappingsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.MatchSubjectMappingsResponse) - MatchSubjectMappingsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use MatchSubjectMappingsResponse.newBuilder() to construct. - private MatchSubjectMappingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MatchSubjectMappingsResponse() { - subjectMappings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MatchSubjectMappingsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.Builder.class); - } - - public static final int SUBJECT_MAPPINGS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List subjectMappings_; - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public java.util.List getSubjectMappingsList() { - return subjectMappings_; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public java.util.List - getSubjectMappingsOrBuilderList() { - return subjectMappings_; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public int getSubjectMappingsCount() { - return subjectMappings_.size(); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { - return subjectMappings_.get(index); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index) { - return subjectMappings_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subjectMappings_.size(); i++) { - output.writeMessage(1, subjectMappings_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subjectMappings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subjectMappings_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse other = (io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse) obj; - - if (!getSubjectMappingsList() - .equals(other.getSubjectMappingsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubjectMappingsCount() > 0) { - hash = (37 * hash) + SUBJECT_MAPPINGS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMappingsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.MatchSubjectMappingsResponse) - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (subjectMappingsBuilder_ == null) { - subjectMappings_ = java.util.Collections.emptyList(); - } else { - subjectMappings_ = null; - subjectMappingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse build() { - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse result = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse result) { - if (subjectMappingsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subjectMappings_ = java.util.Collections.unmodifiableList(subjectMappings_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subjectMappings_ = subjectMappings_; - } else { - result.subjectMappings_ = subjectMappingsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.getDefaultInstance()) return this; - if (subjectMappingsBuilder_ == null) { - if (!other.subjectMappings_.isEmpty()) { - if (subjectMappings_.isEmpty()) { - subjectMappings_ = other.subjectMappings_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubjectMappingsIsMutable(); - subjectMappings_.addAll(other.subjectMappings_); - } - onChanged(); - } - } else { - if (!other.subjectMappings_.isEmpty()) { - if (subjectMappingsBuilder_.isEmpty()) { - subjectMappingsBuilder_.dispose(); - subjectMappingsBuilder_ = null; - subjectMappings_ = other.subjectMappings_; - bitField0_ = (bitField0_ & ~0x00000001); - subjectMappingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectMappingsFieldBuilder() : null; - } else { - subjectMappingsBuilder_.addAllMessages(other.subjectMappings_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.SubjectMapping m = - input.readMessage( - io.opentdf.platform.policy.SubjectMapping.parser(), - extensionRegistry); - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(m); - } else { - subjectMappingsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List subjectMappings_ = - java.util.Collections.emptyList(); - private void ensureSubjectMappingsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subjectMappings_ = new java.util.ArrayList(subjectMappings_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingsBuilder_; - - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public java.util.List getSubjectMappingsList() { - if (subjectMappingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectMappings_); - } else { - return subjectMappingsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public int getSubjectMappingsCount() { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.size(); - } else { - return subjectMappingsBuilder_.getCount(); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index) { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.get(index); - } else { - return subjectMappingsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder setSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.set(index, value); - onChanged(); - } else { - subjectMappingsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder setSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(value); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(index, value); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addSubjectMappings( - int index, io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectMappingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder addAllSubjectMappings( - java.lang.Iterable values) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectMappings_); - onChanged(); - } else { - subjectMappingsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder clearSubjectMappings() { - if (subjectMappingsBuilder_ == null) { - subjectMappings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subjectMappingsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public Builder removeSubjectMappings(int index) { - if (subjectMappingsBuilder_ == null) { - ensureSubjectMappingsIsMutable(); - subjectMappings_.remove(index); - onChanged(); - } else { - subjectMappingsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingsBuilder( - int index) { - return getSubjectMappingsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index) { - if (subjectMappingsBuilder_ == null) { - return subjectMappings_.get(index); } else { - return subjectMappingsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public java.util.List - getSubjectMappingsOrBuilderList() { - if (subjectMappingsBuilder_ != null) { - return subjectMappingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectMappings_); - } - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder() { - return getSubjectMappingsFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder addSubjectMappingsBuilder( - int index) { - return getSubjectMappingsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()); - } - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - public java.util.List - getSubjectMappingsBuilderList() { - return getSubjectMappingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> - getSubjectMappingsFieldBuilder() { - if (subjectMappingsBuilder_ == null) { - subjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( - subjectMappings_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subjectMappings_ = null; - } - return subjectMappingsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.MatchSubjectMappingsResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.MatchSubjectMappingsResponse) - private static final io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MatchSubjectMappingsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponseOrBuilder.java deleted file mode 100644 index 971ad22a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface MatchSubjectMappingsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.MatchSubjectMappingsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - java.util.List - getSubjectMappingsList(); - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - io.opentdf.platform.policy.SubjectMapping getSubjectMappings(int index); - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - int getSubjectMappingsCount(); - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - java.util.List - getSubjectMappingsOrBuilderList(); - /** - * repeated .policy.SubjectMapping subject_mappings = 1 [json_name = "subjectMappings"]; - */ - io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingsOrBuilder( - int index); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java deleted file mode 100644 index 0b3b837c..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java +++ /dev/null @@ -1,1106 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.SubjectConditionSetCreate} - */ -public final class SubjectConditionSetCreate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectConditionSetCreate) - SubjectConditionSetCreateOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectConditionSetCreate.newBuilder() to construct. - private SubjectConditionSetCreate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectConditionSetCreate() { - subjectSets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectConditionSetCreate(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_SETS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List subjectSets_; - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getSubjectSetsList() { - return subjectSets_; - } - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getSubjectSetsOrBuilderList() { - return subjectSets_; - } - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getSubjectSetsCount() { - return subjectSets_.size(); - } - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { - return subjectSets_.get(index); - } - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index) { - return subjectSets_.get(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Optional
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Optional
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Optional
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subjectSets_.size(); i++) { - output.writeMessage(1, subjectSets_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subjectSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subjectSets_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate other = (io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate) obj; - - if (!getSubjectSetsList() - .equals(other.getSubjectSetsList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubjectSetsCount() > 0) { - hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSetsList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.SubjectConditionSetCreate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectConditionSetCreate) - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetsFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); - } else { - subjectSets_ = null; - subjectSetsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate build() { - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate buildPartial() { - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { - if (subjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subjectSets_ = subjectSets_; - } else { - result.subjectSets_ = subjectSetsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate other) { - if (other == io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) return this; - if (subjectSetsBuilder_ == null) { - if (!other.subjectSets_.isEmpty()) { - if (subjectSets_.isEmpty()) { - subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubjectSetsIsMutable(); - subjectSets_.addAll(other.subjectSets_); - } - onChanged(); - } - } else { - if (!other.subjectSets_.isEmpty()) { - if (subjectSetsBuilder_.isEmpty()) { - subjectSetsBuilder_.dispose(); - subjectSetsBuilder_ = null; - subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000001); - subjectSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectSetsFieldBuilder() : null; - } else { - subjectSetsBuilder_.addAllMessages(other.subjectSets_); - } - } - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.SubjectSet m = - input.readMessage( - io.opentdf.platform.policy.SubjectSet.parser(), - extensionRegistry); - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(m); - } else { - subjectSetsBuilder_.addMessage(m); - } - break; - } // case 10 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 802 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List subjectSets_ = - java.util.Collections.emptyList(); - private void ensureSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subjectSets_ = new java.util.ArrayList(subjectSets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> subjectSetsBuilder_; - - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List getSubjectSetsList() { - if (subjectSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectSets_); - } else { - return subjectSetsBuilder_.getMessageList(); - } - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public int getSubjectSetsCount() { - if (subjectSetsBuilder_ == null) { - return subjectSets_.size(); - } else { - return subjectSetsBuilder_.getCount(); - } - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); - } else { - return subjectSetsBuilder_.getMessage(index); - } - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, value); - onChanged(); - } else { - subjectSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addSubjectSets(io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.add(value); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, value); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addSubjectSets( - io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder addAllSubjectSets( - java.lang.Iterable values) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectSets_); - onChanged(); - } else { - subjectSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder clearSubjectSets() { - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subjectSetsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public Builder removeSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.remove(index); - onChanged(); - } else { - subjectSetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSet.Builder getSubjectSetsBuilder( - int index) { - return getSubjectSetsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); } else { - return subjectSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List - getSubjectSetsOrBuilderList() { - if (subjectSetsBuilder_ != null) { - return subjectSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectSets_); - } - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder() { - return getSubjectSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder( - int index) { - return getSubjectSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); - } - /** - *
-     * Required
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List - getSubjectSetsBuilderList() { - return getSubjectSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> - getSubjectSetsFieldBuilder() { - if (subjectSetsBuilder_ == null) { - subjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder>( - subjectSets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subjectSets_ = null; - } - return subjectSetsBuilder_; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Optional
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.SubjectConditionSetCreate) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectConditionSetCreate) - private static final io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate(); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectConditionSetCreate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java deleted file mode 100644 index ef75044b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface SubjectConditionSetCreateOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectConditionSetCreate) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - java.util.List - getSubjectSetsList(); - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.SubjectSet getSubjectSets(int index); - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - int getSubjectSetsCount(); - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - java.util.List - getSubjectSetsOrBuilderList(); - /** - *
-   * Required
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index); - - /** - *
-   * Optional
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Optional
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Optional
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java deleted file mode 100644 index 4b9a7389..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public final class SubjectMappingProto { - private SubjectMappingProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n+policy/subjectmapping/subject_mapping." + - "proto\022\025policy.subjectmapping\032\033buf/valida" + - "te/validate.proto\032\034google/api/annotation" + - "s.proto\032\023common/common.proto\032\024policy/obj" + - "ects.proto\"e\n\033MatchSubjectMappingsReques" + - "t\022F\n\022subject_properties\030\001 \003(\0132\027.policy.S" + - "ubjectPropertyR\021subjectProperties\"a\n\034Mat" + - "chSubjectMappingsResponse\022A\n\020subject_map" + - "pings\030\001 \003(\0132\026.policy.SubjectMappingR\017sub" + - "jectMappings\"2\n\030GetSubjectMappingRequest" + - "\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\\\n\031GetSubjectMa" + - "ppingResponse\022?\n\017subject_mapping\030\001 \001(\0132\026" + - ".policy.SubjectMappingR\016subjectMapping\"\034" + - "\n\032ListSubjectMappingsRequest\"`\n\033ListSubj" + - "ectMappingsResponse\022A\n\020subject_mappings\030" + - "\001 \003(\0132\026.policy.SubjectMappingR\017subjectMa" + - "ppings\"\363\002\n\033CreateSubjectMappingRequest\0224" + - "\n\022attribute_value_id\030\001 \001(\tB\006\272H\003\310\001\001R\020attr" + - "ibuteValueId\0222\n\007actions\030\002 \003(\0132\016.policy.A" + - "ctionB\010\272H\005\222\001\002\010\001R\007actions\022H\n!existing_sub" + - "ject_condition_set_id\030\003 \001(\tR\035existingSub" + - "jectConditionSetId\022k\n\031new_subject_condit" + - "ion_set\030\004 \001(\01320.policy.subjectmapping.Su" + - "bjectConditionSetCreateR\026newSubjectCondi" + - "tionSet\0223\n\010metadata\030d \001(\0132\027.common.Metad" + - "ataMutableR\010metadata\"_\n\034CreateSubjectMap" + - "pingResponse\022?\n\017subject_mapping\030\001 \001(\0132\026." + - "policy.SubjectMappingR\016subjectMapping\"\243\002" + - "\n\033UpdateSubjectMappingRequest\022\026\n\002id\030\001 \001(" + - "\tB\006\272H\003\310\001\001R\002id\0227\n\030subject_condition_set_i" + - "d\030\002 \001(\tR\025subjectConditionSetId\022(\n\007action" + - "s\030\003 \003(\0132\016.policy.ActionR\007actions\0223\n\010meta" + - "data\030d \001(\0132\027.common.MetadataMutableR\010met" + - "adata\022T\n\030metadata_update_behavior\030e \001(\0162" + - "\032.common.MetadataUpdateEnumR\026metadataUpd" + - "ateBehavior\"_\n\034UpdateSubjectMappingRespo" + - "nse\022?\n\017subject_mapping\030\001 \001(\0132\026.policy.Su" + - "bjectMappingR\016subjectMapping\"5\n\033DeleteSu" + - "bjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R" + - "\002id\"_\n\034DeleteSubjectMappingResponse\022?\n\017s" + - "ubject_mapping\030\001 \001(\0132\026.policy.SubjectMap" + - "pingR\016subjectMapping\"7\n\035GetSubjectCondit" + - "ionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\311\001" + - "\n\036GetSubjectConditionSetResponse\022O\n\025subj" + - "ect_condition_set\030\001 \001(\0132\033.policy.Subject" + - "ConditionSetR\023subjectConditionSet\022V\n\033ass" + - "ociated_subject_mappings\030\002 \003(\0132\026.policy." + - "SubjectMappingR\031associatedSubjectMapping" + - "s\"!\n\037ListSubjectConditionSetsRequest\"u\n " + - "ListSubjectConditionSetsResponse\022Q\n\026subj" + - "ect_condition_sets\030\001 \003(\0132\033.policy.Subjec" + - "tConditionSetR\024subjectConditionSets\"\221\001\n\031" + - "SubjectConditionSetCreate\022?\n\014subject_set" + - "s\030\001 \003(\0132\022.policy.SubjectSetB\010\272H\005\222\001\002\010\001R\013s" + - "ubjectSets\0223\n\010metadata\030d \001(\0132\027.common.Me" + - "tadataMutableR\010metadata\"\210\001\n CreateSubjec" + - "tConditionSetRequest\022d\n\025subject_conditio" + - "n_set\030\001 \001(\01320.policy.subjectmapping.Subj" + - "ectConditionSetCreateR\023subjectConditionS" + - "et\"t\n!CreateSubjectConditionSetResponse\022" + - "O\n\025subject_condition_set\030\001 \001(\0132\033.policy." + - "SubjectConditionSetR\023subjectConditionSet" + - "\"\374\001\n UpdateSubjectConditionSetRequest\022\026\n" + - "\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\0225\n\014subject_sets\030\002 " + - "\003(\0132\022.policy.SubjectSetR\013subjectSets\0223\n\010" + - "metadata\030d \001(\0132\027.common.MetadataMutableR" + - "\010metadata\022T\n\030metadata_update_behavior\030e " + - "\001(\0162\032.common.MetadataUpdateEnumR\026metadat" + - "aUpdateBehavior\"t\n!UpdateSubjectConditio" + - "nSetResponse\022O\n\025subject_condition_set\030\001 " + - "\001(\0132\033.policy.SubjectConditionSetR\023subjec" + - "tConditionSet\":\n DeleteSubjectConditionS" + - "etRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"t\n!Del" + - "eteSubjectConditionSetResponse\022O\n\025subjec" + - "t_condition_set\030\001 \001(\0132\033.policy.SubjectCo" + - "nditionSetR\023subjectConditionSet2\353\016\n\025Subj" + - "ectMappingService\022\264\001\n\024MatchSubjectMappin" + - "gs\0222.policy.subjectmapping.MatchSubjectM" + - "appingsRequest\0323.policy.subjectmapping.M" + - "atchSubjectMappingsResponse\"3\202\323\344\223\002-\"\027/su" + - "bject-mappings/match:\022subject_properties" + - "\022\227\001\n\023ListSubjectMappings\0221.policy.subjec" + - "tmapping.ListSubjectMappingsRequest\0322.po" + - "licy.subjectmapping.ListSubjectMappingsR" + - "esponse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021G" + - "etSubjectMapping\022/.policy.subjectmapping" + - ".GetSubjectMappingRequest\0320.policy.subje" + - "ctmapping.GetSubjectMappingResponse\"\036\202\323\344" + - "\223\002\030\022\026/subject-mappings/{id}\022\235\001\n\024CreateSu" + - "bjectMapping\0222.policy.subjectmapping.Cre" + - "ateSubjectMappingRequest\0323.policy.subjec" + - "tmapping.CreateSubjectMappingResponse\"\034\202" + - "\323\344\223\002\026\"\021/subject-mappings:\001*\022\242\001\n\024UpdateSu" + - "bjectMapping\0222.policy.subjectmapping.Upd" + - "ateSubjectMappingRequest\0323.policy.subjec" + - "tmapping.UpdateSubjectMappingResponse\"!\202" + - "\323\344\223\002\0332\026/subject-mappings/{id}:\001*\022\237\001\n\024Del" + - "eteSubjectMapping\0222.policy.subjectmappin" + - "g.DeleteSubjectMappingRequest\0323.policy.s" + - "ubjectmapping.DeleteSubjectMappingRespon" + - "se\"\036\202\323\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n\030L" + - "istSubjectConditionSets\0226.policy.subject" + - "mapping.ListSubjectConditionSetsRequest\032" + - "7.policy.subjectmapping.ListSubjectCondi" + - "tionSetsResponse\"\037\202\323\344\223\002\031\022\027/subject-condi" + - "tion-sets\022\253\001\n\026GetSubjectConditionSet\0224.p" + - "olicy.subjectmapping.GetSubjectCondition" + - "SetRequest\0325.policy.subjectmapping.GetSu" + - "bjectConditionSetResponse\"$\202\323\344\223\002\036\022\034/subj" + - "ect-condition-sets/{id}\022\262\001\n\031CreateSubjec" + - "tConditionSet\0227.policy.subjectmapping.Cr" + - "eateSubjectConditionSetRequest\0328.policy." + - "subjectmapping.CreateSubjectConditionSet" + - "Response\"\"\202\323\344\223\002\034\"\027/subject-condition-set" + - "s:\001*\022\267\001\n\031UpdateSubjectConditionSet\0227.pol" + - "icy.subjectmapping.UpdateSubjectConditio" + - "nSetRequest\0328.policy.subjectmapping.Upda" + - "teSubjectConditionSetResponse\"\'\202\323\344\223\002!2\034/" + - "subject-condition-sets/{id}:\001*\022\264\001\n\031Delet" + - "eSubjectConditionSet\0227.policy.subjectmap" + - "ping.DeleteSubjectConditionSetRequest\0328." + - "policy.subjectmapping.DeleteSubjectCondi" + - "tionSetResponse\"$\202\323\344\223\002\036*\034/subject-condit" + - "ion-sets/{id}B\265\001\n)io.opentdf.platform.po" + - "licy.subjectmappingB\023SubjectMappingProto" + - "P\001\242\002\003PSX\252\002\025Policy.Subjectmapping\312\002\025Polic" + - "y\\Subjectmapping\342\002!Policy\\Subjectmapping" + - "\\GPBMetadata\352\002\026Policy::Subjectmappingb\006p" + - "roto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - io.opentdf.platform.common.CommonProto.getDescriptor(), - io.opentdf.platform.policy.ObjectsProto.getDescriptor(), - }); - internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor, - new java.lang.String[] { "SubjectProperties", }); - internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor, - new java.lang.String[] { "SubjectMappings", }); - internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor, - new java.lang.String[] { "SubjectMapping", }); - internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor, - new java.lang.String[] { }); - internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor, - new java.lang.String[] { "SubjectMappings", }); - internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor, - new java.lang.String[] { "AttributeValueId", "Actions", "ExistingSubjectConditionSetId", "NewSubjectConditionSet", "Metadata", }); - internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor, - new java.lang.String[] { "SubjectMapping", }); - internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor, - new java.lang.String[] { "Id", "SubjectConditionSetId", "Actions", "Metadata", "MetadataUpdateBehavior", }); - internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor, - new java.lang.String[] { "SubjectMapping", }); - internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor, - new java.lang.String[] { "SubjectMapping", }); - internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "SubjectConditionSet", "AssociatedSubjectMappings", }); - internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor, - new java.lang.String[] { }); - internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor, - new java.lang.String[] { "SubjectConditionSets", }); - internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor, - new java.lang.String[] { "SubjectSets", "Metadata", }); - internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor, - new java.lang.String[] { "SubjectConditionSet", }); - internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "SubjectConditionSet", }); - internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor, - new java.lang.String[] { "Id", "SubjectSets", "Metadata", "MetadataUpdateBehavior", }); - internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "SubjectConditionSet", }); - internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "SubjectConditionSet", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - io.opentdf.platform.common.CommonProto.getDescriptor(); - io.opentdf.platform.policy.ObjectsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java deleted file mode 100644 index 7ee3b155..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java +++ /dev/null @@ -1,1045 +0,0 @@ -package io.opentdf.platform.policy.subjectmapping; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.61.1)", - comments = "Source: policy/subjectmapping/subject_mapping.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class SubjectMappingServiceGrpc { - - private SubjectMappingServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "policy.subjectmapping.SubjectMappingService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getMatchSubjectMappingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "MatchSubjectMappings", - requestType = io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getMatchSubjectMappingsMethod() { - io.grpc.MethodDescriptor getMatchSubjectMappingsMethod; - if ((getMatchSubjectMappingsMethod = SubjectMappingServiceGrpc.getMatchSubjectMappingsMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getMatchSubjectMappingsMethod = SubjectMappingServiceGrpc.getMatchSubjectMappingsMethod) == null) { - SubjectMappingServiceGrpc.getMatchSubjectMappingsMethod = getMatchSubjectMappingsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MatchSubjectMappings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("MatchSubjectMappings")) - .build(); - } - } - } - return getMatchSubjectMappingsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSubjectMappingsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSubjectMappings", - requestType = io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSubjectMappingsMethod() { - io.grpc.MethodDescriptor getListSubjectMappingsMethod; - if ((getListSubjectMappingsMethod = SubjectMappingServiceGrpc.getListSubjectMappingsMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getListSubjectMappingsMethod = SubjectMappingServiceGrpc.getListSubjectMappingsMethod) == null) { - SubjectMappingServiceGrpc.getListSubjectMappingsMethod = getListSubjectMappingsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSubjectMappings")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("ListSubjectMappings")) - .build(); - } - } - } - return getListSubjectMappingsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSubjectMappingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSubjectMapping", - requestType = io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSubjectMappingMethod() { - io.grpc.MethodDescriptor getGetSubjectMappingMethod; - if ((getGetSubjectMappingMethod = SubjectMappingServiceGrpc.getGetSubjectMappingMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getGetSubjectMappingMethod = SubjectMappingServiceGrpc.getGetSubjectMappingMethod) == null) { - SubjectMappingServiceGrpc.getGetSubjectMappingMethod = getGetSubjectMappingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubjectMapping")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("GetSubjectMapping")) - .build(); - } - } - } - return getGetSubjectMappingMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateSubjectMappingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateSubjectMapping", - requestType = io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateSubjectMappingMethod() { - io.grpc.MethodDescriptor getCreateSubjectMappingMethod; - if ((getCreateSubjectMappingMethod = SubjectMappingServiceGrpc.getCreateSubjectMappingMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getCreateSubjectMappingMethod = SubjectMappingServiceGrpc.getCreateSubjectMappingMethod) == null) { - SubjectMappingServiceGrpc.getCreateSubjectMappingMethod = getCreateSubjectMappingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSubjectMapping")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("CreateSubjectMapping")) - .build(); - } - } - } - return getCreateSubjectMappingMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateSubjectMappingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateSubjectMapping", - requestType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateSubjectMappingMethod() { - io.grpc.MethodDescriptor getUpdateSubjectMappingMethod; - if ((getUpdateSubjectMappingMethod = SubjectMappingServiceGrpc.getUpdateSubjectMappingMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getUpdateSubjectMappingMethod = SubjectMappingServiceGrpc.getUpdateSubjectMappingMethod) == null) { - SubjectMappingServiceGrpc.getUpdateSubjectMappingMethod = getUpdateSubjectMappingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSubjectMapping")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("UpdateSubjectMapping")) - .build(); - } - } - } - return getUpdateSubjectMappingMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteSubjectMappingMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteSubjectMapping", - requestType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteSubjectMappingMethod() { - io.grpc.MethodDescriptor getDeleteSubjectMappingMethod; - if ((getDeleteSubjectMappingMethod = SubjectMappingServiceGrpc.getDeleteSubjectMappingMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getDeleteSubjectMappingMethod = SubjectMappingServiceGrpc.getDeleteSubjectMappingMethod) == null) { - SubjectMappingServiceGrpc.getDeleteSubjectMappingMethod = getDeleteSubjectMappingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubjectMapping")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("DeleteSubjectMapping")) - .build(); - } - } - } - return getDeleteSubjectMappingMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSubjectConditionSetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSubjectConditionSets", - requestType = io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSubjectConditionSetsMethod() { - io.grpc.MethodDescriptor getListSubjectConditionSetsMethod; - if ((getListSubjectConditionSetsMethod = SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getListSubjectConditionSetsMethod = SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod) == null) { - SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod = getListSubjectConditionSetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSubjectConditionSets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("ListSubjectConditionSets")) - .build(); - } - } - } - return getListSubjectConditionSetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSubjectConditionSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSubjectConditionSet", - requestType = io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSubjectConditionSetMethod() { - io.grpc.MethodDescriptor getGetSubjectConditionSetMethod; - if ((getGetSubjectConditionSetMethod = SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getGetSubjectConditionSetMethod = SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod) == null) { - SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod = getGetSubjectConditionSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubjectConditionSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("GetSubjectConditionSet")) - .build(); - } - } - } - return getGetSubjectConditionSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateSubjectConditionSet", - requestType = io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod() { - io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod; - if ((getCreateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getCreateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod) == null) { - SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod = getCreateSubjectConditionSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSubjectConditionSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("CreateSubjectConditionSet")) - .build(); - } - } - } - return getCreateSubjectConditionSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateSubjectConditionSet", - requestType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod() { - io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod; - if ((getUpdateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getUpdateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod) == null) { - SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod = getUpdateSubjectConditionSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSubjectConditionSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("UpdateSubjectConditionSet")) - .build(); - } - } - } - return getUpdateSubjectConditionSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteSubjectConditionSet", - requestType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod() { - io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod; - if ((getDeleteSubjectConditionSetMethod = SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getDeleteSubjectConditionSetMethod = SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod) == null) { - SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod = getDeleteSubjectConditionSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubjectConditionSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("DeleteSubjectConditionSet")) - .build(); - } - } - } - return getDeleteSubjectConditionSetMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static SubjectMappingServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SubjectMappingServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SubjectMappingServiceStub(channel, callOptions); - } - }; - return SubjectMappingServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static SubjectMappingServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SubjectMappingServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SubjectMappingServiceBlockingStub(channel, callOptions); - } - }; - return SubjectMappingServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static SubjectMappingServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SubjectMappingServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SubjectMappingServiceFutureStub(channel, callOptions); - } - }; - return SubjectMappingServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public interface AsyncService { - - /** - *
-     * Find matching Subject Mappings for a given Subject
-     * 
- */ - default void matchSubjectMappings(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMatchSubjectMappingsMethod(), responseObserver); - } - - /** - */ - default void listSubjectMappings(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSubjectMappingsMethod(), responseObserver); - } - - /** - */ - default void getSubjectMapping(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubjectMappingMethod(), responseObserver); - } - - /** - */ - default void createSubjectMapping(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSubjectMappingMethod(), responseObserver); - } - - /** - */ - default void updateSubjectMapping(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSubjectMappingMethod(), responseObserver); - } - - /** - */ - default void deleteSubjectMapping(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubjectMappingMethod(), responseObserver); - } - - /** - */ - default void listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSubjectConditionSetsMethod(), responseObserver); - } - - /** - */ - default void getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubjectConditionSetMethod(), responseObserver); - } - - /** - */ - default void createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSubjectConditionSetMethod(), responseObserver); - } - - /** - */ - default void updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSubjectConditionSetMethod(), responseObserver); - } - - /** - */ - default void deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubjectConditionSetMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service SubjectMappingService. - */ - public static abstract class SubjectMappingServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return SubjectMappingServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service SubjectMappingService. - */ - public static final class SubjectMappingServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private SubjectMappingServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SubjectMappingServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SubjectMappingServiceStub(channel, callOptions); - } - - /** - *
-     * Find matching Subject Mappings for a given Subject
-     * 
- */ - public void matchSubjectMappings(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getMatchSubjectMappingsMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void listSubjectMappings(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSubjectMappingsMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void getSubjectMapping(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSubjectMappingMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void createSubjectMapping(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateSubjectMappingMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void updateSubjectMapping(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateSubjectMappingMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void deleteSubjectMapping(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteSubjectMappingMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSubjectConditionSetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service SubjectMappingService. - */ - public static final class SubjectMappingServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private SubjectMappingServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SubjectMappingServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SubjectMappingServiceBlockingStub(channel, callOptions); - } - - /** - *
-     * Find matching Subject Mappings for a given Subject
-     * 
- */ - public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse matchSubjectMappings(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMatchSubjectMappingsMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse listSubjectMappings(io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSubjectMappingsMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse getSubjectMapping(io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSubjectMappingMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse createSubjectMapping(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateSubjectMappingMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse updateSubjectMapping(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateSubjectMappingMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse deleteSubjectMapping(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteSubjectMappingMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSubjectConditionSetsMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSubjectConditionSetMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateSubjectConditionSetMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateSubjectConditionSetMethod(), getCallOptions(), request); - } - - /** - */ - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteSubjectConditionSetMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service SubjectMappingService. - */ - public static final class SubjectMappingServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private SubjectMappingServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SubjectMappingServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SubjectMappingServiceFutureStub(channel, callOptions); - } - - /** - *
-     * Find matching Subject Mappings for a given Subject
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture matchSubjectMappings( - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMatchSubjectMappingsMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture listSubjectMappings( - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSubjectMappingsMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getSubjectMapping( - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSubjectMappingMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture createSubjectMapping( - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateSubjectMappingMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture updateSubjectMapping( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateSubjectMappingMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteSubjectMapping( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteSubjectMappingMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture listSubjectConditionSets( - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSubjectConditionSetsMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSubjectConditionSetMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture createSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateSubjectConditionSetMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture updateSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateSubjectConditionSetMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteSubjectConditionSetMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_MATCH_SUBJECT_MAPPINGS = 0; - private static final int METHODID_LIST_SUBJECT_MAPPINGS = 1; - private static final int METHODID_GET_SUBJECT_MAPPING = 2; - private static final int METHODID_CREATE_SUBJECT_MAPPING = 3; - private static final int METHODID_UPDATE_SUBJECT_MAPPING = 4; - private static final int METHODID_DELETE_SUBJECT_MAPPING = 5; - private static final int METHODID_LIST_SUBJECT_CONDITION_SETS = 6; - private static final int METHODID_GET_SUBJECT_CONDITION_SET = 7; - private static final int METHODID_CREATE_SUBJECT_CONDITION_SET = 8; - private static final int METHODID_UPDATE_SUBJECT_CONDITION_SET = 9; - private static final int METHODID_DELETE_SUBJECT_CONDITION_SET = 10; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_MATCH_SUBJECT_MAPPINGS: - serviceImpl.matchSubjectMappings((io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SUBJECT_MAPPINGS: - serviceImpl.listSubjectMappings((io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SUBJECT_MAPPING: - serviceImpl.getSubjectMapping((io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_SUBJECT_MAPPING: - serviceImpl.createSubjectMapping((io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SUBJECT_MAPPING: - serviceImpl.updateSubjectMapping((io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SUBJECT_MAPPING: - serviceImpl.deleteSubjectMapping((io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SUBJECT_CONDITION_SETS: - serviceImpl.listSubjectConditionSets((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SUBJECT_CONDITION_SET: - serviceImpl.getSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_SUBJECT_CONDITION_SET: - serviceImpl.createSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SUBJECT_CONDITION_SET: - serviceImpl.updateSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SUBJECT_CONDITION_SET: - serviceImpl.deleteSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getMatchSubjectMappingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest, - io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsResponse>( - service, METHODID_MATCH_SUBJECT_MAPPINGS))) - .addMethod( - getListSubjectMappingsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsRequest, - io.opentdf.platform.policy.subjectmapping.ListSubjectMappingsResponse>( - service, METHODID_LIST_SUBJECT_MAPPINGS))) - .addMethod( - getGetSubjectMappingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingRequest, - io.opentdf.platform.policy.subjectmapping.GetSubjectMappingResponse>( - service, METHODID_GET_SUBJECT_MAPPING))) - .addMethod( - getCreateSubjectMappingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest, - io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse>( - service, METHODID_CREATE_SUBJECT_MAPPING))) - .addMethod( - getUpdateSubjectMappingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest, - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse>( - service, METHODID_UPDATE_SUBJECT_MAPPING))) - .addMethod( - getDeleteSubjectMappingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest, - io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse>( - service, METHODID_DELETE_SUBJECT_MAPPING))) - .addMethod( - getListSubjectConditionSetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest, - io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse>( - service, METHODID_LIST_SUBJECT_CONDITION_SETS))) - .addMethod( - getGetSubjectConditionSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest, - io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse>( - service, METHODID_GET_SUBJECT_CONDITION_SET))) - .addMethod( - getCreateSubjectConditionSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest, - io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse>( - service, METHODID_CREATE_SUBJECT_CONDITION_SET))) - .addMethod( - getUpdateSubjectConditionSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest, - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse>( - service, METHODID_UPDATE_SUBJECT_CONDITION_SET))) - .addMethod( - getDeleteSubjectConditionSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest, - io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse>( - service, METHODID_DELETE_SUBJECT_CONDITION_SET))) - .build(); - } - - private static abstract class SubjectMappingServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - SubjectMappingServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("SubjectMappingService"); - } - } - - private static final class SubjectMappingServiceFileDescriptorSupplier - extends SubjectMappingServiceBaseDescriptorSupplier { - SubjectMappingServiceFileDescriptorSupplier() {} - } - - private static final class SubjectMappingServiceMethodDescriptorSupplier - extends SubjectMappingServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - SubjectMappingServiceMethodDescriptorSupplier(java.lang.String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (SubjectMappingServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new SubjectMappingServiceFileDescriptorSupplier()) - .addMethod(getMatchSubjectMappingsMethod()) - .addMethod(getListSubjectMappingsMethod()) - .addMethod(getGetSubjectMappingMethod()) - .addMethod(getCreateSubjectMappingMethod()) - .addMethod(getUpdateSubjectMappingMethod()) - .addMethod(getDeleteSubjectMappingMethod()) - .addMethod(getListSubjectConditionSetsMethod()) - .addMethod(getGetSubjectConditionSetMethod()) - .addMethod(getCreateSubjectConditionSetMethod()) - .addMethod(getUpdateSubjectConditionSetMethod()) - .addMethod(getDeleteSubjectConditionSetMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java deleted file mode 100644 index 2160334d..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java +++ /dev/null @@ -1,1375 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectConditionSetRequest} - */ -public final class UpdateSubjectConditionSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectConditionSetRequest) - UpdateSubjectConditionSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateSubjectConditionSetRequest.newBuilder() to construct. - private UpdateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateSubjectConditionSetRequest() { - id_ = ""; - subjectSets_ = java.util.Collections.emptyList(); - metadataUpdateBehavior_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateSubjectConditionSetRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBJECT_SETS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List subjectSets_; - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - @java.lang.Override - public java.util.List getSubjectSetsList() { - return subjectSets_; - } - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - @java.lang.Override - public java.util.List - getSubjectSetsOrBuilderList() { - return subjectSets_; - } - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - @java.lang.Override - public int getSubjectSetsCount() { - return subjectSets_.size(); - } - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { - return subjectSets_.get(index); - } - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index) { - return subjectSets_.get(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - for (int i = 0; i < subjectSets_.size(); i++) { - output.writeMessage(2, subjectSets_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(101, metadataUpdateBehavior_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - for (int i = 0; i < subjectSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, subjectSets_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(101, metadataUpdateBehavior_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getSubjectSetsList() - .equals(other.getSubjectSetsList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (getSubjectSetsCount() > 0) { - hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSetsList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; - hash = (53 * hash) + metadataUpdateBehavior_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectConditionSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectConditionSetRequest) - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetsFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); - } else { - subjectSets_ = null; - subjectSetsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - metadataUpdateBehavior_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest build() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { - if (subjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.subjectSets_ = subjectSets_; - } else { - result.subjectSets_ = subjectSetsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.metadataUpdateBehavior_ = metadataUpdateBehavior_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (subjectSetsBuilder_ == null) { - if (!other.subjectSets_.isEmpty()) { - if (subjectSets_.isEmpty()) { - subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSubjectSetsIsMutable(); - subjectSets_.addAll(other.subjectSets_); - } - onChanged(); - } - } else { - if (!other.subjectSets_.isEmpty()) { - if (subjectSetsBuilder_.isEmpty()) { - subjectSetsBuilder_.dispose(); - subjectSetsBuilder_ = null; - subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000002); - subjectSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectSetsFieldBuilder() : null; - } else { - subjectSetsBuilder_.addAllMessages(other.subjectSets_); - } - } - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.metadataUpdateBehavior_ != 0) { - setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.opentdf.platform.policy.SubjectSet m = - input.readMessage( - io.opentdf.platform.policy.SubjectSet.parser(), - extensionRegistry); - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(m); - } else { - subjectSetsBuilder_.addMessage(m); - } - break; - } // case 18 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 802 - case 808: { - metadataUpdateBehavior_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 808 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List subjectSets_ = - java.util.Collections.emptyList(); - private void ensureSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - subjectSets_ = new java.util.ArrayList(subjectSets_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> subjectSetsBuilder_; - - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public java.util.List getSubjectSetsList() { - if (subjectSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectSets_); - } else { - return subjectSetsBuilder_.getMessageList(); - } - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public int getSubjectSetsCount() { - if (subjectSetsBuilder_ == null) { - return subjectSets_.size(); - } else { - return subjectSetsBuilder_.getCount(); - } - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.SubjectSet getSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); - } else { - return subjectSetsBuilder_.getMessage(index); - } - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, value); - onChanged(); - } else { - subjectSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder addSubjectSets(io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.add(value); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, value); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder addSubjectSets( - io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder addAllSubjectSets( - java.lang.Iterable values) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectSets_); - onChanged(); - } else { - subjectSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder clearSubjectSets() { - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - subjectSetsBuilder_.clear(); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public Builder removeSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.remove(index); - onChanged(); - } else { - subjectSetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.SubjectSet.Builder getSubjectSetsBuilder( - int index) { - return getSubjectSetsFieldBuilder().getBuilder(index); - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); } else { - return subjectSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public java.util.List - getSubjectSetsOrBuilderList() { - if (subjectSetsBuilder_ != null) { - return subjectSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectSets_); - } - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder() { - return getSubjectSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.SubjectSet.Builder addSubjectSetsBuilder( - int index) { - return getSubjectSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.SubjectSet.getDefaultInstance()); - } - /** - *
-     * Optional
-     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-     * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - public java.util.List - getSubjectSetsBuilderList() { - return getSubjectSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder> - getSubjectSetsFieldBuilder() { - if (subjectSetsBuilder_ == null) { - subjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.SubjectSet, io.opentdf.platform.policy.SubjectSet.Builder, io.opentdf.platform.policy.SubjectSetOrBuilder>( - subjectSets_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - subjectSets_ = null; - } - return subjectSetsBuilder_; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehaviorValue(int value) { - metadataUpdateBehavior_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - metadataUpdateBehavior_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return This builder for chaining. - */ - public Builder clearMetadataUpdateBehavior() { - bitField0_ = (bitField0_ & ~0x00000008); - metadataUpdateBehavior_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectConditionSetRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectConditionSetRequest) - private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateSubjectConditionSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java deleted file mode 100644 index f75f6798..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface UpdateSubjectConditionSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectConditionSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - java.util.List - getSubjectSetsList(); - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - io.opentdf.platform.policy.SubjectSet getSubjectSets(int index); - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - int getSubjectSetsCount(); - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - java.util.List - getSubjectSetsOrBuilderList(); - /** - *
-   * Optional
-   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
-   * 
- * - * repeated .policy.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; - */ - io.opentdf.platform.policy.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index); - - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - int getMetadataUpdateBehaviorValue(); - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java deleted file mode 100644 index 632dbafd..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java +++ /dev/null @@ -1,647 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectConditionSetResponse} - */ -public final class UpdateSubjectConditionSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectConditionSetResponse) - UpdateSubjectConditionSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateSubjectConditionSetResponse.newBuilder() to construct. - private UpdateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateSubjectConditionSetResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateSubjectConditionSetResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - /** - *
-   * Only ID of updated Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Only ID of updated Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - /** - *
-   * Only ID of updated Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectConditionSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectConditionSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse) obj; - - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectConditionSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectConditionSetResponse) - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse build() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.SubjectConditionSet subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } else { - return subjectConditionSetBuilder_.getMessage(); - } - } - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; - } else { - subjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - } - /** - *
-     * Only ID of updated Subject Condition Set provided
-     * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectConditionSet, io.opentdf.platform.policy.SubjectConditionSet.Builder, io.opentdf.platform.policy.SubjectConditionSetOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectConditionSetResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectConditionSetResponse) - private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateSubjectConditionSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java deleted file mode 100644 index 3898eeb4..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface UpdateSubjectConditionSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectConditionSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Only ID of updated Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. - */ - boolean hasSubjectConditionSet(); - /** - *
-   * Only ID of updated Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - io.opentdf.platform.policy.SubjectConditionSet getSubjectConditionSet(); - /** - *
-   * Only ID of updated Subject Condition Set provided
-   * 
- * - * .policy.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java deleted file mode 100644 index c74f594b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java +++ /dev/null @@ -1,1523 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingRequest} - */ -public final class UpdateSubjectMappingRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectMappingRequest) - UpdateSubjectMappingRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateSubjectMappingRequest.newBuilder() to construct. - private UpdateSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateSubjectMappingRequest() { - id_ = ""; - subjectConditionSetId_ = ""; - actions_ = java.util.Collections.emptyList(); - metadataUpdateBehavior_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateSubjectMappingRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object subjectConditionSetId_ = ""; - /** - *
-   * Optional
-   * Replaces the existing SubjectConditionSet id with a new one
-   * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @return The subjectConditionSetId. - */ - @java.lang.Override - public java.lang.String getSubjectConditionSetId() { - java.lang.Object ref = subjectConditionSetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subjectConditionSetId_ = s; - return s; - } - } - /** - *
-   * Optional
-   * Replaces the existing SubjectConditionSet id with a new one
-   * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @return The bytes for subjectConditionSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSubjectConditionSetIdBytes() { - java.lang.Object ref = subjectConditionSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subjectConditionSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTIONS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List actions_; - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.Action getActions(int index) { - return actions_.get(index); - } - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); - } - - public static final int METADATA_FIELD_NUMBER = 100; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - public static final int METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectConditionSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subjectConditionSetId_); - } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(3, actions_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(101, metadataUpdateBehavior_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectConditionSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subjectConditionSetId_); - } - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, actions_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getMetadata()); - } - if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(101, metadataUpdateBehavior_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getSubjectConditionSetId() - .equals(other.getSubjectConditionSetId())) return false; - if (!getActionsList() - .equals(other.getActionsList())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSetId().hashCode(); - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; - hash = (53 * hash) + metadataUpdateBehavior_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectMappingRequest) - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getActionsFieldBuilder(); - getMetadataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - subjectConditionSetId_ = ""; - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - } else { - actions_ = null; - actionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - metadataUpdateBehavior_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest build() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result) { - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.subjectConditionSetId_ = subjectConditionSetId_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.metadataUpdateBehavior_ = metadataUpdateBehavior_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getSubjectConditionSetId().isEmpty()) { - subjectConditionSetId_ = other.subjectConditionSetId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000004); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } - } - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.metadataUpdateBehavior_ != 0) { - setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - subjectConditionSetId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.opentdf.platform.policy.Action m = - input.readMessage( - io.opentdf.platform.policy.Action.parser(), - extensionRegistry); - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(m); - } else { - actionsBuilder_.addMessage(m); - } - break; - } // case 26 - case 802: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 802 - case 808: { - metadataUpdateBehavior_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 808 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required
-     * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object subjectConditionSetId_ = ""; - /** - *
-     * Optional
-     * Replaces the existing SubjectConditionSet id with a new one
-     * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @return The subjectConditionSetId. - */ - public java.lang.String getSubjectConditionSetId() { - java.lang.Object ref = subjectConditionSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subjectConditionSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional
-     * Replaces the existing SubjectConditionSet id with a new one
-     * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @return The bytes for subjectConditionSetId. - */ - public com.google.protobuf.ByteString - getSubjectConditionSetIdBytes() { - java.lang.Object ref = subjectConditionSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subjectConditionSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional
-     * Replaces the existing SubjectConditionSet id with a new one
-     * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @param value The subjectConditionSetId to set. - * @return This builder for chaining. - */ - public Builder setSubjectConditionSetId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - subjectConditionSetId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Optional
-     * Replaces the existing SubjectConditionSet id with a new one
-     * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @return This builder for chaining. - */ - public Builder clearSubjectConditionSetId() { - subjectConditionSetId_ = getDefaultInstance().getSubjectConditionSetId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Optional
-     * Replaces the existing SubjectConditionSet id with a new one
-     * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @param value The bytes for subjectConditionSetId to set. - * @return This builder for chaining. - */ - public Builder setSubjectConditionSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - subjectConditionSetId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> actionsBuilder_; - - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder addActions(io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.policy.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder addActions( - io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.policy.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - io.opentdf.platform.policy.Action.getDefaultInstance()); - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public io.opentdf.platform.policy.Action.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.Action.getDefaultInstance()); - } - /** - *
-     * Replaces entire list of actions permitted by subjects
-     * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.Action, io.opentdf.platform.policy.Action.Builder, io.opentdf.platform.policy.ActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - *
-     * Common metadata
-     * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private int metadataUpdateBehavior_ = 0; - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - @java.lang.Override public int getMetadataUpdateBehaviorValue() { - return metadataUpdateBehavior_; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehaviorValue(int value) { - metadataUpdateBehavior_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { - io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); - return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @param value The metadataUpdateBehavior to set. - * @return This builder for chaining. - */ - public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - metadataUpdateBehavior_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return This builder for chaining. - */ - public Builder clearMetadataUpdateBehavior() { - bitField0_ = (bitField0_ & ~0x00000010); - metadataUpdateBehavior_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectMappingRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectMappingRequest) - private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateSubjectMappingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java deleted file mode 100644 index fd54087a..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface UpdateSubjectMappingRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectMappingRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * Required
-   * 
- * - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * Optional
-   * Replaces the existing SubjectConditionSet id with a new one
-   * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @return The subjectConditionSetId. - */ - java.lang.String getSubjectConditionSetId(); - /** - *
-   * Optional
-   * Replaces the existing SubjectConditionSet id with a new one
-   * 
- * - * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; - * @return The bytes for subjectConditionSetId. - */ - com.google.protobuf.ByteString - getSubjectConditionSetIdBytes(); - - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - java.util.List - getActionsList(); - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - io.opentdf.platform.policy.Action getActions(int index); - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - int getActionsCount(); - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - java.util.List - getActionsOrBuilderList(); - /** - *
-   * Replaces entire list of actions permitted by subjects
-   * 
- * - * repeated .policy.Action actions = 3 [json_name = "actions"]; - */ - io.opentdf.platform.policy.ActionOrBuilder getActionsOrBuilder( - int index); - - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - *
-   * Common metadata
-   * 
- * - * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The enum numeric value on the wire for metadataUpdateBehavior. - */ - int getMetadataUpdateBehaviorValue(); - /** - * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; - * @return The metadataUpdateBehavior. - */ - io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java deleted file mode 100644 index 9a637a25..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java +++ /dev/null @@ -1,647 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingResponse} - */ -public final class UpdateSubjectMappingResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectMappingResponse) - UpdateSubjectMappingResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateSubjectMappingResponse.newBuilder() to construct. - private UpdateSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateSubjectMappingResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateSubjectMappingResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.SubjectMapping subjectMapping_; - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - @java.lang.Override - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectMapping()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectMapping()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse) obj; - - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectMappingResponse) - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse build() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.getDefaultInstance()) return this; - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.SubjectMapping subjectMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> subjectMappingBuilder_; - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - public io.opentdf.platform.policy.SubjectMapping getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } else { - return subjectMappingBuilder_.getMessage(); - } - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder setSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectMapping_ = value; - } else { - subjectMappingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.SubjectMapping.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); - } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.SubjectMapping.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); - } else { - subjectMapping_ = value; - } - } else { - subjectMappingBuilder_.mergeFrom(value); - } - if (subjectMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder clearSubjectMapping() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.SubjectMapping.Builder getSubjectMappingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); - } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - } - /** - *
-     * Only ID of the updated Subject Mapping provided
-     * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.SubjectMapping, io.opentdf.platform.policy.SubjectMapping.Builder, io.opentdf.platform.policy.SubjectMappingOrBuilder>( - getSubjectMapping(), - getParentForChildren(), - isClean()); - subjectMapping_ = null; - } - return subjectMappingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectMappingResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectMappingResponse) - private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateSubjectMappingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java deleted file mode 100644 index a7ff6687..00000000 --- a/protocol/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface UpdateSubjectMappingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectMappingResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. - */ - boolean hasSubjectMapping(); - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - io.opentdf.platform.policy.SubjectMapping getSubjectMapping(); - /** - *
-   * Only ID of the updated Subject Mapping provided
-   * 
- * - * .policy.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - io.opentdf.platform.policy.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequest.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequest.java deleted file mode 100644 index 6d47a9ff..00000000 --- a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequest.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wellknownconfiguration/wellknown_configuration.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.wellknownconfiguration; - -/** - * Protobuf type {@code wellknownconfiguration.GetWellKnownConfigurationRequest} - */ -public final class GetWellKnownConfigurationRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:wellknownconfiguration.GetWellKnownConfigurationRequest) - GetWellKnownConfigurationRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetWellKnownConfigurationRequest.newBuilder() to construct. - private GetWellKnownConfigurationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetWellKnownConfigurationRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetWellKnownConfigurationRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.class, io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest)) { - return super.equals(obj); - } - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest other = (io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code wellknownconfiguration.GetWellKnownConfigurationRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:wellknownconfiguration.GetWellKnownConfigurationRequest) - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.class, io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.Builder.class); - } - - // Construct using io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest getDefaultInstanceForType() { - return io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest build() { - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest buildPartial() { - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest result = new io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest) { - return mergeFrom((io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest other) { - if (other == io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:wellknownconfiguration.GetWellKnownConfigurationRequest) - } - - // @@protoc_insertion_point(class_scope:wellknownconfiguration.GetWellKnownConfigurationRequest) - private static final io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest(); - } - - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetWellKnownConfigurationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequestOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequestOrBuilder.java deleted file mode 100644 index cac3e4da..00000000 --- a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationRequestOrBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wellknownconfiguration/wellknown_configuration.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.wellknownconfiguration; - -public interface GetWellKnownConfigurationRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:wellknownconfiguration.GetWellKnownConfigurationRequest) - com.google.protobuf.MessageOrBuilder { -} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponse.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponse.java deleted file mode 100644 index d0b17955..00000000 --- a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wellknownconfiguration/wellknown_configuration.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.wellknownconfiguration; - -/** - * Protobuf type {@code wellknownconfiguration.GetWellKnownConfigurationResponse} - */ -public final class GetWellKnownConfigurationResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:wellknownconfiguration.GetWellKnownConfigurationResponse) - GetWellKnownConfigurationResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetWellKnownConfigurationResponse.newBuilder() to construct. - private GetWellKnownConfigurationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetWellKnownConfigurationResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetWellKnownConfigurationResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.class, io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.Builder.class); - } - - private int bitField0_; - public static final int CONFIGURATION_FIELD_NUMBER = 1; - private com.google.protobuf.Struct configuration_; - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - * @return Whether the configuration field is set. - */ - @java.lang.Override - public boolean hasConfiguration() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - * @return The configuration. - */ - @java.lang.Override - public com.google.protobuf.Struct getConfiguration() { - return configuration_ == null ? com.google.protobuf.Struct.getDefaultInstance() : configuration_; - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getConfigurationOrBuilder() { - return configuration_ == null ? com.google.protobuf.Struct.getDefaultInstance() : configuration_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getConfiguration()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getConfiguration()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse)) { - return super.equals(obj); - } - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse other = (io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse) obj; - - if (hasConfiguration() != other.hasConfiguration()) return false; - if (hasConfiguration()) { - if (!getConfiguration() - .equals(other.getConfiguration())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConfiguration()) { - hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER; - hash = (53 * hash) + getConfiguration().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code wellknownconfiguration.GetWellKnownConfigurationResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:wellknownconfiguration.GetWellKnownConfigurationResponse) - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.class, io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.Builder.class); - } - - // Construct using io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getConfigurationFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - configuration_ = null; - if (configurationBuilder_ != null) { - configurationBuilder_.dispose(); - configurationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse getDefaultInstanceForType() { - return io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse build() { - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse buildPartial() { - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse result = new io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.configuration_ = configurationBuilder_ == null - ? configuration_ - : configurationBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse) { - return mergeFrom((io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse other) { - if (other == io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.getDefaultInstance()) return this; - if (other.hasConfiguration()) { - mergeConfiguration(other.getConfiguration()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getConfigurationFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.Struct configuration_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> configurationBuilder_; - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - * @return Whether the configuration field is set. - */ - public boolean hasConfiguration() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - * @return The configuration. - */ - public com.google.protobuf.Struct getConfiguration() { - if (configurationBuilder_ == null) { - return configuration_ == null ? com.google.protobuf.Struct.getDefaultInstance() : configuration_; - } else { - return configurationBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - public Builder setConfiguration(com.google.protobuf.Struct value) { - if (configurationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configuration_ = value; - } else { - configurationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - public Builder setConfiguration( - com.google.protobuf.Struct.Builder builderForValue) { - if (configurationBuilder_ == null) { - configuration_ = builderForValue.build(); - } else { - configurationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - public Builder mergeConfiguration(com.google.protobuf.Struct value) { - if (configurationBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - configuration_ != null && - configuration_ != com.google.protobuf.Struct.getDefaultInstance()) { - getConfigurationBuilder().mergeFrom(value); - } else { - configuration_ = value; - } - } else { - configurationBuilder_.mergeFrom(value); - } - if (configuration_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - public Builder clearConfiguration() { - bitField0_ = (bitField0_ & ~0x00000001); - configuration_ = null; - if (configurationBuilder_ != null) { - configurationBuilder_.dispose(); - configurationBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - public com.google.protobuf.Struct.Builder getConfigurationBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConfigurationFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - public com.google.protobuf.StructOrBuilder getConfigurationOrBuilder() { - if (configurationBuilder_ != null) { - return configurationBuilder_.getMessageOrBuilder(); - } else { - return configuration_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : configuration_; - } - } - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getConfigurationFieldBuilder() { - if (configurationBuilder_ == null) { - configurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getConfiguration(), - getParentForChildren(), - isClean()); - configuration_ = null; - } - return configurationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:wellknownconfiguration.GetWellKnownConfigurationResponse) - } - - // @@protoc_insertion_point(class_scope:wellknownconfiguration.GetWellKnownConfigurationResponse) - private static final io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse(); - } - - public static io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetWellKnownConfigurationResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponseOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponseOrBuilder.java deleted file mode 100644 index 357a6a7f..00000000 --- a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/GetWellKnownConfigurationResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wellknownconfiguration/wellknown_configuration.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.wellknownconfiguration; - -public interface GetWellKnownConfigurationResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:wellknownconfiguration.GetWellKnownConfigurationResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - * @return Whether the configuration field is set. - */ - boolean hasConfiguration(); - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - * @return The configuration. - */ - com.google.protobuf.Struct getConfiguration(); - /** - * .google.protobuf.Struct configuration = 1 [json_name = "configuration"]; - */ - com.google.protobuf.StructOrBuilder getConfigurationOrBuilder(); -} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfig.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfig.java deleted file mode 100644 index e271975b..00000000 --- a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfig.java +++ /dev/null @@ -1,712 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wellknownconfiguration/wellknown_configuration.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.wellknownconfiguration; - -/** - * Protobuf type {@code wellknownconfiguration.WellKnownConfig} - */ -public final class WellKnownConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:wellknownconfiguration.WellKnownConfig) - WellKnownConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use WellKnownConfig.newBuilder() to construct. - private WellKnownConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WellKnownConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WellKnownConfig(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetConfiguration(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.wellknownconfiguration.WellKnownConfig.class, io.opentdf.platform.wellknownconfiguration.WellKnownConfig.Builder.class); - } - - public static final int CONFIGURATION_FIELD_NUMBER = 1; - private static final class ConfigurationDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Struct> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Struct.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Struct> configuration_; - private com.google.protobuf.MapField - internalGetConfiguration() { - if (configuration_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigurationDefaultEntryHolder.defaultEntry); - } - return configuration_; - } - public int getConfigurationCount() { - return internalGetConfiguration().getMap().size(); - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public boolean containsConfiguration( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetConfiguration().getMap().containsKey(key); - } - /** - * Use {@link #getConfigurationMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfiguration() { - return getConfigurationMap(); - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public java.util.Map getConfigurationMap() { - return internalGetConfiguration().getMap(); - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Struct getConfigurationOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Struct defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetConfiguration().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public com.google.protobuf.Struct getConfigurationOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetConfiguration().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetConfiguration(), - ConfigurationDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetConfiguration().getMap().entrySet()) { - com.google.protobuf.MapEntry - configuration__ = ConfigurationDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, configuration__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.wellknownconfiguration.WellKnownConfig)) { - return super.equals(obj); - } - io.opentdf.platform.wellknownconfiguration.WellKnownConfig other = (io.opentdf.platform.wellknownconfiguration.WellKnownConfig) obj; - - if (!internalGetConfiguration().equals( - other.internalGetConfiguration())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetConfiguration().getMap().isEmpty()) { - hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER; - hash = (53 * hash) + internalGetConfiguration().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.wellknownconfiguration.WellKnownConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code wellknownconfiguration.WellKnownConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:wellknownconfiguration.WellKnownConfig) - io.opentdf.platform.wellknownconfiguration.WellKnownConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetConfiguration(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableConfiguration(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.wellknownconfiguration.WellKnownConfig.class, io.opentdf.platform.wellknownconfiguration.WellKnownConfig.Builder.class); - } - - // Construct using io.opentdf.platform.wellknownconfiguration.WellKnownConfig.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableConfiguration().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.internal_static_wellknownconfiguration_WellKnownConfig_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.WellKnownConfig getDefaultInstanceForType() { - return io.opentdf.platform.wellknownconfiguration.WellKnownConfig.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.WellKnownConfig build() { - io.opentdf.platform.wellknownconfiguration.WellKnownConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.WellKnownConfig buildPartial() { - io.opentdf.platform.wellknownconfiguration.WellKnownConfig result = new io.opentdf.platform.wellknownconfiguration.WellKnownConfig(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.wellknownconfiguration.WellKnownConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.configuration_ = internalGetConfiguration().build(ConfigurationDefaultEntryHolder.defaultEntry); - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.wellknownconfiguration.WellKnownConfig) { - return mergeFrom((io.opentdf.platform.wellknownconfiguration.WellKnownConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.wellknownconfiguration.WellKnownConfig other) { - if (other == io.opentdf.platform.wellknownconfiguration.WellKnownConfig.getDefaultInstance()) return this; - internalGetMutableConfiguration().mergeFrom( - other.internalGetConfiguration()); - bitField0_ |= 0x00000001; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.MapEntry - configuration__ = input.readMessage( - ConfigurationDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableConfiguration().ensureBuilderMap().put( - configuration__.getKey(), configuration__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private static final class ConfigurationConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Struct build(com.google.protobuf.StructOrBuilder val) { - if (val instanceof com.google.protobuf.Struct) { return (com.google.protobuf.Struct) val; } - return ((com.google.protobuf.Struct.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ConfigurationDefaultEntryHolder.defaultEntry; - } - }; - private static final ConfigurationConverter configurationConverter = new ConfigurationConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.StructOrBuilder, com.google.protobuf.Struct, com.google.protobuf.Struct.Builder> configuration_; - private com.google.protobuf.MapFieldBuilder - internalGetConfiguration() { - if (configuration_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(configurationConverter); - } - return configuration_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableConfiguration() { - if (configuration_ == null) { - configuration_ = new com.google.protobuf.MapFieldBuilder<>(configurationConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return configuration_; - } - public int getConfigurationCount() { - return internalGetConfiguration().ensureBuilderMap().size(); - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public boolean containsConfiguration( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetConfiguration().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getConfigurationMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getConfiguration() { - return getConfigurationMap(); - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public java.util.Map getConfigurationMap() { - return internalGetConfiguration().getImmutableMap(); - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Struct getConfigurationOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Struct defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableConfiguration().ensureBuilderMap(); - return map.containsKey(key) ? configurationConverter.build(map.get(key)) : defaultValue; - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - @java.lang.Override - public com.google.protobuf.Struct getConfigurationOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableConfiguration().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return configurationConverter.build(map.get(key)); - } - public Builder clearConfiguration() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableConfiguration().clear(); - return this; - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - public Builder removeConfiguration( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableConfiguration().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableConfiguration() { - bitField0_ |= 0x00000001; - return internalGetMutableConfiguration().ensureMessageMap(); - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - public Builder putConfiguration( - java.lang.String key, - com.google.protobuf.Struct value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableConfiguration().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - public Builder putAllConfiguration( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableConfiguration().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - public com.google.protobuf.Struct.Builder putConfigurationBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableConfiguration().ensureBuilderMap(); - com.google.protobuf.StructOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Struct.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Struct) { - entry = ((com.google.protobuf.Struct) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Struct.Builder) entry; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:wellknownconfiguration.WellKnownConfig) - } - - // @@protoc_insertion_point(class_scope:wellknownconfiguration.WellKnownConfig) - private static final io.opentdf.platform.wellknownconfiguration.WellKnownConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.wellknownconfiguration.WellKnownConfig(); - } - - public static io.opentdf.platform.wellknownconfiguration.WellKnownConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WellKnownConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.wellknownconfiguration.WellKnownConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfigOrBuilder.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfigOrBuilder.java deleted file mode 100644 index 3cd17c0e..00000000 --- a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownConfigOrBuilder.java +++ /dev/null @@ -1,44 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wellknownconfiguration/wellknown_configuration.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.wellknownconfiguration; - -public interface WellKnownConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:wellknownconfiguration.WellKnownConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - int getConfigurationCount(); - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - boolean containsConfiguration( - java.lang.String key); - /** - * Use {@link #getConfigurationMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getConfiguration(); - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - java.util.Map - getConfigurationMap(); - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - /* nullable */ -com.google.protobuf.Struct getConfigurationOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Struct defaultValue); - /** - * map<string, .google.protobuf.Struct> configuration = 1 [json_name = "configuration"]; - */ - com.google.protobuf.Struct getConfigurationOrThrow( - java.lang.String key); -} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownServiceGrpc.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownServiceGrpc.java deleted file mode 100644 index c2a22be7..00000000 --- a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellKnownServiceGrpc.java +++ /dev/null @@ -1,293 +0,0 @@ -package io.opentdf.platform.wellknownconfiguration; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.61.1)", - comments = "Source: wellknownconfiguration/wellknown_configuration.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class WellKnownServiceGrpc { - - private WellKnownServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "wellknownconfiguration.WellKnownService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetWellKnownConfigurationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetWellKnownConfiguration", - requestType = io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.class, - responseType = io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetWellKnownConfigurationMethod() { - io.grpc.MethodDescriptor getGetWellKnownConfigurationMethod; - if ((getGetWellKnownConfigurationMethod = WellKnownServiceGrpc.getGetWellKnownConfigurationMethod) == null) { - synchronized (WellKnownServiceGrpc.class) { - if ((getGetWellKnownConfigurationMethod = WellKnownServiceGrpc.getGetWellKnownConfigurationMethod) == null) { - WellKnownServiceGrpc.getGetWellKnownConfigurationMethod = getGetWellKnownConfigurationMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetWellKnownConfiguration")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse.getDefaultInstance())) - .setSchemaDescriptor(new WellKnownServiceMethodDescriptorSupplier("GetWellKnownConfiguration")) - .build(); - } - } - } - return getGetWellKnownConfigurationMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static WellKnownServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WellKnownServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WellKnownServiceStub(channel, callOptions); - } - }; - return WellKnownServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static WellKnownServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WellKnownServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WellKnownServiceBlockingStub(channel, callOptions); - } - }; - return WellKnownServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static WellKnownServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WellKnownServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WellKnownServiceFutureStub(channel, callOptions); - } - }; - return WellKnownServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public interface AsyncService { - - /** - */ - default void getWellKnownConfiguration(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetWellKnownConfigurationMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service WellKnownService. - */ - public static abstract class WellKnownServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return WellKnownServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service WellKnownService. - */ - public static final class WellKnownServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private WellKnownServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WellKnownServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WellKnownServiceStub(channel, callOptions); - } - - /** - */ - public void getWellKnownConfiguration(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetWellKnownConfigurationMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service WellKnownService. - */ - public static final class WellKnownServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private WellKnownServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WellKnownServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WellKnownServiceBlockingStub(channel, callOptions); - } - - /** - */ - public io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse getWellKnownConfiguration(io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetWellKnownConfigurationMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service WellKnownService. - */ - public static final class WellKnownServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private WellKnownServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WellKnownServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WellKnownServiceFutureStub(channel, callOptions); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture getWellKnownConfiguration( - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetWellKnownConfigurationMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_WELL_KNOWN_CONFIGURATION = 0; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AsyncService serviceImpl; - private final int methodId; - - MethodHandlers(AsyncService serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_GET_WELL_KNOWN_CONFIGURATION: - serviceImpl.getWellKnownConfiguration((io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetWellKnownConfigurationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest, - io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse>( - service, METHODID_GET_WELL_KNOWN_CONFIGURATION))) - .build(); - } - - private static abstract class WellKnownServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - WellKnownServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.opentdf.platform.wellknownconfiguration.WellknownConfigurationProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("WellKnownService"); - } - } - - private static final class WellKnownServiceFileDescriptorSupplier - extends WellKnownServiceBaseDescriptorSupplier { - WellKnownServiceFileDescriptorSupplier() {} - } - - private static final class WellKnownServiceMethodDescriptorSupplier - extends WellKnownServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - WellKnownServiceMethodDescriptorSupplier(java.lang.String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (WellKnownServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new WellKnownServiceFileDescriptorSupplier()) - .addMethod(getGetWellKnownConfigurationMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellknownConfigurationProto.java b/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellknownConfigurationProto.java deleted file mode 100644 index 42c9a455..00000000 --- a/protocol/src/main/java/io/opentdf/platform/wellknownconfiguration/WellknownConfigurationProto.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wellknownconfiguration/wellknown_configuration.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.wellknownconfiguration; - -public final class WellknownConfigurationProto { - private WellknownConfigurationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_wellknownconfiguration_WellKnownConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_wellknownconfiguration_WellKnownConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n4wellknownconfiguration/wellknown_confi" + - "guration.proto\022\026wellknownconfiguration\032\034" + - "google/api/annotations.proto\032\034google/pro" + - "tobuf/struct.proto\"\316\001\n\017WellKnownConfig\022`" + - "\n\rconfiguration\030\001 \003(\0132:.wellknownconfigu" + - "ration.WellKnownConfig.ConfigurationEntr" + - "yR\rconfiguration\032Y\n\022ConfigurationEntry\022\020" + - "\n\003key\030\001 \001(\tR\003key\022-\n\005value\030\002 \001(\0132\027.google" + - ".protobuf.StructR\005value:\0028\001\"\"\n GetWellKn" + - "ownConfigurationRequest\"b\n!GetWellKnownC" + - "onfigurationResponse\022=\n\rconfiguration\030\001 " + - "\001(\0132\027.google.protobuf.StructR\rconfigurat" + - "ion2\321\001\n\020WellKnownService\022\274\001\n\031GetWellKnow" + - "nConfiguration\0228.wellknownconfiguration." + - "GetWellKnownConfigurationRequest\0329.wellk" + - "nownconfiguration.GetWellKnownConfigurat" + - "ionResponse\"*\202\323\344\223\002$\022\"/.well-known/opentd" + - "f-configurationB\301\001\n*io.opentdf.platform." + - "wellknownconfigurationB\033WellknownConfigu" + - "rationProtoP\001\242\002\003WXX\252\002\026Wellknownconfigura" + - "tion\312\002\026Wellknownconfiguration\342\002\"Wellknow" + - "nconfiguration\\GPBMetadata\352\002\026Wellknownco" + - "nfigurationb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - }); - internal_static_wellknownconfiguration_WellKnownConfig_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_wellknownconfiguration_WellKnownConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_wellknownconfiguration_WellKnownConfig_descriptor, - new java.lang.String[] { "Configuration", }); - internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_descriptor = - internal_static_wellknownconfiguration_WellKnownConfig_descriptor.getNestedTypes().get(0); - internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_wellknownconfiguration_WellKnownConfig_ConfigurationEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_wellknownconfiguration_GetWellKnownConfigurationRequest_descriptor, - new java.lang.String[] { }); - internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_wellknownconfiguration_GetWellKnownConfigurationResponse_descriptor, - new java.lang.String[] { "Configuration", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} From 94a99d0df6e56162f56dcee9f67e67b7db5e6c50 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 16:36:47 -0400 Subject: [PATCH 05/62] revert to java 11 --- .github/workflows/checks.yaml | 2 +- .github/workflows/release.yaml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index ce781375..0e93a0c9 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -39,7 +39,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7 with: - java-version: '21' + java-version: '11' distribution: 'adopt' server-id: github - name: Maven Verify diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 641c6b6f..2594d55e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -36,7 +36,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7 with: - java-version: '21' + java-version: '11' distribution: 'adopt' server-id: github - name: Publish package diff --git a/pom.xml b/pom.xml index 7129507b..131cace4 100644 --- a/pom.xml +++ b/pom.xml @@ -12,8 +12,8 @@ UTF-8 - 21 - 21 + 11 + 11 2.20.0 1.57.2 3.25.3 From bdea8efd5579a09f7465802a562d0d22d9bb8a05 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 16:48:50 -0400 Subject: [PATCH 06/62] add missing gh token --- .github/workflows/checks.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 0e93a0c9..31c7f716 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -46,7 +46,9 @@ jobs: run: | mvn clean install -DskipTests mvn verify - + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + ci: needs: - mavenverify From 80bcfbb9b07cf913e4b650264e85d4bdb12e1ec6 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 16:50:47 -0400 Subject: [PATCH 07/62] add gh permissions --- .github/workflows/checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 31c7f716..d8343c99 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -13,6 +13,9 @@ on: types: - checks_requested +permissions: + contents: read + jobs: pr: name: Validate PR title From 5bc13ea26d5459f9ebbaf87b643f770cc56348bd Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 16:53:21 -0400 Subject: [PATCH 08/62] add batch-mode --- .github/workflows/checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index d8343c99..cad84fb8 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -47,8 +47,8 @@ jobs: server-id: github - name: Maven Verify run: | - mvn clean install -DskipTests - mvn verify + mvn --batch-mode clean install -DskipTests + mvn --batch-mode verify env: GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' From 9948c6274adf7efc35ada0bf2d3fc87e078f83aa Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:12:25 -0400 Subject: [PATCH 09/62] try setting git config --- .github/workflows/checks.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index cad84fb8..3a015a85 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -36,6 +36,16 @@ jobs: - pr steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - name: Generate a token + id: generate_token + uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0 + with: + app-id: '${{ secrets.APP_ID }}' + private-key: '${{ secrets.AUTOMATION_KEY }}' + - run: | + git config user.email "" + git config user.name "${{ steps.generate_token.outputs.app-slug }}" + git config user.password "${{ steps.generate_token.outputs.token }}" - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} From a26e7226ceba635b446ed0f996e54672388bf0a3 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:16:47 -0400 Subject: [PATCH 10/62] try global --- .github/workflows/checks.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 3a015a85..0326c435 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -43,9 +43,9 @@ jobs: app-id: '${{ secrets.APP_ID }}' private-key: '${{ secrets.AUTOMATION_KEY }}' - run: | - git config user.email "" - git config user.name "${{ steps.generate_token.outputs.app-slug }}" - git config user.password "${{ steps.generate_token.outputs.token }}" + git --global config user.email "${{steps.generate_token.outputs.app-slug}}-github-action@users.noreply.github.com" + git --global config user.name "${{ steps.generate_token.outputs.app-slug }}" + git --global config user.password "${{ steps.generate_token.outputs.token }}" - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} From 4e3544199c9d01c8e648980ca11ae8d3f496a1ef Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:17:57 -0400 Subject: [PATCH 11/62] try global --- .github/workflows/checks.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 0326c435..ae103679 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -43,9 +43,9 @@ jobs: app-id: '${{ secrets.APP_ID }}' private-key: '${{ secrets.AUTOMATION_KEY }}' - run: | - git --global config user.email "${{steps.generate_token.outputs.app-slug}}-github-action@users.noreply.github.com" - git --global config user.name "${{ steps.generate_token.outputs.app-slug }}" - git --global config user.password "${{ steps.generate_token.outputs.token }}" + git config --global user.email "${{steps.generate_token.outputs.app-slug}}-github-action@users.noreply.github.com" + git config --global user.name "${{ steps.generate_token.outputs.app-slug }}" + git config --global user.password "${{ steps.generate_token.outputs.token }}" - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} From 704413b74b6883d8f7e772849ef269c63bb720a8 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:18:37 -0400 Subject: [PATCH 12/62] don't set gh token on maven job --- .github/workflows/checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index ae103679..ca550be1 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -59,8 +59,8 @@ jobs: run: | mvn --batch-mode clean install -DskipTests mvn --batch-mode verify - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + # env: + # GITHUB_TOKEN: '${{ steps.generate_token.outputs.token }}' ci: needs: From 5738b6666bc651ec3ce205531506cc9c67733f79 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:22:28 -0400 Subject: [PATCH 13/62] try different user name --- .github/workflows/checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index ca550be1..94903164 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -43,8 +43,8 @@ jobs: app-id: '${{ secrets.APP_ID }}' private-key: '${{ secrets.AUTOMATION_KEY }}' - run: | - git config --global user.email "${{steps.generate_token.outputs.app-slug}}-github-action@users.noreply.github.com" - git config --global user.name "${{ steps.generate_token.outputs.app-slug }}" + git config --global user.email "github-action@users.noreply.github.com" + git config --global user.name "GitHub Action" git config --global user.password "${{ steps.generate_token.outputs.token }}" - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: From 4517b742c07685deac5e87bad622b319e6137c9b Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:22:52 -0400 Subject: [PATCH 14/62] cat gitconfig --- .github/workflows/checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 94903164..944b82e2 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -45,6 +45,7 @@ jobs: - run: | git config --global user.email "github-action@users.noreply.github.com" git config --global user.name "GitHub Action" + cat ~/.gitconfig git config --global user.password "${{ steps.generate_token.outputs.token }}" - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: From d227ccbbe28f35dd6a223d3ccfc4c25af2a2e216 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:31:10 -0400 Subject: [PATCH 15/62] try something --- .github/workflows/checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 944b82e2..475c6b52 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -45,8 +45,8 @@ jobs: - run: | git config --global user.email "github-action@users.noreply.github.com" git config --global user.name "GitHub Action" - cat ~/.gitconfig git config --global user.password "${{ steps.generate_token.outputs.token }}" + echo "GIT_USER=GitHub Action:${{ steps.generate_token.outputs.token }}" >> $GITHUB_ENV - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} From a91b90f5c81353f3b2e37b3c8066ae591586965a Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:43:22 -0400 Subject: [PATCH 16/62] private --- .github/workflows/checks.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 475c6b52..068fd54a 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -43,10 +43,9 @@ jobs: app-id: '${{ secrets.APP_ID }}' private-key: '${{ secrets.AUTOMATION_KEY }}' - run: | - git config --global user.email "github-action@users.noreply.github.com" - git config --global user.name "GitHub Action" + git config user.name "GitHub Actions" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.password "${{ steps.generate_token.outputs.token }}" - echo "GIT_USER=GitHub Action:${{ steps.generate_token.outputs.token }}" >> $GITHUB_ENV - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -60,8 +59,8 @@ jobs: run: | mvn --batch-mode clean install -DskipTests mvn --batch-mode verify - # env: - # GITHUB_TOKEN: '${{ steps.generate_token.outputs.token }}' + env: + GITHUB_TOKEN: '${{ steps.generate_token.outputs.token }}' ci: needs: From df1cd08d113d8addc42499bf220c3d5376d5f4f8 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:44:06 -0400 Subject: [PATCH 17/62] don't set password --- .github/workflows/checks.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 068fd54a..43518cf6 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -45,7 +45,6 @@ jobs: - run: | git config user.name "GitHub Actions" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --global user.password "${{ steps.generate_token.outputs.token }}" - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} From 35ac02f0f9b21e7cb9ed64a6bd661a3c139904ae Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:48:35 -0400 Subject: [PATCH 18/62] fix app name --- .github/workflows/checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 43518cf6..dc2e27f8 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -43,8 +43,8 @@ jobs: app-id: '${{ secrets.APP_ID }}' private-key: '${{ secrets.AUTOMATION_KEY }}' - run: | - git config user.name "GitHub Actions" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config user.name "opentdf-automation[bot]" + git config user.email "43526202+opentdf-automation[bot]@users.noreply.github.com" - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} From c08a3145e2c42ecab2b56021b4f4708aa9dede4f Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:50:42 -0400 Subject: [PATCH 19/62] try git user again --- .github/workflows/checks.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index dc2e27f8..e7eaa855 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -45,6 +45,8 @@ jobs: - run: | git config user.name "opentdf-automation[bot]" git config user.email "43526202+opentdf-automation[bot]@users.noreply.github.com" + git config user.password ${{ steps.generate_token.outputs.token }} + echo "GIT_USER=opentdf-automation[bot]:${{ steps.generate_token.outputs.token }}" >> $GITHUB_ENV - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} From cc929fb34c30033ae7f50ef65b51cc4b7b77c712 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:53:29 -0400 Subject: [PATCH 20/62] add buf debug flag --- protocol/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/protocol/pom.xml b/protocol/pom.xml index 8163e376..0a3c9f11 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -56,6 +56,7 @@ + From 03a75feffbb6075b892b1e9093d3337fec50011d Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 17:58:38 -0400 Subject: [PATCH 21/62] set buff env vars --- .github/workflows/checks.yaml | 8 ++------ protocol/pom.xml | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index e7eaa855..90876e41 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -42,11 +42,6 @@ jobs: with: app-id: '${{ secrets.APP_ID }}' private-key: '${{ secrets.AUTOMATION_KEY }}' - - run: | - git config user.name "opentdf-automation[bot]" - git config user.email "43526202+opentdf-automation[bot]@users.noreply.github.com" - git config user.password ${{ steps.generate_token.outputs.token }} - echo "GIT_USER=opentdf-automation[bot]:${{ steps.generate_token.outputs.token }}" >> $GITHUB_ENV - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -61,7 +56,8 @@ jobs: mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - GITHUB_TOKEN: '${{ steps.generate_token.outputs.token }}' + BUF_INPUT_HTTPS_USERNAME: opentdf-automation[bot] + BUF_INPUT_HTTPS_PASSWORD: '${{ steps.generate_token.outputs.token }}' ci: needs: diff --git a/protocol/pom.xml b/protocol/pom.xml index 0a3c9f11..8163e376 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -56,7 +56,6 @@ - From 503417af019f9b9a9ebaa972c668f5df50db6603 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:04:00 -0400 Subject: [PATCH 22/62] try pat --- .github/workflows/checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 90876e41..bb59dfc7 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -57,7 +57,7 @@ jobs: mvn --batch-mode verify env: BUF_INPUT_HTTPS_USERNAME: opentdf-automation[bot] - BUF_INPUT_HTTPS_PASSWORD: '${{ steps.generate_token.outputs.token }}' + BUF_INPUT_HTTPS_PASSWORD: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' ci: needs: From e58ee1141cc958c2f56678c5cbba4ee3fefb7f44 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:07:06 -0400 Subject: [PATCH 23/62] fix username --- .github/workflows/checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index bb59dfc7..12d189bc 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -56,7 +56,7 @@ jobs: mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - BUF_INPUT_HTTPS_USERNAME: opentdf-automation[bot] + BUF_INPUT_HTTPS_USERNAME: opentdf-bot BUF_INPUT_HTTPS_PASSWORD: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' ci: From 8ffb5072345556565eba27ddf30b0e7617fe8896 Mon Sep 17 00:00:00 2001 From: Timothy Tschampel Date: Mon, 18 Mar 2024 15:11:45 -0700 Subject: [PATCH 24/62] try this --- .github/workflows/checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 12d189bc..b35102e4 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -58,6 +58,7 @@ jobs: env: BUF_INPUT_HTTPS_USERNAME: opentdf-bot BUF_INPUT_HTTPS_PASSWORD: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ci: needs: From 501760b9de145f23712aaec9530e85482df4f11d Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:13:30 -0400 Subject: [PATCH 25/62] try setting git config --- .github/workflows/checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index b35102e4..a6e9c727 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -53,6 +53,9 @@ jobs: server-id: github - name: Maven Verify run: | + git config user.email "cloudnative@virtru.com" + git config user.name "opentdf-bot" + git config user.password "${{ secrets.PERSONAL_ACCESS_TOKEN }}" mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: From f33739a46d9de65f61a7d34c2bb9a18743dfa448 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:14:19 -0400 Subject: [PATCH 26/62] try again --- .github/workflows/checks.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index a6e9c727..427795ef 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -58,10 +58,9 @@ jobs: git config user.password "${{ secrets.PERSONAL_ACCESS_TOKEN }}" mvn --batch-mode clean install -DskipTests mvn --batch-mode verify - env: - BUF_INPUT_HTTPS_USERNAME: opentdf-bot - BUF_INPUT_HTTPS_PASSWORD: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # env: + # BUF_INPUT_HTTPS_USERNAME: opentdf-bot + # BUF_INPUT_HTTPS_PASSWORD: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' ci: needs: From a80b7e2929a504f16327d6cbb4dbc4347332fd21 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:22:15 -0400 Subject: [PATCH 27/62] try buf env vars again --- .github/workflows/checks.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 427795ef..5de629fe 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -53,14 +53,11 @@ jobs: server-id: github - name: Maven Verify run: | - git config user.email "cloudnative@virtru.com" - git config user.name "opentdf-bot" - git config user.password "${{ secrets.PERSONAL_ACCESS_TOKEN }}" mvn --batch-mode clean install -DskipTests mvn --batch-mode verify - # env: - # BUF_INPUT_HTTPS_USERNAME: opentdf-bot - # BUF_INPUT_HTTPS_PASSWORD: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' + env: + BUF_INPUT_HTTPS_USERNAME: opentdf-bot + BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN }} ci: needs: From 8172a65cbac9b84812e90b4b008ec18824afcebb Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:23:51 -0400 Subject: [PATCH 28/62] remove generate token --- .github/workflows/checks.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 5de629fe..629e0676 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -36,12 +36,6 @@ jobs: - pr steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - name: Generate a token - id: generate_token - uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0 - with: - app-id: '${{ secrets.APP_ID }}' - private-key: '${{ secrets.AUTOMATION_KEY }}' - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} From 418c50a2156bdc1e854c5cd4beb3513fea0e06db Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:34:42 -0400 Subject: [PATCH 29/62] add github token back --- .github/workflows/checks.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 629e0676..4d71788d 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -50,8 +50,7 @@ jobs: mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - BUF_INPUT_HTTPS_USERNAME: opentdf-bot - BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ci: needs: From 6469c43f80d73cbd18c653ed2a0bdbd178d0fd5a Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:44:18 -0400 Subject: [PATCH 30/62] try buf env now --- .github/workflows/checks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 4d71788d..f736eea3 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -50,7 +50,8 @@ jobs: mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BUF_INPUT_HTTPS_USERNAME: ${{ secrets.GITHUB_ACTOR }} + BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.GITHUB_TOKEN }} ci: needs: From b81c00ac4498da55bb4134eef8fdd18f5425f8ce Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 18:45:58 -0400 Subject: [PATCH 31/62] set username --- .github/workflows/checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index f736eea3..bb386370 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -50,7 +50,7 @@ jobs: mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - BUF_INPUT_HTTPS_USERNAME: ${{ secrets.GITHUB_ACTOR }} + BUF_INPUT_HTTPS_USERNAME: "opentdf" BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.GITHUB_TOKEN }} ci: From e19e9be597349ce0e014d70a21b0e552f6c40ba3 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 20:55:31 -0400 Subject: [PATCH 32/62] try x-access-token --- .github/workflows/checks.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index bb386370..3191fd5b 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -36,6 +36,12 @@ jobs: - pr steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - name: Generate a token + id: generate_token + uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0 + with: + app-id: '${{ secrets.APP_ID }}' + private-key: '${{ secrets.AUTOMATION_KEY }}' - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -50,8 +56,8 @@ jobs: mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - BUF_INPUT_HTTPS_USERNAME: "opentdf" - BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + BUF_INPUT_HTTPS_USERNAME: "x-access-token" + BUF_INPUT_HTTPS_PASSWORD: ${{ steps.generate_token.outputs.token }} ci: needs: From 43eb477b72ceaea53e23415034e29e3affebcd94 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 20:57:45 -0400 Subject: [PATCH 33/62] try pom setting --- protocol/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/pom.xml b/protocol/pom.xml index 8163e376..c85db386 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -56,7 +56,7 @@ - + From 95e3cea47a515d1e3824aaed08124ca0ada3fb88 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 21:00:01 -0400 Subject: [PATCH 34/62] fix url --- protocol/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/pom.xml b/protocol/pom.xml index c85db386..eeabb77f 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -56,7 +56,7 @@ - + From f93ab803044bd239b7e0a1311b41d6f1187fb191 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 21:06:38 -0400 Subject: [PATCH 35/62] try a git clone --- .github/workflows/checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 3191fd5b..7abaa9b3 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -53,6 +53,7 @@ jobs: server-id: github - name: Maven Verify run: | + git clone https://x-access-token:${BUF_INPUT_HTTPS_PASSWORD}@github.com/opentdf/platform.git mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: From a01fe92e67119c2f5b6e732e43bdae82698caf88 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 21:07:25 -0400 Subject: [PATCH 36/62] try different env var --- .github/workflows/checks.yaml | 6 +++--- protocol/pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 7abaa9b3..79bcba3d 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -53,12 +53,12 @@ jobs: server-id: github - name: Maven Verify run: | - git clone https://x-access-token:${BUF_INPUT_HTTPS_PASSWORD}@github.com/opentdf/platform.git + git clone https://x-access-token:${GIT_PASSWORD}@github.com/opentdf/platform.git mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - BUF_INPUT_HTTPS_USERNAME: "x-access-token" - BUF_INPUT_HTTPS_PASSWORD: ${{ steps.generate_token.outputs.token }} + # BUF_INPUT_HTTPS_USERNAME: "x-access-token" + GIT_PASSWORD: ${{ steps.generate_token.outputs.token }} ci: needs: diff --git a/protocol/pom.xml b/protocol/pom.xml index eeabb77f..413b740f 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -56,7 +56,7 @@ - + From 1f64a48fd357d0af15b39a6d725842e51e657545 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 21:08:54 -0400 Subject: [PATCH 37/62] try withtout cloning --- .github/workflows/checks.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 79bcba3d..835f9ef3 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -53,7 +53,6 @@ jobs: server-id: github - name: Maven Verify run: | - git clone https://x-access-token:${GIT_PASSWORD}@github.com/opentdf/platform.git mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: From ae4df2f6d26b231142415c780349c0c6608e41a5 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 21:17:27 -0400 Subject: [PATCH 38/62] test my pat --- .github/workflows/checks.yaml | 10 ++-------- protocol/pom.xml | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 835f9ef3..53c72dc6 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -36,12 +36,6 @@ jobs: - pr steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - name: Generate a token - id: generate_token - uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0 - with: - app-id: '${{ secrets.APP_ID }}' - private-key: '${{ secrets.AUTOMATION_KEY }}' - uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -56,8 +50,8 @@ jobs: mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - # BUF_INPUT_HTTPS_USERNAME: "x-access-token" - GIT_PASSWORD: ${{ steps.generate_token.outputs.token }} + BUF_INPUT_HTTPS_USERNAME: strantalis + BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN_TEST }} ci: needs: diff --git a/protocol/pom.xml b/protocol/pom.xml index 413b740f..b63be8be 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -56,7 +56,7 @@ - + From 8db2eb87f1c687fc05aa80ad750d64a4b56fdf34 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 21:19:29 -0400 Subject: [PATCH 39/62] try opentdf-bot again --- .github/workflows/checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 53c72dc6..44753116 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -51,7 +51,7 @@ jobs: mvn --batch-mode verify env: BUF_INPUT_HTTPS_USERNAME: strantalis - BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN_TEST }} + BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN }} ci: needs: From 4e552eb33fc8afb4b5b249ecefd35d50504cd796 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 21:22:07 -0400 Subject: [PATCH 40/62] switch username --- .github/workflows/checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 44753116..629e0676 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -50,7 +50,7 @@ jobs: mvn --batch-mode clean install -DskipTests mvn --batch-mode verify env: - BUF_INPUT_HTTPS_USERNAME: strantalis + BUF_INPUT_HTTPS_USERNAME: opentdf-bot BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN }} ci: From 4e59affcdd4d6af122c2a9c56c97579c0038ebd6 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Mon, 18 Mar 2024 21:24:47 -0400 Subject: [PATCH 41/62] switch access token --- .github/workflows/checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 629e0676..4d88b52e 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -51,7 +51,7 @@ jobs: mvn --batch-mode verify env: BUF_INPUT_HTTPS_USERNAME: opentdf-bot - BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN_OPENTDF }} ci: needs: From f0942e5964da48f8ed9eb2521c2f14d3b9fb24c6 Mon Sep 17 00:00:00 2001 From: Sean Trantalis Date: Tue, 19 Mar 2024 07:54:05 -0400 Subject: [PATCH 42/62] remove dpop for now --- pom.xml | 10 ++++ .../java/io/opentdf/platform/sdk/SDK.java | 59 +++++++++++++++---- 2 files changed, 56 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 131cace4..f9061665 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,16 @@ pom import + + io.opentdf.platform + sdk + 0.1.0-SNAPSHOT + + + io.opentdf.platform + protocol + 0.1.0-SNAPSHOT + + org.apache.tomcat + annotations-api + 6.0.53 + provided com.google.protobuf protobuf-java ${protobuf.version} + + org.assertj + assertj-core + 3.8.0 + test + + + com.squareup.okhttp3 + mockwebserver + 4.12.0 + test + + + org.junit.jupiter + junit-jupiter-api + 5.10.1 + test + diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/GRPCAuthInterceptor.java b/sdk/src/main/java/io/opentdf/platform/sdk/GRPCAuthInterceptor.java index 29c32db3..24fc186e 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/GRPCAuthInterceptor.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/GRPCAuthInterceptor.java @@ -15,6 +15,7 @@ import com.nimbusds.oauth2.sdk.http.HTTPRequest; import com.nimbusds.oauth2.sdk.http.HTTPResponse; import com.nimbusds.oauth2.sdk.token.AccessToken; +import com.nimbusds.oauth2.sdk.tokenexchange.TokenExchangeGrant; import io.grpc.CallOptions; import io.grpc.Channel; import io.grpc.ClientCall; @@ -69,7 +70,6 @@ public ClientCall interceptCall(MethodDescriptor responseListener, Metadata headers) { // Get the access token AccessToken t = getToken(); - headers.put(Metadata.Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER), "DPoP " + t.getValue()); @@ -86,8 +86,6 @@ public void start(Listener responseListener, Metadata headers) { } catch (JOSEException e) { throw new RuntimeException("Error creating DPoP proof", e); } - - super.start(responseListener, headers); } }; @@ -98,11 +96,10 @@ public void start(Listener responseListener, Metadata headers) { * * @return The access token. */ - private AccessToken getToken() { + private synchronized AccessToken getToken() { try { - // If the token is expired or initially null, get a new token - if (isTokenExpired() || this.token == null) { + if (token == null || isTokenExpired()) { // Construct the client credentials grant AuthorizationGrant clientGrant = new ClientCredentialsGrant(); @@ -114,8 +111,7 @@ private AccessToken getToken() { DPoPProofFactory dpopFactory = new DefaultDPoPProofFactory(rsaKey, JWSAlgorithm.RS256); - SignedJWT proof = - dpopFactory.createDPoPJWT(httpRequest.getMethod().name(), httpRequest.getURI()); + SignedJWT proof = dpopFactory.createDPoPJWT(httpRequest.getMethod().name(), httpRequest.getURI()); httpRequest.setDPoP(proof); TokenResponse tokenResponse; diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java index d4064e25..d2f3bfd7 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java @@ -1,6 +1,5 @@ package io.opentdf.platform.sdk; -import io.grpc.ManagedChannelBuilder; import io.opentdf.platform.policy.attributes.AttributesServiceGrpc.AttributesServiceFutureStub; import io.opentdf.platform.policy.namespaces.NamespaceServiceGrpc.NamespaceServiceFutureStub; import io.opentdf.platform.policy.resourcemapping.ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub; @@ -24,6 +23,4 @@ public interface Services { public SDK(Services services) { this.services = services; } - - } \ No newline at end of file diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java index 20c175dc..2b09b6b5 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java @@ -11,14 +11,11 @@ import com.nimbusds.oauth2.sdk.id.ClientID; import com.nimbusds.oauth2.sdk.id.Issuer; import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata; +import io.grpc.Channel; import io.grpc.ClientInterceptor; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.Status; -import io.opentdf.platform.policy.attributes.AttributesServiceGrpc; -import io.opentdf.platform.policy.namespaces.NamespaceServiceGrpc; -import io.opentdf.platform.policy.resourcemapping.ResourceMappingServiceGrpc; -import io.opentdf.platform.policy.subjectmapping.SubjectMappingServiceGrpc; import io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest; import io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse; import io.opentdf.platform.wellknownconfiguration.WellKnownServiceGrpc; @@ -59,10 +56,8 @@ public SDKBuilder withPlainTextConnection(Boolean usePlainText) { return this; } - public SDK build() { - + ManagedChannel buildChannel() { ManagedChannelBuilder bootstrapChannelBuilder = getManagedChannelBuilder(); - GetWellKnownConfigurationResponse config; try { config = WellKnownServiceGrpc @@ -103,33 +98,33 @@ public SDK build() { } ClientInterceptor interceptor = new GRPCAuthInterceptor(clientAuth, rsaKey, providerMetadata.getTokenEndpointURI()); - ManagedChannel channel = getManagedChannelBuilder() + + return getManagedChannelBuilder() .intercept(interceptor) .build(); - SDK.Services services = new SDK.Services() { - final AttributesServiceGrpc.AttributesServiceFutureStub attributes = AttributesServiceGrpc.newFutureStub(channel); - final NamespaceServiceGrpc.NamespaceServiceFutureStub namespaces = NamespaceServiceGrpc.newFutureStub(channel); - final SubjectMappingServiceGrpc.SubjectMappingServiceFutureStub subjectMappings = SubjectMappingServiceGrpc.newFutureStub(channel); - final ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub resourceMappings = ResourceMappingServiceGrpc.newFutureStub(channel); - @Override - public AttributesServiceGrpc.AttributesServiceFutureStub attributes() { - return attributes; - } - @Override - public NamespaceServiceGrpc.NamespaceServiceFutureStub namespaces() { - return namespaces; - } - @Override - public SubjectMappingServiceGrpc.SubjectMappingServiceFutureStub subjectMappings() { - return subjectMappings; - } - @Override - public ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub resourceMappings() { - return resourceMappings; - } - }; - return new SDK(services); +// return new SDK.Services() { +// final AttributesServiceGrpc.AttributesServiceFutureStub attributes = AttributesServiceGrpc.newFutureStub(channel); +// final NamespaceServiceGrpc.NamespaceServiceFutureStub namespaces = NamespaceServiceGrpc.newFutureStub(channel); +// final SubjectMappingServiceGrpc.SubjectMappingServiceFutureStub subjectMappings = SubjectMappingServiceGrpc.newFutureStub(channel); +// final ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub resourceMappings = ResourceMappingServiceGrpc.newFutureStub(channel); +// @Override +// public AttributesServiceGrpc.AttributesServiceFutureStub attributes() { +// return attributes; +// } +// @Override +// public NamespaceServiceGrpc.NamespaceServiceFutureStub namespaces() { +// return namespaces; +// } +// @Override +// public SubjectMappingServiceGrpc.SubjectMappingServiceFutureStub subjectMappings() { +// return subjectMappings; +// } +// @Override +// public ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub resourceMappings() { +// return resourceMappings; +// } +// }; } private ManagedChannelBuilder getManagedChannelBuilder() { ManagedChannelBuilder channelBuilder = ManagedChannelBuilder diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java new file mode 100644 index 00000000..6e4fbbc0 --- /dev/null +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java @@ -0,0 +1,80 @@ +package io.opentdf.platform.sdk; + +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import io.grpc.Channel; +import io.grpc.ManagedChannel; +import io.grpc.Server; +import io.grpc.ServerBuilder; +import io.grpc.stub.StreamObserver; +import io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest; +import io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse; +import io.opentdf.platform.wellknownconfiguration.WellKnownServiceGrpc; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Random; + +import static org.assertj.core.api.Assertions.assertThat; + + +public class SDKBuilderTest { + + @Test + void testCreatingSDKWithIssuer() throws IOException { + Server server = null; + try (MockWebServer oidcDiscoveryServer = new MockWebServer()) { + String oidcConfig; + try (var in = SDKBuilderTest.class.getResourceAsStream("/oidc-config.json")) { + oidcConfig = new String(in.readAllBytes(), StandardCharsets.UTF_8); + } + String issuer = oidcDiscoveryServer.url("my_realm").toString(); + oidcConfig = oidcConfig.replace("", issuer); + oidcDiscoveryServer.enqueue(new MockResponse() + .setBody(oidcConfig) + .setHeader("Content-type", "application/json") + ); + + WellKnownServiceGrpc.WellKnownServiceImplBase serviceImplBase = new WellKnownServiceGrpc.WellKnownServiceImplBase() { + @Override + public void getWellKnownConfiguration(GetWellKnownConfigurationRequest request, StreamObserver responseObserver) { + var val = Value.newBuilder().setStringValue(issuer).build(); + var config = Struct.newBuilder().putFields("platform_issuer", val).build(); + var response = GetWellKnownConfigurationResponse + .newBuilder() + .setConfiguration(config) + .build(); + responseObserver.onNext(response); + responseObserver.onCompleted(); + } + }; + + server = ServerBuilder + .forPort(7000 + new Random().nextInt(3000)) + .directExecutor() + .addService(serviceImplBase) + .build() + .start(); + + ManagedChannel channel = SDKBuilder + .newBuilder() + .withClientSecret("client", "secret") + .platformEndpoint("localhost:" + server.getPort()) + .withPlainTextConnection(true) + .buildChannel(); + + channel.shutdownNow(); + + assertThat(channel).isNotNull(); + } catch (Exception e) { + if (server != null) { + server.shutdownNow(); + } + + throw e; + } + } +} diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java index ec88c70f..286aea1c 100644 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java @@ -1,5 +1,6 @@ package io.opentdf.platform.sdk; + import org.junit.jupiter.api.Test; import java.util.logging.Logger; diff --git a/sdk/src/test/resources/oidc-config.json b/sdk/src/test/resources/oidc-config.json new file mode 100644 index 00000000..4c04082d --- /dev/null +++ b/sdk/src/test/resources/oidc-config.json @@ -0,0 +1,145 @@ +{ + "issuer": "", + "authorization_endpoint": "https://example.com/oauth2/v1/authorize", + "token_endpoint": "https://example.com/oauth2/v1/token", + "userinfo_endpoint": "https://example.com/oauth2/v1/userinfo", + "registration_endpoint": "https://example.com/oauth2/v1/clients", + "jwks_uri": "https://example.com/oauth2/v1/keys", + "response_types_supported": [ + "code", + "id_token", + "code id_token", + "code token", + "id_token token", + "code id_token token" + ], + "response_modes_supported": [ + "query", + "fragment", + "form_post", + "okta_post_message" + ], + "grant_types_supported": [ + "authorization_code", + "implicit", + "refresh_token", + "password", + "urn:ietf:params:oauth:grant-type:device_code", + "urn:openid:params:grant-type:ciba", + "urn:okta:params:oauth:grant-type:otp", + "http://auth0.com/oauth/grant-type/mfa-otp", + "urn:okta:params:oauth:grant-type:oob", + "http://auth0.com/oauth/grant-type/mfa-oob" + ], + "subject_types_supported": [ + "public" + ], + "id_token_signing_alg_values_supported": [ + "RS256" + ], + "scopes_supported": [ + "openid", + "email", + "profile", + "address", + "phone", + "offline_access", + "groups" + ], + "token_endpoint_auth_methods_supported": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ], + "claims_supported": [ + "iss", + "ver", + "sub", + "aud", + "iat", + "exp", + "jti", + "auth_time", + "amr", + "idp", + "nonce", + "name", + "nickname", + "preferred_username", + "given_name", + "middle_name", + "family_name", + "email", + "email_verified", + "profile", + "zoneinfo", + "locale", + "address", + "phone_number", + "picture", + "website", + "gender", + "birthdate", + "updated_at", + "at_hash", + "c_hash" + ], + "code_challenge_methods_supported": [ + "S256" + ], + "introspection_endpoint": "https://example.com/oauth2/v1/introspect", + "introspection_endpoint_auth_methods_supported": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ], + "revocation_endpoint": "https://example.com/oauth2/v1/revoke", + "revocation_endpoint_auth_methods_supported": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ], + "end_session_endpoint": "https://example.com/oauth2/v1/logout", + "request_parameter_supported": true, + "request_object_signing_alg_values_supported": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512" + ], + "device_authorization_endpoint": "https://example.com/oauth2/v1/device/authorize", + "pushed_authorization_request_endpoint": "https://example.com/oauth2/v1/par", + "backchannel_token_delivery_modes_supported": [ + "poll" + ], + "backchannel_authentication_request_signing_alg_values_supported": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512" + ], + "dpop_signing_alg_values_supported": [ + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512" + ] +} \ No newline at end of file From ce66417c63990fb73c8b6c445d4dc9cfc4963e92 Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 12:54:46 -0400 Subject: [PATCH 50/62] get the test going e2e --- .../io/opentdf/platform/sdk/SDKBuilder.java | 27 ++++-- .../opentdf/platform/sdk/SDKBuilderTest.java | 93 +++++++++++++++---- sdk/src/test/resources/oidc-config.json | 2 +- 3 files changed, 93 insertions(+), 29 deletions(-) diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java index 2b09b6b5..2ae17b20 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java @@ -11,8 +11,6 @@ import com.nimbusds.oauth2.sdk.id.ClientID; import com.nimbusds.oauth2.sdk.id.Issuer; import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata; -import io.grpc.Channel; -import io.grpc.ClientInterceptor; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.Status; @@ -56,16 +54,25 @@ public SDKBuilder withPlainTextConnection(Boolean usePlainText) { return this; } + ManagedChannel buildChannel() { - ManagedChannelBuilder bootstrapChannelBuilder = getManagedChannelBuilder(); + // we don't add the auth listener to this channel since it is only used to call the + // well known endpoint + ManagedChannel bootstrapChannel = null; GetWellKnownConfigurationResponse config; try { - config = WellKnownServiceGrpc - .newBlockingStub(bootstrapChannelBuilder.build()) - .getWellKnownConfiguration(GetWellKnownConfigurationRequest.getDefaultInstance()); - } catch (Exception e) { - Status status = Status.fromThrowable(e); - throw new RuntimeException(String.format("Got grpc status [%s] when getting configuration", status), e); + bootstrapChannel = getManagedChannelBuilder().build(); + var stub = WellKnownServiceGrpc.newBlockingStub(bootstrapChannel); + try { + config = stub.getWellKnownConfiguration(GetWellKnownConfigurationRequest.getDefaultInstance()); + } catch (Exception e) { + Status status = Status.fromThrowable(e); + throw new RuntimeException(String.format("Got grpc status [%s] when getting configuration", status), e); + } + } finally { + if (bootstrapChannel != null) { + bootstrapChannel.shutdown(); + } } String platformIssuer; @@ -97,7 +104,7 @@ ManagedChannel buildChannel() { throw new RuntimeException("Error generating DPoP key", e); } - ClientInterceptor interceptor = new GRPCAuthInterceptor(clientAuth, rsaKey, providerMetadata.getTokenEndpointURI()); + GRPCAuthInterceptor interceptor = new GRPCAuthInterceptor(clientAuth, rsaKey, providerMetadata.getTokenEndpointURI()); return getManagedChannelBuilder() .intercept(interceptor) diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java index 6e4fbbc0..9ba93797 100644 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java @@ -2,10 +2,14 @@ import com.google.protobuf.Struct; import com.google.protobuf.Value; -import io.grpc.Channel; +import io.grpc.ConnectivityState; import io.grpc.ManagedChannel; +import io.grpc.Metadata; import io.grpc.Server; import io.grpc.ServerBuilder; +import io.grpc.ServerCall; +import io.grpc.ServerCallHandler; +import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; import io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationRequest; import io.opentdf.platform.wellknownconfiguration.GetWellKnownConfigurationResponse; @@ -16,7 +20,9 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.Random; +import java.util.concurrent.atomic.AtomicReference; import static org.assertj.core.api.Assertions.assertThat; @@ -24,21 +30,29 @@ public class SDKBuilderTest { @Test - void testCreatingSDKWithIssuer() throws IOException { - Server server = null; - try (MockWebServer oidcDiscoveryServer = new MockWebServer()) { + void testCreatingSDKWithIssuer() throws IOException, InterruptedException { + Server wellknownServer = null; + + // we use the HTTP server for two things: + // * it returns the OIDC configuration we use at bootstrapping time + // * it fakes out being an IDP and returns an access token when need to retrieve an access token + try (MockWebServer httpServer = new MockWebServer()) { String oidcConfig; try (var in = SDKBuilderTest.class.getResourceAsStream("/oidc-config.json")) { oidcConfig = new String(in.readAllBytes(), StandardCharsets.UTF_8); } - String issuer = oidcDiscoveryServer.url("my_realm").toString(); - oidcConfig = oidcConfig.replace("", issuer); - oidcDiscoveryServer.enqueue(new MockResponse() + String issuer = httpServer.url("my_realm").toString(); + oidcConfig = oidcConfig + // if we don't do this then the library code complains that the issuer is wrong + .replace("", issuer) + // we want this server to be called when we fetch an access token + .replace("", httpServer.url("tokens").toString()); + httpServer.enqueue(new MockResponse() .setBody(oidcConfig) .setHeader("Content-type", "application/json") ); - WellKnownServiceGrpc.WellKnownServiceImplBase serviceImplBase = new WellKnownServiceGrpc.WellKnownServiceImplBase() { + WellKnownServiceGrpc.WellKnownServiceImplBase wellKnownService = new WellKnownServiceGrpc.WellKnownServiceImplBase() { @Override public void getWellKnownConfiguration(GetWellKnownConfigurationRequest request, StreamObserver responseObserver) { var val = Value.newBuilder().setStringValue(issuer).build(); @@ -52,29 +66,72 @@ public void getWellKnownConfiguration(GetWellKnownConfigurationRequest request, } }; - server = ServerBuilder + AtomicReference authHeaderFromRequest = new AtomicReference<>(null); + AtomicReference dpopHeaderFromRequest = new AtomicReference<>(null); + + // we use the server in two different ways. the first time we use it to actually return + // issuer for bootstrapping. the second time we use the interception functionality in order + // to make sure that we are including a DPoP proof and an auth header + wellknownServer = ServerBuilder .forPort(7000 + new Random().nextInt(3000)) .directExecutor() - .addService(serviceImplBase) + .addService(wellKnownService) + .intercept(new ServerInterceptor() { + @Override + public ServerCall.Listener interceptCall(ServerCall call, Metadata headers, ServerCallHandler next) { + authHeaderFromRequest.set(headers.get(Metadata.Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER))); + dpopHeaderFromRequest.set(headers.get(Metadata.Key.of("DPoP", Metadata.ASCII_STRING_MARSHALLER))); + return next.startCall(call, headers); + } + }) .build() .start(); ManagedChannel channel = SDKBuilder .newBuilder() - .withClientSecret("client", "secret") - .platformEndpoint("localhost:" + server.getPort()) + .withClientSecret("client-id", "client-secret") + .platformEndpoint("localhost:" + wellknownServer.getPort()) .withPlainTextConnection(true) .buildChannel(); + assertThat(channel).isNotNull(); + assertThat(channel.getState(false)).isEqualTo(ConnectivityState.IDLE); + + var wellKnownStub = WellKnownServiceGrpc.newBlockingStub(channel); + + httpServer.enqueue(new MockResponse() + .setBody("{\"access_token\": \"hereisthetoken\", \"token_type\": \"Bearer\"}") + .setHeader("Content-Type", "application/json")); + + var ignored = wellKnownStub.getWellKnownConfiguration(GetWellKnownConfigurationRequest.getDefaultInstance()); channel.shutdownNow(); - assertThat(channel).isNotNull(); - } catch (Exception e) { - if (server != null) { - server.shutdownNow(); - } + // we've now made two requests. one to get the bootstrapping info and one + // call that should activate the token fetching logic + assertThat(httpServer.getRequestCount()).isEqualTo(2); + + httpServer.takeRequest(); + var accessTokenRequest = httpServer.takeRequest(); + assertThat(accessTokenRequest).isNotNull(); + var authHeader = accessTokenRequest.getHeader("Authorization"); + assertThat(authHeader).isNotNull(); + var authHeaderParts = authHeader.split(" "); + assertThat(authHeaderParts).hasSize(2); + assertThat(authHeaderParts[0]).isEqualTo("Basic"); + var usernameAndPassword = new String(Base64.getDecoder().decode(authHeaderParts[1]), StandardCharsets.UTF_8); + assertThat(usernameAndPassword).isEqualTo("client-id:client-secret"); - throw e; + assertThat(dpopHeaderFromRequest.get()).isNotNull(); + assertThat(authHeaderFromRequest.get()).isEqualTo("DPoP hereisthetoken"); + + var body = new String(accessTokenRequest.getBody().readByteArray(), StandardCharsets.UTF_8); + // not pulling in a json library here + assertThat(body).contains("grant_type=client_credentials"); + + } finally { + if (wellknownServer != null) { + wellknownServer.shutdownNow(); + } } } } diff --git a/sdk/src/test/resources/oidc-config.json b/sdk/src/test/resources/oidc-config.json index 4c04082d..4e9827f9 100644 --- a/sdk/src/test/resources/oidc-config.json +++ b/sdk/src/test/resources/oidc-config.json @@ -1,7 +1,7 @@ { "issuer": "", "authorization_endpoint": "https://example.com/oauth2/v1/authorize", - "token_endpoint": "https://example.com/oauth2/v1/token", + "token_endpoint": "", "userinfo_endpoint": "https://example.com/oauth2/v1/userinfo", "registration_endpoint": "https://example.com/oauth2/v1/clients", "jwks_uri": "https://example.com/oauth2/v1/keys", From 495b842c7edfeed85d9dc41c99bfdb70a335514b Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 13:54:35 -0400 Subject: [PATCH 51/62] remove this --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index fad8a5a0..ca654dd1 100644 --- a/pom.xml +++ b/pom.xml @@ -69,11 +69,6 @@ 1.18.30 provided - - org.junit.jupiter - junit-jupiter-engine - test - org.mockito mockito-core From 0ef4a908f4a7e6fd4f7e12c4c69cc047d41af484 Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 14:35:24 -0400 Subject: [PATCH 52/62] don't need those --- pom.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pom.xml b/pom.xml index ca654dd1..9c380979 100644 --- a/pom.xml +++ b/pom.xml @@ -37,16 +37,6 @@ 5.10.1 pom import - - - io.opentdf.platform - sdk - 0.1.0-SNAPSHOT - - - io.opentdf.platform - protocol - 0.1.0-SNAPSHOT org.apache.logging.log4j From f95b2d31477712142c0543ed9957478f786739ae Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 14:38:37 -0400 Subject: [PATCH 53/62] didn't need all of that --- sdk/pom.xml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sdk/pom.xml b/sdk/pom.xml index 4c3a04d4..9f6bec12 100644 --- a/sdk/pom.xml +++ b/sdk/pom.xml @@ -26,14 +26,6 @@ oauth2-oidc-sdk 11.10.1 - - io.grpc - grpc-all - - - io.grpc - grpc-api - io.grpc grpc-netty-shaded @@ -53,11 +45,6 @@ 6.0.53 provided - - com.google.protobuf - protobuf-java - ${protobuf.version} - org.assertj assertj-core From 5a5fc85f2d20220c8af0b1bbc0ef3b2ca49a92c3 Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 14:39:37 -0400 Subject: [PATCH 54/62] ok --- sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java index d2ecd83f..3d6e3503 100644 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java @@ -30,9 +30,8 @@ public class SDKBuilderTest { @Test - void testCreatingSDKWithIssuer() throws IOException, InterruptedException { + void testCreatingSDKChannel() throws IOException, InterruptedException { Server wellknownServer = null; - // we use the HTTP server for two things: // * it returns the OIDC configuration we use at bootstrapping time // * it fakes out being an IDP and returns an access token when need to retrieve an access token From a9485e690cf1a4d29f99a56248a84a85b5f8224f Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 14:40:27 -0400 Subject: [PATCH 55/62] Update pom.xml --- protocol/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/pom.xml b/protocol/pom.xml index 1278a058..d94bddbf 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -56,7 +56,7 @@ - + From 096f34fbef7556f2b6540f73dcdcb85e9597e621 Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 14:41:42 -0400 Subject: [PATCH 56/62] Update pom.xml --- protocol/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/pom.xml b/protocol/pom.xml index d94bddbf..ae7729d9 100644 --- a/protocol/pom.xml +++ b/protocol/pom.xml @@ -6,7 +6,7 @@ io.opentdf.platform protocol protocol - 0.1.0-SNAPSHOT + 0.1.0-SNAPSHOT sdk-pom io.opentdf.platform From ed25a80c801d372a0a8e716a547a17780349c5f7 Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 14:59:38 -0400 Subject: [PATCH 57/62] add an `SDK` constructor --- .../java/io/opentdf/platform/sdk/SDK.java | 34 +++++++++++++++++++ .../io/opentdf/platform/sdk/SDKBuilder.java | 27 +++------------ 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java index d2f3bfd7..49af620d 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDK.java @@ -1,8 +1,13 @@ package io.opentdf.platform.sdk; +import io.grpc.Channel; +import io.opentdf.platform.policy.attributes.AttributesServiceGrpc; import io.opentdf.platform.policy.attributes.AttributesServiceGrpc.AttributesServiceFutureStub; +import io.opentdf.platform.policy.namespaces.NamespaceServiceGrpc; import io.opentdf.platform.policy.namespaces.NamespaceServiceGrpc.NamespaceServiceFutureStub; +import io.opentdf.platform.policy.resourcemapping.ResourceMappingServiceGrpc; import io.opentdf.platform.policy.resourcemapping.ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub; +import io.opentdf.platform.policy.subjectmapping.SubjectMappingServiceGrpc; import io.opentdf.platform.policy.subjectmapping.SubjectMappingServiceGrpc.SubjectMappingServiceFutureStub; /** @@ -18,6 +23,35 @@ public interface Services { NamespaceServiceFutureStub namespaces(); SubjectMappingServiceFutureStub subjectMappings(); ResourceMappingServiceFutureStub resourceMappings(); + + static Services newServices(Channel channel) { + var attributeService = AttributesServiceGrpc.newFutureStub(channel); + var namespaceService = NamespaceServiceGrpc.newFutureStub(channel); + var subjectMappingService = SubjectMappingServiceGrpc.newFutureStub(channel); + var resourceMappingService = ResourceMappingServiceGrpc.newFutureStub(channel); + + return new Services() { + @Override + public AttributesServiceFutureStub attributes() { + return attributeService; + } + + @Override + public NamespaceServiceFutureStub namespaces() { + return namespaceService; + } + + @Override + public SubjectMappingServiceFutureStub subjectMappings() { + return subjectMappingService; + } + + @Override + public ResourceMappingServiceFutureStub resourceMappings() { + return resourceMappingService; + } + }; + } } public SDK(Services services) { diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java index 2ae17b20..6bf5631d 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java @@ -54,7 +54,6 @@ public SDKBuilder withPlainTextConnection(Boolean usePlainText) { return this; } - ManagedChannel buildChannel() { // we don't add the auth listener to this channel since it is only used to call the // well known endpoint @@ -109,30 +108,12 @@ ManagedChannel buildChannel() { return getManagedChannelBuilder() .intercept(interceptor) .build(); + } -// return new SDK.Services() { -// final AttributesServiceGrpc.AttributesServiceFutureStub attributes = AttributesServiceGrpc.newFutureStub(channel); -// final NamespaceServiceGrpc.NamespaceServiceFutureStub namespaces = NamespaceServiceGrpc.newFutureStub(channel); -// final SubjectMappingServiceGrpc.SubjectMappingServiceFutureStub subjectMappings = SubjectMappingServiceGrpc.newFutureStub(channel); -// final ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub resourceMappings = ResourceMappingServiceGrpc.newFutureStub(channel); -// @Override -// public AttributesServiceGrpc.AttributesServiceFutureStub attributes() { -// return attributes; -// } -// @Override -// public NamespaceServiceGrpc.NamespaceServiceFutureStub namespaces() { -// return namespaces; -// } -// @Override -// public SubjectMappingServiceGrpc.SubjectMappingServiceFutureStub subjectMappings() { -// return subjectMappings; -// } -// @Override -// public ResourceMappingServiceGrpc.ResourceMappingServiceFutureStub resourceMappings() { -// return resourceMappings; -// } -// }; + SDK buildSDK() { + return new SDK(SDK.Services.newServices(buildChannel())); } + private ManagedChannelBuilder getManagedChannelBuilder() { ManagedChannelBuilder channelBuilder = ManagedChannelBuilder .forTarget(platformEndpoint); From 76ea1b601e315fb2917ca775e299fb3a080393e9 Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 15:09:11 -0400 Subject: [PATCH 58/62] name change --- sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java | 2 +- sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java index 6bf5631d..4983babb 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java @@ -49,7 +49,7 @@ public SDKBuilder withClientSecret(String clientID, String clientSecret) { return this; } - public SDKBuilder withPlainTextConnection(Boolean usePlainText) { + public SDKBuilder withInsecurePlaintextConn(Boolean usePlainText) { this.usePlainText = usePlainText; return this; } diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java index 3d6e3503..7b1017b8 100644 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java @@ -90,7 +90,7 @@ public ServerCall.Listener interceptCall(ServerCall Date: Wed, 1 May 2024 17:27:18 -0400 Subject: [PATCH 59/62] get the server port in a better way --- .../test/java/io/opentdf/platform/sdk/SDKBuilderTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java index 7b1017b8..98918ba1 100644 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java @@ -19,9 +19,9 @@ import org.junit.jupiter.api.Test; import java.io.IOException; +import java.net.ServerSocket; import java.nio.charset.StandardCharsets; import java.util.Base64; -import java.util.Random; import java.util.concurrent.atomic.AtomicReference; import static org.assertj.core.api.Assertions.assertThat; @@ -71,8 +71,12 @@ public void getWellKnownConfiguration(GetWellKnownConfigurationRequest request, // we use the server in two different ways. the first time we use it to actually return // issuer for bootstrapping. the second time we use the interception functionality in order // to make sure that we are including a DPoP proof and an auth header + int randomPort; + try (ServerSocket socket = new ServerSocket(0)) { + randomPort = socket.getLocalPort(); + } wellknownServer = ServerBuilder - .forPort(7000 + new Random().nextInt(3000)) + .forPort(randomPort) .directExecutor() .addService(wellKnownService) .intercept(new ServerInterceptor() { From c33af5be1f3d5fd2f53f639dd0c63080f0f82f97 Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Wed, 1 May 2024 17:32:08 -0400 Subject: [PATCH 60/62] code review stuff --- sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java | 7 ++++--- .../test/java/io/opentdf/platform/sdk/SDKBuilderTest.java | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java index 4983babb..a36586e4 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java @@ -42,18 +42,19 @@ public SDKBuilder platformEndpoint(String platformEndpoint) { return this; } - public SDKBuilder withClientSecret(String clientID, String clientSecret) { + public SDKBuilder clientSecret(String clientID, String clientSecret) { ClientID cid = new ClientID(clientID); Secret cs = new Secret(clientSecret); this.clientAuth = new ClientSecretBasic(cid, cs); return this; } - public SDKBuilder withInsecurePlaintextConn(Boolean usePlainText) { + public SDKBuilder useInsecurePlaintextConnection(Boolean usePlainText) { this.usePlainText = usePlainText; return this; } + // this is not exposed publicly so that it can be tested ManagedChannel buildChannel() { // we don't add the auth listener to this channel since it is only used to call the // well known endpoint @@ -110,7 +111,7 @@ ManagedChannel buildChannel() { .build(); } - SDK buildSDK() { + public SDK build() { return new SDK(SDK.Services.newServices(buildChannel())); } diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java index 98918ba1..a0928f09 100644 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java @@ -92,9 +92,9 @@ public ServerCall.Listener interceptCall(ServerCall Date: Wed, 1 May 2024 17:41:43 -0400 Subject: [PATCH 61/62] add an exception class --- sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java | 8 ++++---- .../main/java/io/opentdf/platform/sdk/SDKException.java | 7 +++++++ .../test/java/io/opentdf/platform/sdk/SDKBuilderTest.java | 1 - 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 sdk/src/main/java/io/opentdf/platform/sdk/SDKException.java diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java index a36586e4..20f10dd4 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDKBuilder.java @@ -67,7 +67,7 @@ ManagedChannel buildChannel() { config = stub.getWellKnownConfiguration(GetWellKnownConfigurationRequest.getDefaultInstance()); } catch (Exception e) { Status status = Status.fromThrowable(e); - throw new RuntimeException(String.format("Got grpc status [%s] when getting configuration", status), e); + throw new SDKException(String.format("Got grpc status [%s] when getting configuration", status), e); } } finally { if (bootstrapChannel != null) { @@ -83,7 +83,7 @@ ManagedChannel buildChannel() { .getStringValue(); } catch (Exception e) { - throw new RuntimeException("Error getting the issuer from the platform", e); + throw new SDKException("Error getting the issuer from the platform", e); } Issuer issuer = new Issuer(platformIssuer); @@ -91,7 +91,7 @@ ManagedChannel buildChannel() { try { providerMetadata = OIDCProviderMetadata.resolve(issuer); } catch (IOException | GeneralException e) { - throw new RuntimeException("Error resolving the OIDC provider metadata", e); + throw new SDKException("Error resolving the OIDC provider metadata", e); } RSAKey rsaKey; @@ -101,7 +101,7 @@ ManagedChannel buildChannel() { .keyID(UUID.randomUUID().toString()) .generate(); } catch (JOSEException e) { - throw new RuntimeException("Error generating DPoP key", e); + throw new SDKException("Error generating DPoP key", e); } GRPCAuthInterceptor interceptor = new GRPCAuthInterceptor(clientAuth, rsaKey, providerMetadata.getTokenEndpointURI()); diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/SDKException.java b/sdk/src/main/java/io/opentdf/platform/sdk/SDKException.java new file mode 100644 index 00000000..0db5da43 --- /dev/null +++ b/sdk/src/main/java/io/opentdf/platform/sdk/SDKException.java @@ -0,0 +1,7 @@ +package io.opentdf.platform.sdk; + +public class SDKException extends RuntimeException { + public SDKException(String message, Exception reason) { + super(message, reason); + } +} diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java index a0928f09..d24e28b3 100644 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java +++ b/sdk/src/test/java/io/opentdf/platform/sdk/SDKBuilderTest.java @@ -128,7 +128,6 @@ public ServerCall.Listener interceptCall(ServerCall Date: Wed, 1 May 2024 17:42:06 -0400 Subject: [PATCH 62/62] delete this --- .../java/io/opentdf/platform/sdk/SDKTest.java | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java diff --git a/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java b/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java deleted file mode 100644 index 286aea1c..00000000 --- a/sdk/src/test/java/io/opentdf/platform/sdk/SDKTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package io.opentdf.platform.sdk; - - -import org.junit.jupiter.api.Test; - -import java.util.logging.Logger; - -class SDKTest { - private static final Logger logger = Logger.getLogger(SDKTest.class.getName()); - - - @Test - public void testIt() { - System.out.println("Hello"); - - } -}